[mythtv] Win32 builds with QT4 - query

Andrei Tanas andrei at tanas.ca
Sat Jun 28 07:16:51 UTC 2008


> This is the error that is reported IMMEDIATELY on startup:  ( there is
> no stacktrace or any information from GDB - any help with this would
> be appreciated!)
>
> Program received signal SIGSEGV, Segmentation fault.
> Program exited with code 030000000005.
>
> (it happens on all .exe's EXCEPT mtd.exe )

The problem happens apparently, in a constructor of some global static 
object, which is supposed to be executed before main(), that's why GDB is 
helpless. The problem might be worse (probably is since this only happens on 
Windows), because "on Windows constructors are not executed for global 
static data placed in dlls" (see reference below).

So far, I traced the problem to libmythtv. See attachment - unpack it under 
"programs" and build it, it will run fine, dumping the standard 
initialization stuff to console and silently exiting. However, as soon as 
you uncomment line 102 ("ProgramInfo pi;"), this will link the executable to 
libmythtv and it will start experiencing the symptoms.

This article: http://www.kdedevelopers.org/node/2889 describes exactly the 
same issue and offers a solution, the only problem is how to find out where 
to apply this solution to. This one helps understand the issue too: 
http://www.microsoft.com/msj/0297/c/c0297.aspx

Can somebody help figuring out what these global objects are? So far, using 
the method from the first article, I found that constructors are called for 
SSDPCache in upnp.cpp:23, and an array of QTextCodec's "static const 
QTextCodec *iso8859_codecs[16];" in dvbdescriptors.cpp:11, but neither seems 
to be responsible.
The method in the article is only good for finding objects inheriting from 
something common (QObject, in this case), so the scope of the search was 
very limited. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.gz
Type: application/x-gzip
Size: 1431 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20080628/e21d3dd7/attachment.bin 


More information about the mythtv-dev mailing list