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++ Widgets - General questions or Mixed problems » [SOLVED] OpenGL reference example X11 crash
Re: [BUG] OpenGL reference example X11 crash [message #14413 is a reply to message #14388] Mon, 25 February 2008 20:18 Go to previous message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
I found the problem.

In X11DHCtrl.cpp in Init() class member UserVisualInfo is allocated on heap by calling custom visual info creation function in GLCtrl (CreateVisual()) that returns a pointer to the structure.

This structure is deleted in Init() (from line 156 on) right after using it, but it has to live until it is needed in GLCtrl::AfterInit() in X11GLCtrl.cpp line 111 by calling DHCtrl::GetVisualInfo().

A fix is delete lines 155 to 160 in X11DHCtrl.cpp:
	// Frees VisualInfo
    if (UserVisualInfo)
    {
        XFree( (char *)UserVisualInfo);
        UserVisualInfo = 0;
    }

and add it to DHCtrl destructor.

Of course, I don't know if that imposes any problems elsewhere.

Matthias
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: window resized has no CALLBACK?
Next Topic: OpenGL and continous animation
Goto Forum:
  


Current Time: Fri Jul 03 00:42:12 CEST 2020

Total time taken to generate the page: 0.01053 seconds