Interesting Jamie, thanks. That kinda sounds close to what is going on.
What he describes almost sounds like fail of a final buffer purge at the end of linking period ?
I think this would only cause a Resource error though so it can't be that.
oh well.
This is floating bug. It's most likely caused by heap corruption. It depends on what is corrupted. And as memory layout can be different for 32bit and 64bit, debug and release, different OS versions - this bug can appear and disappear in different environments, depending on how critical corrupted data is.
Also the fact that it apparently affects both Delphi and Lazarus, which can be reasonably expected to have different heap layouts.The most recent bug in my project, that was fixed - was exactly such bug, that was happening from time to time in release version, but almost never in debug one, so it was really hard to pinpoint it. After researching this problem, I determined, that problem was happening during CreateWindow. First I thought, that it was some sort of race condition in video driver due to video mode switch. It would have been weird, because old version of my project didn't have such problem. But then I realized, that problem was actually happening inside window proc, not CreateWindow itself. At the end I found, that it was caused by wrong window class, that was used to create temporary window. Each dll should have had it's own window class for this purpose. But due to error in window class name wrong one was used, that was causing creating window from other dll, that could have been unloaded. But it was some sort of race condition or this bug relied on dll load addresses, so that had never happened in debugger.
BUT... that in itself is a valuable clue: it implies that it's something being done by the program itself, rather than by the linker or underlying libraries since if they were at fault the problem would be unlikely to manifest itself in the same way.
MarkMLl
Just wondering if anyone else has run into this, and what, if anything, I am doing wrong, or not looking for that I should be looking for.
speaking of MAP files, how is that done in fpc ? Because I did that many times in Delphi so I could archive that file with the backups of releases. This was handy because I could reference an address in the file reported by a user to determine a general location of the error ..