The last 2 percent is the hardest
I can almost run the Redland example.py all the way through, but there is something dreadfully wrong. Every single crash happens when freeing memory. I can get around it in the very short term by disabling the specific, crashing calls, but that’s not much comfort.
Obviously I am going to have to dig in and figure out exactly what is different about the allocation patterns on Windows. This is straight C code, so it shouldn’t be too hard. I don’t think I can release like this, though, it’s too flaky. Maybe there’s a bug causing memory corruption?
Or maybe Dave is sane in not programming on Windows anymore. [forced grin]
April 28th, 2005 at 6:59 pm
This sounds the same problem as nearly everybody has with redland running under windows. It’s most likely caused by memory allocated by one runtime and freed by another. I expect you have everything compiled as dll’s from the (converted) workspaces, which links with the multithreaded runtime (/MD). If any of the libraries that you use are linked to another runtime and let their memory be freed by libraries upstream you’ll get your crash. see http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vccomp/html/cf7ed652-dc3a-49b3-aab9-ad60e5395579.asp for more about the runtimes.
April 28th, 2005 at 10:08 pm
Actually, I linked them all to the static mulitthreaded runtime(/MT), but that’s a fair point. I’ll need to check the settings of the linked upstream libraries (libxml et al.) and see if that fixes my problem.
April 29th, 2005 at 12:07 am
/MT and /MD won’t make much difference. /MD is synonimous with /MT /LD. To link to the static version you need to include /D_STATIC_CPPLIB.
April 29th, 2005 at 11:03 am
That’s what I thought. However, I switched everything to /MD and the crashes are gone!
So I just need to solve the problems with raptor mangling the filename so I can run the test suite, and I’m done. Thanks so much; never would have thought to do that without your comment.
April 29th, 2005 at 1:57 pm
[…] it (and give the location in the comments) - my allocated bandwidth is meager. Thanks to this tip from Suzan Foster, I was able to get everythi […]