Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 22 months ago

Closed 21 months ago

Last modified 21 months ago

#10897 closed Bug Report - Crash (fixed)

Firewire based tuning segfaults consistently

Reported by: scottadmi@… Owned by: danielk
Priority: minor Milestone: 0.26
Component: MythTV - General Version: 0.25.1
Severity: low Keywords:
Cc: Ticket locked: no


After updating to mythtv .25, the mythtv backend has failed consistently watching TV via a firewire cable box. The steps to reproduce it are, when connected the DCH-3200, watch live TV and change channels (this works successfully) then change channels again - this second time always results in the backend crashing with the follow console output:

mythbackend: mpeg2.c:113: mpeg2_recv_handler: Assertion `mpeg != ((void *)0)' failed.

It is important to note that this error references code in the libiec61883 library which mythtv relies on - it is not part of libmpeg2 as was incorrectly assumed in ticket 10051. My expertise is not enough to know the code path that leads to this, but given that it consistently works successfully with the first channel change but not the second and never happened this in .24, it is likely a direct result of mythtv changes since the last major release.

Attachments (1)

firewire_channel_change_fix.patch (918 bytes) - added by kpl388@… 21 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 22 months ago by beirdo

  • Status changed from new to infoneeded_new

Need backtrace and full version output.

comment:2 Changed 22 months ago by scottadmi@…

Apologies, my use of "segfault" in the title was incorrect (so there wasn't a kernel dump). It was an assertion failure in the linked iec61883 library - the specific line is "assert (mpeg != NULL);". There was no backtrace printed to the console or followup log data at any log level, simply after the second channel change:

mythbackend: mpeg2.c:113: mpeg2_recv_handler: Assertion `mpeg != ((void *)0)' failed.

If there is a way for me to produce helpful backtrace point me in the right direction. The version output is:

Please attach all output as a file in bug reports.
MythTV Version : v0.25.1-58-g1d41f74
MythTV Branch : fixes/0.25
Network Protocol : 72
Library API : 0.25.20120506-1
QT Version : 4.7.4
Options compiled in:
 linux profile use_hidesyms using_alsa using_oss using_backend using_bindings_perl using_bindings_python using_bindings_php using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr using_iptv using_ivtv using_libcrypto using_libxml2 using_libudf using_mheg using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_v4l2 using_x11 using_xrandr using_xv using_bindings_perl using_bindings_python using_bindings_php using_mythtranscode using_opengl using_vdpau using_ffmpeg_threads using_live using_mheg using_libass using_libxml2 using_libudf

comment:3 Changed 21 months ago by danielk

  • Priority changed from major to minor
  • Severity changed from high to low

The [TicketHowTo] has links to various tutorials including on how to grab a backtrace.

comment:4 Changed 21 months ago by kpl388@…

I'm experiencing this exact same issue. I filed a bug against Mythbuntu ( ~2 months ago, but haven't gotten any action on it yet. It may be more appropriate to address here? I posted a backtrace and relevant logs on that bug. Please let me know if I can provide any additional info.

Changed 21 months ago by kpl388@…

comment:5 Changed 21 months ago by kpl388@…

I tracked this bug down to an endless loop of adding listeners after a firewire channel change. This was caused by the paused flag never getting set to false in the FirewireRecorder:PauseAndWait() function. I'm a bit new to community development - this is the first patch I've submitted. Please let me know if this isn't formatted correctly or if there is something else I need to do to get this patch included in mythtv.

comment:6 Changed 21 months ago by danielk

  • Owner set to danielk
  • Status changed from infoneeded_new to assigned

comment:7 Changed 21 months ago by kpl388@…

Just an update: at least one other user tested the patch I posted above. It worked for him as well (

Please let me if there is anything else I can do to help get this patch incorporated. Thanks!

comment:8 Changed 21 months ago by Kyle <klillis@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 63c044216d52a36522151ce2072b2e6b07e8b7f5/mythtv:

Fixes #10897. Clear paused when we unpause FirewireRecorder?.

Signed-off-by: Daniel Thor Kristjansson <danielk@…>

comment:9 Changed 21 months ago by danielk

  • Milestone changed from unknown to 0.26

comment:10 Changed 21 months ago by Kyle <klillis@…>

In 1c496c81662eabda444452071eb18f2fd375d4d0/mythtv:

Fixes #10897. Clear paused when we unpause FirewireRecorder?.

Signed-off-by: Daniel Thor Kristjansson <danielk@…>

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'new'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.