Home » U++ Library support » U++ Library : Other (not classified elsewhere) » LibX11 error & lock-up in debug mode with GridCtrl
Re: LibX11 error & lock-up in debug mode with GridCtrl [message #35189 is a reply to message #35141] |
Fri, 20 January 2012 23:34 |
|
Finally got it And it is not really BLITZ related... it is much more complicated
After a lot of commenting out of different parts of code I narrowed it down to single line: GridDisplay.cpp:36. There, in SetTheme() is an indirect call to GridImg::Vhdr6(), which is a default header theme defined in GridCtrl.iml. Now this function gets called when global variable GridDisplay StdGridDisplay is initialized. I'm still not 100% certain what exactly happens, but I believe it is wrong initialization order. Probably StdGridDisplay is initialized before GridImg or something like that. It would also explain why it happens only in some modes and on some systems - the order of initialization can be implementation dependent.
I looked through all the code in trunk, but StdGridDisplay seems to not be used anywhere. So I think it won't break much if just fix the problem by transforming the global variable to function, so that it is initialized later (upon the first use, note that this might also save some memory )://GridDisplay.cpp:11
GLOBAL_VAR(GridDisplay, StdGridDisplay);
//GridDisplay.h:106
UPP::GridDisplay& StdGridDisplay();
What do you think Daniel, is this fix possible? I know it might break someones application, but the fix in that case would be trivial (just adding "()"), so it is not really bad, right?
Honza
|
|
|
Goto Forum:
Current Time: Thu May 09 23:33:04 CEST 2024
Total time taken to generate the page: 0.02844 seconds
|