Segfault when mark-played-items enabled

Bug #923414 reported by Jim Bowen
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
mediatomb (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Running mediatomb with the following snippet in my config produces a segfault when attempting to view a video:
  <extended-runtime-options>
      ... unrelated options ...
      <mark-played-items enabled="yes" suppress-cds-updates="yes">
        <string mode="prepend">#</string>
      </mark-played-items>
  </extended-runtiime-options>

gdb output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffebd60700 (LWP 27672)]
0x000000000044b93e in ConfigManager::getStringArrayOption(config_option_t) ()
(gdb) bt
#0 0x000000000044b93e in ConfigManager::getStringArrayOption(config_option_t) ()
#1 0x000000000051482d in PlayHook::trigger(zmm::Ref<CdsObject>) ()
#2 0x000000000050e249 in FileRequestHandler::open(char const*, File_Info*, UpnpOpenFileMode) ()
#3 0x00000000004e21be in ?? ()
#4 0x000000000054c890 in web_server_callback ()
#5 0x0000000000545195 in ?? ()
#6 0x0000000000552d92 in ?? ()
#7 0x00007ffff5b4cefc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8 0x00007ffff588789d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9 0x0000000000000000 in ?? ()

Smoking gun in src/playhook.cc:
        Ref<Array<StringBase> > mark_list = cfg->getStringArrayOption(CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_CONTENT_LIST);

If I disable mark-played-items or if I add at least one content item to a "mark" list as follows it works (no segfault):
      <mark-played-items enabled="yes" suppress-cds-updates="yes">
        <string mode="prepend">#</string>
        <mark>
          <content>audio</content>
        </mark>
      </mark-played-items>

Appears that the absence supposedly optional mark list is not handled well when marking is enabled.

Revision history for this message
Jim Bowen (jbowen) wrote :

Forgot version info:

root@maranello:/etc/mediatomb# dpkg -l mediatomb*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===========================-===========================-======================================================================
ii mediatomb 0.12.1-0ubuntu2 UPnP MediaServer (main package)
ii mediatomb-common 0.12.1-0ubuntu2 UPnP MediaServer (base package)
ii mediatomb-daemon 0.12.1-0ubuntu2 UPnP MediaServer (daemon package)

Running on Oneric

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mediatomb (Ubuntu):
status: New → Confirmed
Revision history for this message
bb (vancouverbluesea) wrote :

<mark>
          <content>audio</content>
</mark>
A sample is missing in the config file - it does exist in the documentation
/usr/share/doc/mediatomb-common
but without the enclosed </mark>
This makes it unclear how to position. In my opinion sample should be included and commented out in default config.xml
Content should be specified however in order to know "what" to mark.

<mark>

            Optional
            This subsection allows to list which type of content
            should get marked. We figured, that marking played
            items is mostly useful for videos, mainly for watching
            series. It could also be used with audio and image
            content, but otherwise it's probably useless. Thefore
            we decided to specify only three supported types that
            can get marked:
               o
<content>audio</content>
<content>video</content>
<content>image</content>

                 You can specify any combination of the above tags
                 to mark the items you want.

6.2. Import Settings

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.