Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#6828 closed defect (fixed)

Missing HDHomeRun device can crash backend on startup

Reported by: Nigel Owned by: danielk
Priority: major Milestone: 0.22
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

% gdb ./mythbackend            
...
(gdb) run -v channel
...
2009-08-11 10:51:33.748 mythbackend version: trunk [20846M] www.mythtv.org
2009-08-11 10:51:33.767 Using runtime prefix = /Volumes/MythBuild/.osx-packager/src/myth-svn/mythtv/programs/Resources
2009-08-11 10:51:33.767 Using localhost value of macaque.ind.tansu.com.au
2009-08-11 10:51:33.769 New DB connection, total: 1
2009-08-11 10:51:33.771 Connected to database 'mythconverg' at host: 127.0.0.1
2009-08-11 10:51:33.772 Closing DB connection named 'DBManager0'
2009-08-11 10:51:33.777 Connected to database 'mythconverg' at host: 127.0.0.1
2009-08-11 10:51:33.783 Current Schema Version: 1239
2009-08-11 10:51:33.786 MythBackend: Starting up as the master server.
2009-08-11 10:51:33.791 New DB connection, total: 2
2009-08-11 10:51:33.792 Connected to database 'mythconverg' at host: 127.0.0.1
2009-08-11 10:51:33.798 TVRec(11): Start channel: 2.
2009-08-11 10:51:33.798 HDHRChan(121079F0): Opening HDHR channel
2009-08-11 10:51:37.808 HDHRSH: hdhomerun device 121079F0 not found

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x31323124
0x007ad0de in hdhomerun_control_get_device_ip_requested (cs=0x31323120) at hdhomerun_control.c:164
164     {
(gdb) where
#0  0x007ad0de in hdhomerun_control_get_device_ip_requested (cs=0x31323120) at hdhomerun_control.c:164
#1  0x0169c915 in HDHRStreamHandler::FindDevice ()
#2  0x0412ff10 in ?? ()
Previous frame inner to this frame (gdb could not unwind past this frame)
(gdb)

Change History (6)

comment:1 Changed 10 years ago by danielk

Owner: changed from Isaac Richards to danielk
Priority: minormajor
Status: newassigned

comment:2 Changed 10 years ago by Nigel

This simple hack fixes the problem, but I'm not sure about what state that code in FindDevice?() is meant to be falling back to.

Index: hdhrstreamhandler.cpp
===================================================================
--- hdhrstreamhandler.cpp       (revision 21158)
+++ hdhrstreamhandler.cpp       (working copy)
@@ -674,7 +674,7 @@
             VERBOSE(VB_IMPORTANT,
                     QString("HDHRSH: hdhomerun device %1 not found").arg(_devicename));
             device_data.device_id = 0;
-            device_data.device_ip = hdhomerun_device_get_device_ip_requested(thisdevice);
+            device_data.device_ip = 0;
             device_data.tuner     = 0;
         }
     }

comment:3 Changed 10 years ago by mikeb@…

Have a look at #6881; there's no need to even have the FindDevices? function.

comment:4 Changed 10 years ago by mikeb@…

Traced out the problem; bug in the original code that was fixed as part of the #6881 cleanup. The cleanup patches also fix a reconnection bug present in the original code.

comment:5 Changed 10 years ago by Nigel

Resolution: fixed
Status: assignedclosed

Not sure what commits fixed it, but yes, all good as of -r21445. Thanks for looking, Mike.

comment:6 Changed 10 years ago by mikeb@…

I think you misunderstood, the bug has yet to be patched and the patch is in #6881.

Note: See TracTickets for help on using tickets.