Home » Community » Newbie corner » OpenGL demo resulting in Fatal error, Heap leaks detected! error...
OpenGL demo resulting in Fatal error, Heap leaks detected! error... [message #48357] |
Mon, 26 June 2017 05:03 |
ptkacz
Messages: 89 Registered: March 2017
|
Member |
|
|
Hi Guys,
Upon bringing up TheIDE, I launch the OpenGL demo from the reference section.
Upon compiling the running the program, the program is launched followed by window popping up with the following message:
Fatal error
Heap leaks detected!
Upon selecting the, "okay" button, all windows are closed.
The issue appears to be happening on the win.Open():
GUI_APP_MAIN
{
Ctrl::GlobalBackPaint();
TopWindow win;
OpenGLExample gl;
gl.SetFrame(InsetFrame());
win.Add(gl.HSizePos(10, 10).VSizePos(10, 10));
win.Sizeable().Zoomable();
win.Open();
// win.Run();
}
Anyone have some code that works demoing a simple OpenGL program?
Peter
|
|
|
|
|
|
Re: OpenGL demo resulting in Fatal error, Heap leaks detected! error... [message #48389 is a reply to message #48357] |
Thu, 29 June 2017 05:13 |
ptkacz
Messages: 89 Registered: March 2017
|
Member |
|
|
Hi Klugier,
Just thinking that each copy of U++ should come with a AMD Threadripper!
I did a complete fresh install. Also before running make, I made the changes as recommended (below). The changes had no impact and the same error was encountered.
Peter
void Ctrl::UpdateArea0(SystemDraw& draw, const Rect& clip, int backpaint)
{
GuiLock __;
LTIMING("UpdateArea");
LLOG("========== UPDATE AREA " << UPP::Name(this) << " ==========");
// ExcludeDHCtrls(draw, GetRect().GetSize(), clip);
if(globalbackbuffer) {
CtrlPaint(draw, clip);
LLOG("========== END (TARGET IS BACKBUFFER)");
return;
}
// if(backpaint == FULLBACKPAINT || globalbackpaint/* && !hasdhctrl && !dynamic_cast<DHCtrl *>(this)*/) {
if(backpaint == FULLBACKPAINT || globalbackpaint && !hasdhctrl && !dynamic_cast<DHCtrl *>(this)) {
ShowRepaintRect(draw, clip, LtRed());
BackDraw bw;
bw.Create(draw, clip.GetSize());
bw.Offset(-clip.TopLeft());
bw.SetPaintingDraw(draw, clip.TopLeft());
CtrlPaint(bw, clip);
bw.Put(draw, clip.TopLeft());
LLOG("========== END (FULLBACKPAINT)");
return;
}
[Updated on: Thu, 29 June 2017 05:13] Report message to a moderator
|
|
|
|
Re: OpenGL demo resulting in Fatal error, Heap leaks detected! error... [message #48394 is a reply to message #48390] |
Fri, 30 June 2017 03:28 |
ptkacz
Messages: 89 Registered: March 2017
|
Member |
|
|
Regarding the AMD Threadripper, just some humor. I was thinking how much faster U++ would compile with one of those new processors.
As of operating system, I am making use of the following:
Linux Mint 18.1 Cinnamon 64 bit
Cinnamon Version 3.2.7
Linux Kernel 4.4.0-53-generic
I ran GDB against the program as was able to retrieve the following information:
(gdb) run
Starting program: /home/ptkacz/upp.out/reference/GCC.Debug.Debug_Full.Gui.Shared/GLDrawDemo
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffea54c700 (LWP 5026)]
[New Thread 0x7fffe9d4b700 (LWP 5027)]
The program 'GLDrawDemo' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
(Details: serial 3534 error_code 2 request_code 154 minor_code 3)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
/usr/bin/xmessage
Thread 1 "GLDrawDemo" received signal SIGSEGV, Segmentation fault.
0x00000000005636bb in Upp::Ctrl::PanicMsgBox (title=0x7a91be "Fatal error", text=0x7b2b7f "Heap leaks detected!")
at //home/ptkacz/upp/uppsrc/CtrlCore/GtkApp.cpp:56
56 __BREAK__;
(gdb) list
51 GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
52 GTK_BUTTONS_CLOSE, "%s: %s", title, text);
53 gtk_dialog_run(GTK_DIALOG (dialog));
54 gtk_widget_destroy(dialog);
55 }
56 __BREAK__;
57 }
58
59 void InitGtkApp(int argc, char **argv, const char **envptr)
60 {
(gdb)
|
|
|
|
|
|
Re: OpenGL demo resulting in Fatal error, Heap leaks detected! error... [message #48494 is a reply to message #48357] |
Mon, 10 July 2017 05:16 |
ptkacz
Messages: 89 Registered: March 2017
|
Member |
|
|
That seems pretty easy, but when I bring up the GLDrawDemo project, the only option that displays within the drop-down is, "GUI". Not other options list to select from.
When I click on the listed "GUI" option, a Main package configuration(s) dialog window lists with, GUI listing under the Flags heading. Appending a row the the list, and selecting the right selection triangle, a Configurations flags dialog window displays (see screen shot below).
How come the GUI X11 option didn't list for this project? How do I go about adding it, so that the project is correctly built?
|
|
|
Re: OpenGL demo resulting in Fatal error, Heap leaks detected! error... [message #48495 is a reply to message #48494] |
Mon, 10 July 2017 07:55 |
Oblivion
Messages: 1091 Registered: August 2007
|
Senior Contributor |
|
|
Hello ptkacz,
For GUI, select GUI from the "App style" options.
For X11, simply select the NOGTK option.
For any other -custom- flag you'd like to activate, you can type it into "Other flags" section,
For example, you can explicity specify X11 flag (instead of using NOGTK option) by typing X11 into "Other flags" section too.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Mon, 10 July 2017 08:03] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 07:59:17 CET 2024
Total time taken to generate the page: 0.01755 seconds
|