[kde-edu]: kalzium molecular viewer segfaults

Saro Engels ps_ml at gmx.de
Sun Nov 18 06:45:22 CET 2007


Benoit Jacob schrieb:
>> but a full backtrace would definitely help making sure. Apparently this
>> OpenBabel calls another OpenBabel function, "SetOutFormat", which
>> segfaults. By the way, looking at the above line, I realize that it feels
>> strange to have "inFormat" passed twice so perhaps there's also something
>> to fix here. I really don't know.
The problem here lies really within the two times inFormat: in the line 
above inFormat is defined as
inFormat = Conv.FormatFromExt( QFile::encodeName(filename) );
which results although filename isn't empty in a zero pointer inFormat.
The Problem within openbabel is now that it checks for it in SetInFormat 
but not in SetOutFormat (which leads to the segfault when trying to call 
inFormat->Flags()).
So right now it seems to be a problem of the openbabel lib.

> 
> I think: why the HECK are we setting at all the Out format? We only read 
> molecules in Kalzium, we don't write to them (in kde 4.0) so we could (and 
> probably should) only set the In format. Since your crash occurs in 
> SetOutFormat, this would also quite possibly fix it!!
> 
> So please try this: on line 51 of 
> kalzium/compoundviewer/openbabel2wrapper.cpp, please apply this diff:
> -       Conv.SetInAndOutFormats( inFormat,inFormat );
> +       Conv.SetInFormat(inFormat);
No, that doesn't work -
warning: HEAP[kalzium.exe]:
warning: Invalid Address specified to RtlFreeHeap( 003D0000, 6FDCC4B8 )


Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c911231 in ntdll!DbgUiConnectToDbg () from ntdll.dll
(gdb) quit

greetings
SaroEngels


More information about the kde-edu mailing list