Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Finally got it Smile And it is not really BLITZ related... it is much more complicated Smile

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 Wink ):
//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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Previous Topic: Error in Web Package example... for sockets
Next Topic: Static assertion
Goto Forum:
  


Current Time: Sun May 05 09:59:39 CEST 2024

Total time taken to generate the page: 0.02721 seconds