bugCrack Attack! - Bugs: bug #15821, freeglut ERROR: Function...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #15821: freeglut ERROR: Function <glutDestroyWindow> called without first calling 'glutInit'.

Submitted by:  Simon Lanzmich <silan>
Submitted on:  Mon 20 Feb 2006 09:16:48 PM UTC  
 
Category: generalSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Bjørn Lindeijer <b_lindeijer>
Open/Closed: ClosedOperating System: GNU/Linux

Fri 11 Aug 2006 11:26:46 PM UTC, comment #3:

The call to this function has been removed, since the window is already being cleaned up automatically once the program exits.

Bjørn Lindeijer <b_lindeijer>
Project MemberIn charge of this item.
Fri 21 Jul 2006 11:17:13 AM UTC, comment #2:

Hmm, it seems this function call wasn't there in version 1.1.10. This raises the question as to why it was added? I tracked down the commit to revision 1.3:

http://cvs.savannah.nongnu.org/viewcvs/crack-attack/src/Displayer.cxx?r1=1.2&r2=1.3&root=crack-attack

So it seems it was added as part of support for the gtk-gui.

Bjørn Lindeijer <b_lindeijer>
Project MemberIn charge of this item.
Fri 21 Jul 2006 09:53:36 AM UTC, comment #1:

It seems to me that the call to glutDestroyWindow should simply be removed. A piece of the backtrace leading to this call when closing the window:

#1 0x08057f80 in MetaState::programEnd () at MetaState.cxx:87
#2 0xb7b24030 in exit () from /lib/libc.so.6
#3 0xb7e32bfe in glutMainLoopEvent () from /usr/lib/libglut.so.3
#4 0xb7e32c6e in glutMainLoop () from /usr/lib/libglut.so.3
#5 0x0804c5fd in main (argc=2, argv=Cannot access memory at address 0x63) at Attack.cxx:88

Since exit() is already called we should no longer call any GLUT routines. From the manual: "GLUT will exit the program unilaterally when fatal errors occur or when the window system requests the program to terminate. For this reason, avoid calling any GLUT routines within an exit callback." Pressing ESC to close the game also ends up doing an exit() call, and GLUT will clean up the window for us automatically.

Bjørn Lindeijer <b_lindeijer>
Project MemberIn charge of this item.
Mon 20 Feb 2006 09:16:48 PM UTC, original submission:

Yesterday, I tried to compite crack-attack on Fedora Rawhide (x86_64). While it seemed to compile ok, the game first did not want to start; the problem seems to be the same as described in http://lists.gnu.org/archive/html/crack-attack-devel/2005-11/msg00007.html

The patch mentionend in that mail makes crack-attack start again without giving the error, however, one problem remains:

If I start the game with the '--solo' option, it gives the following error when I close the window:

freeglut ERROR: Function <glutDestroyWindow> called without first calling 'glutInit'.

When I run the program without the '--solo' option and then start a solo game, I don't get this error when I close the window.
However, if I close the nice gtk opening screen unsing the X button from the window manager (the close button works!), the game does not close correctly (the window is gone, but the process is still there)

Simon Lanzmich <silan>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 11 Aug 2006 11:26:46 PM UTCb_lindeijerStatusConfirmed=>Fixed
  Open/ClosedOpen=>Closed
Fri 21 Jul 2006 09:53:36 AM UTCb_lindeijerStatusNone=>Confirmed
  Assigned toNone=>b_lindeijer

Back to the top


Powered by Savane 3.1-cleanup1