1 Aug 2003 23:36
Re: Bus error on Mac OSX, again (long)
Martin Costabel <costabel <at> wanadoo.fr>
2003-08-01 21:36:15 GMT
2003-08-01 21:36:15 GMT
Peter O'Gorman wrote: > I'd guess that there is a static constructor somewhere in one of the > other objects which gets called before main() and does something odd You had the right idea: As it turns out, the crash does not happen in the main program at all, as I thought before, but inside a static constructor long before main() is run. The precise line in the scribus code is scribus/scfonts_encoding.cpp:23: if (tf.open(IO_ReadOnly)) It seems that Qt's QFile::open method works differently whether it is run in main() or from a static constructor. Why this would be so, and who is to blame, Qt or Darwin, is way beyond my non-existing C++ knowledge. As it seems, it is not a bug in Scribus, unless they are doing something illegal that I don't see. I have reduced the relevant scribus code to the 2 attached small files that show the same behavior: If LANG is set to something non null, the program crashes in the tf.open command and produces the same crash log as scribus does, and if LANG is unset or set to the empty string, it doesn't crash. If instead of LANG, one plays with LC_CTYPE or LC_ALL, one is allowed to set them to "C", but not to anything else non empty. Also, if the file reading code is taken out of the Foo:foo method and put into main(), the problem disappears. No more bus error, whether LANG is set or not.(Continue reading)
The project was created in 2001-10-17 21:55 ,
hasn't made any file releases, nothing in their CVS, 0 project
activity.Did *you* actually check the port status? :-9
Anyway, to cut this reply short, so far I haven't encountered a single
case of a software which wasn' t portable to Darwin/OSX because it had
"Glibc in mind" when being written. Maybe in a few cases, Glibc
provided APIs which the Darwin libc (not yet) provided, but with 10.2
such cases are rare, and usually Glibc wouldn't be able to help it
either, because if something isn't implemented in the Kernel/Drivers,
then libc can only do so much to help that situation.
As such, personally I see no real advantage in porting Glibc, but maybe
others will - this is just my two cents.
RSS Feed