AW: Re: LyX/Q.../Free crash
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Sun Oct 9 19:37:14 CEST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
michael.gerz at teststep.org schrieb:
>>>src/kernel/qfontdatabase.cpp, line 913, reads
>>>
>>> fe = loadEngine(script, fp, request, 0, 0, 0 );
>>>
>>>loadEngine() is defined in file src/kernel/qfontdatabase_win.cpp which
>>>expects a QFontFamily as fourth parameter. Within loadEngine() (line
>>>337), family->rawName.lower() is evaluated. However, we get a
>>>segmentation fault since we explicitly pass 0 as parameter.
>>>
>>
>>Angus already told me about this crash but had no time to go deeper.
>>Afais it's your fault because qfontdatabase_x11.cpp and
>>qfontdatabase_win.cpp (qt4) also don't like NULL there... but it should
>>be no problem to check for != NULL.
>
>
> Well, qfontdatabase.cpp, line 913, passes NULL explicitly to loadEngine. Thus, it is not LyX but Q.../Free that causes the crash. However, LyX may cause an execution path that does not occur "normally".
>
> Could you please check whether qfontdatabase.cpp (Qt4) also passes "0" as fourth parameter to loadEngine? Of course, we could just add a check for 0 in loadEngine and be happy but it may also have some unknown side-effects.
this is strange...
Qt4.0.1 qfontdatabase.cpp:findFont()
...
if (fp) {
if (fp->rawMode) {
fe = loadEngine(script, fp, request, 0, 0, 0);
...
and qfontdatabas_win.cpp:loadEngine()
...
if (fp->rawMode) { // will choose a stock font
int f, deffnt;
<some other things>
QString fam = family->rawName.toLower();
...
I think setting fam to "default" in case of family == 0 would be ok, but
I really don't know why it works in qt4 ... maybe I should write a
testcase trying to crash Qt4
Should be in anon cvs tomorrow, also a fix for the redraw-problem
Christian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFDSVVKnNKwkgf+zVMRAlVaAJ9pcDXPfSYhLO3tjnJxN3MFzFXqDwCgo8p1
W5YiQ0xZoh0LoGrpuBAcl8I=
=zyxZ
-----END PGP SIGNATURE-----
More information about the kde-cygwin
mailing list