[Scribus] Re: [Fink-devel] Bus error on Mac OSX, again (long)

Martin Costabel costabel
Sun Aug 10 01:19:19 CEST 2003


Paul wrote:

> Hi,
> 
> 
>>Since I installed the new release of scribus, the bus error is gone!
>>Now I can use scribus in german on MacOSX 10.2.6.
> 
> 
> Excellent.

This works, because I introduced a workaround: I patched 
scfonts_encoding.cpp so that it unsetenv's LANG, LC_CTYPE, and LC_ALL 
before tf.open(IO_ReadOnly) is called. Otherwise, the latter would crash.

The real problem is still there: Scribus uses static constructors to 
read a couple of text files. What I understand from recent discussions 
(but I am not a C++ expert myself, by any standards) is that using 
methods like QFile::open() inside static constructors is basically 
unsafe. It works on Linux, but rather by chance, and it crashes on 
Darwin when LANG is set. The reason is that somewhere inside the methods 
called from QFile::open, the static object QString::null is used. Now 
the order of initialization of static constructors is undefined, and 
when QString::null is used uninitialized, a bus error results.

Is there a chance that the reading of "Stdenc.txt" and friends could be 
moved from the static objects Foi::StdEncoding etc into the main() 
program? This would eliminate the problem definitively.

> Any chance of a tarball (or sit file) of the working compiled binary so
> we can bung it onto one of the download websites?

In this case, this would be a Fink *.deb file. Right now, the Fink 
scribus package is still in the "unstable" distribution, and users are 
supposed to compile the unstable packages themselves. "Compiling" means 
typing the 3 words "fink install scribus" and waiting until scribus and 
possibly its dependencies are automatically downloaded, compiled, and 
installed.

Once there is another positive report or two, the package can and will 
be moved to the "stable" distribution, and then it will be contained in 
the next binary distribution of Fink, due in a couple of weeks.

Distributing Fink packages in precompiled form outside of Fink is not 
excluded, but perhaps not a very good idea. There are too many things 
that can go wrong, what with all the dependencies on precise and not 
very compatible versions of qt3, xfree86, and so on.

-- 
Martin









More information about the scribus mailing list