![](https://secure.gravatar.com/avatar/8d5128b5b838ecedc34635fba7995f7f.jpg?s=120&d=mm&r=g)
On Sat, 28 Aug 2004, MenTaLguY wrote:
Okay, I've been looking over the deltas between the 4th and 5th, and the 5th and 6th.
Here is what changed:
Based on this information, I think it is fairly certain that the crashes are libgc-related.
Yup, sounds like a smoking gun.
Based on the analysis that we have done on Jabber over the past few days, it appears that libgc is attempting to take over the system new/delete functionality, so all code that allocates memory is affected.
Interestingly, it appears that things actually got worse when we undefined USE_LIBGC (which causes Inkscape::GC to use the system new/delete rather than the libgc allocator) [item 1 on the checklist I proposed to bryce].
This suggests to me that libgc proper is working fine; it is the system allocator that has been broken by libgc's attempt at takeover.
Since "malloc takeover" is not required, I suggest we make our own build of libgc that does not include it (I am fairly certain it is not the default). That sort of magic is always dicey and error-prone to begin with.
I think this would be a good solution especially due to the fact that gc must be compiled with the --enable-cplusplus option, which it appears few if any pre-packaged versions of gc have, anyway.
If the gc package were smaller, I'd even be tempted to suggest incorporating it into the inkscape codebase, but at over 200 files I think that would be way too much bloat.
This hypothesis can be confirmed by completing the checklist:
- existing libgc without USE_LIBGC: should fail
- "fixed" libgc with USE_LIBGC: should work
- "fixed" libgc without USE_LIBGC: should work
- no libgc at all, also without USE_LIBGC: should work
Sounds like we're making good progress narrowing it down.
Looking at the gc codebase, there's some platform-specific code in it, so it would not be a surprise to find it working fine on Linux but having issues on Windows... Do we know if it crashes on all variants of Windows, or specific versions (like only on XP?)
There's a gctest program included - perhaps someone on Windows could compile and run this to see if it produces anything informative? There's also some todo's at the end of the doc/README.changes. There's also a BUGS section in the README.
Bryce