Opened 12 years ago

Closed 12 years ago

#4675 closed defect (fixed)

Crash if using -v upnp

Reported by: Nigel Owned by: Nigel
Priority: minor Milestone: unknown
Component: upnp Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

On OS X, something funky happens if setting -v upnp (I tried all the -v flags to be sure):

MacBook% ../bin/mythshutdown -v mheg 
mythshutdown: Could not initialize myth context. Exiting.
MacBook% ../bin/mythshutdown -v upnp
mythshutdown: Could not initialize myth context. Exiting.
zsh: bus error  ../bin/mythshutdown -v upnp

probably something in libmythupnp, but could also be MythContext. Stack trace outside of GDB looks corrupt. Running under GDB does not crash. Going to have to do this the hard way.

Attachments (1)

bt.txt (6.2 KB) - added by paulh 12 years ago.
backtrace of SSDPCache segfault

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by Nigel

Resolution: worksforme
Status: newclosed

In libmythupnp, I changed all the VB_UPNP to VB_EIT. Problem went away. I changed them back to VB_UPNP. Problem returned. Went file by file, narrowed it down to the VERBOSE lines in SSDPCache::~SSDPCache() and UPnpDeviceDesc::~UPnpDeviceDesc().
Several tweaks later, the problem has magically gone away. Will assume this was some sort of freak build/cache/cosmic-ray problem?

comment:2 Changed 12 years ago by paulh

I'm sure there is something wrong somewhere :-(

When looking at ticket #4664 I noticed mythshutdown was segfaulting if I added the upnp verbose flag. I'll attach the bt in case you find it useful. As you can see it looks like something is wrong in the SSDPCache destructor. I works OK so long as I don't add upnp to the verbose flags.

Changed 12 years ago by paulh

Attachment: bt.txt added

backtrace of SSDPCache segfault

comment:3 Changed 12 years ago by stuartm

I think we can problem comment or remove the VERBOSE from the SSDPCache dtor, at least for 0.21?

comment:4 Changed 12 years ago by Nigel

Resolution: worksforme
Status: closednew

comment:5 Changed 12 years ago by Nigel

Resolution: fixed
Status: newclosed

(In [16049]) Avoid crash when using -v upnp. Closes #4675

Note: See TracTickets for help on using tickets.