STR #1394

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]

STR #1394

Application:FLTK Library
Status:5 - New
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Summary:Adding GlWindow to a window after show() is called causes crash
Created By:greg.ercolano
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]

No files

Trouble Report Comments:

Post Text ]
Name/Time/Date Text top right image
#1 greg.ercolano
12:04 Aug 19, 2006
This is under fedora3, but might be under other OS's too.

-------- snip
#include <fltk/run.h>
#include <fltk/GlWindow.h>
#include <fltk/Window.h>
#include <fltk/gl.h>
class MyGlWindow : public fltk::GlWindow {
   void draw() {
       if (!valid())
           { valid(1); glLoadIdentity(); glViewport(0,0,w(),h()); }
      MyGlWindow(int x, int y, int w, int h) : fltk::GlWindow(x,y,w,h) { }
int main() {
   fltk::Window fig(400,400);
   fig.resizable(fig);;         // (A)
     MyGlWindow mygl(0,0,400,400);
   //;         // (B)
-------- snip

FLTK crashes if you uncomment (A), and comment (B).
It runs fine if you switch to comment (A) and *uncomment* (B).

So it seems if one tries to create the GL window after
calling show(), you'll get the crash. Hopefully it wouldn't
be a problem to do this, as I could see where one wants to dynamically
add a GlWindow to a Window, after the Window has been created and show()n. (See Herbert Egger's 8/18/06 post on fltk.opengl)
bottom left image   bottom right image

Return to Bugs & Features | Post Text | Post File ]


Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.