From: David Y. <hob...@gm...> - 2006-08-19 05:56:30
Attachments:
tuxmath-dmy_cleanexit-topatch.patch
|
Dave & All, Thanks for the great program! I just got a binary of a year old with Ubuntu, and wanted to slow things down a bit for a less advanced kiddo. I downloaded the latest from svn, and it was already there. I noticed that if I am running fullscreen and exit due to a failure to load images, the screen resolution stays at 640x480. It's easy enough to change it back, but annoying. So, I modified the exit on errors to cleanup a bit better. Now error exits in setup.c call SDL_Quit and the other heap cleanup that was already present on a normal exit. Except the first error exit because no heap space allocation or SDL calls have been made at that point. I made the assumption that if exiting due to an error, you wouldn't want to save the options to the configuration file. David |
From: Holger L. <de...@la...> - 2006-08-19 09:04:00
|
Hi David, On Saturday 19 August 2006 07:56, David Yoder wrote: > I noticed that if I am running fullscreen and exit due to a failure to lo= ad > images, the screen resolution stays at 640x480. It's easy enough to change > it back, but annoying. > > So, I modified the exit on errors to cleanup a bit better. Now error exits > in setup.c call SDL_Quit and the other heap cleanup that was already > present on a normal exit. Except the first error exit because no heap spa= ce > allocation or SDL calls have been made at that point. > > I made the assumption that if exiting due to an error, you wouldn't want = to > save the options to the configuration file. Great! Thanks a lot! Do you think you could "port" this patch to tuxtype as well? It has the sam= e=20 problem, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D217448 regards, Holger |
From: David B. <db...@ta...> - 2006-08-19 11:03:52
|
Dear David, On Saturday 19 August 2006 01:56, David Yoder wrote: > Dave & All, > > Thanks for the great program! > > I just got a binary of a year old with Ubuntu, and wanted to slow things > down a bit for a less advanced kiddo. I downloaded the latest from svn, and > it was already there. > > I noticed that if I am running fullscreen and exit due to a failure to load > images, the screen resolution stays at 640x480. It's easy enough to change > it back, but annoying. > > So, I modified the exit on errors to cleanup a bit better. Now error exits > in setup.c call SDL_Quit and the other heap cleanup that was already > present on a normal exit. Except the first error exit because no heap space > allocation or SDL calls have been made at that point. > > I made the assumption that if exiting due to an error, you wouldn't want to > save the options to the configuration file. > > > David Thanks! It will be in svn with my next commit. -- David Bruce |
From: David Y. <hob...@gm...> - 2006-08-20 01:50:37
|
Holger, I couldn't find a working tuxtype list, so I'll just post here. The fix I made to tuxmath is already present (perhaps in a more elegant way) in tuxtype. That is, calling SDL_Quit for all exits. In tuxtype it is done with atexit(). The bug report stated it was found in 1.0-4. I looked all the way back to CVS Tag 0.9 on the sourceforge CVS repository, and the same atexit(SDL_Quit) method is used everywhere I look. The version I installed with Ubuntu Dapper, 1.0, is working correctly (switches to a different resolution fullscreen, then switches back at exit). Just to be sure I got the latest source of tuxtype2 from https://svn.tux4kids.net/tuxtype/ and compiled. It exited normally with <esc> and quit menu and by moving the images directory to cause an error exit. Being Dapper, my DSL libraries are newer than reported in the bug. And I don't have a clue what other than the X server is in the chain to change X resolution. So I'm not reproducing the exact case. But at least the problem doesn't seem to be in tuxtype. In summary I couldn't reproduce the bug. I don't know what Debian's policies are on closing bugs that can't be reproduced (and are 3 years old). David On 8/19/06, Holger Levsen <de...@la...> wrote: > > Hi David, > > On Saturday 19 August 2006 07:56, David Yoder wrote: > > I noticed that if I am running fullscreen and exit due to a failure to > load > > images, the screen resolution stays at 640x480. It's easy enough to > change > > it back, but annoying. > > > > So, I modified the exit on errors to cleanup a bit better. Now error > exits > > in setup.c call SDL_Quit and the other heap cleanup that was already > > present on a normal exit. Except the first error exit because no heap > space > > allocation or SDL calls have been made at that point. > > > > I made the assumption that if exiting due to an error, you wouldn't want > to > > save the options to the configuration file. > > Great! Thanks a lot! > > Do you think you could "port" this patch to tuxtype as well? It has the > same > problem, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=217448 > > > regards, > Holger > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > Tuxmath-devel mailing list > Tux...@li... > https://lists.sourceforge.net/lists/listinfo/tuxmath-devel > > > > |
From: Holger L. <de...@la...> - 2006-08-21 14:10:48
|
Hi, On Sunday 20 August 2006 03:50, David Yoder wrote: > I couldn't find a working tuxtype list, so I'll just post here. rights, it's down atm, I need to write mail about that... > The fix I made to tuxmath is already present (perhaps in a more elegant > way) in tuxtype. That is, calling SDL_Quit for all exits. In tuxtype it is > done with atexit(). The bug report stated it was found in 1.0-4. I looked > all the way back to CVS Tag 0.9 on the sourceforge CVS repository, and the > same atexit(SDL_Quit) method is used everywhere I look. Strange. I definitly had it happening with a recent version from svn - and = I=20 know there where no relevant changes in svn since them. > The version I installed with Ubuntu Dapper, 1.0, is working correctly > (switches to a different resolution fullscreen, then switches back at > exit). Sometimes upon exit (also regular ones) the screen resolution is wrong. > Being Dapper, my DSL libraries are newer than reported in the bug. And I > don't have a clue what other than the X server is in the chain to change X > resolution. So I'm not reproducing the exact case. But at least the probl= em > doesn't seem to be in tuxtype. Though the last time it happened, it was with xfree86, not with xorg... > In summary I couldn't reproduce the bug. I don't know what Debian's > policies are on closing bugs that can't be reproduced (and are 3 years > old). As I could "reproduce" it (it just happens randomly, yay) recently, I won't= =20 close this one. regards & thanks anyway! Holger |
From: David Y. <hob...@gm...> - 2006-08-22 03:50:57
|
On 8/21/06, Holger Levsen <de...@la... > wrote: > > > As I could "reproduce" it (it just happens randomly, yay) recently, I > won't > close this one. > You didn't _say_ it was intermittent ;) I pounded on keys for a while and can reliably reproduce a failure. By pressing <esc> even once while the title screen ( standby.png) is showing or while the menu screen is animating together, it segfaults. Sometimes I get: Fatal signal: Segmentation Fault (SDL Parachute Deployed) and X is returned to normal. Sometimes I get just a segfault message: Segmentation fault and X is pretty borked. Not just the resolution. The mouse is also unresponsive. A <ctrl><alt><bksp> restores things. The ratio of segfault with borked X to without borked X is 1:3 - 1:5 in my very small sample. I haven't seen it fail the first time. I am using: Version: 1.0-5ubuntu on my nice shiny Dapper install with X.org xserver-xorg version 7.0.0-0ubuntu45. Latest in svn branches/tuxtype1 on my nice shiny Dapper install with X.orgxserver-xorg version 7.0.0-0ubuntu45. Version: 1.0-4 on my older Debian install with XFree86 xserver-xfree86 version 6.9.0.dsfg.1-4. FWIW, these boxes both use nvidia 5200 cards with nvidia binary drivers. A couple of interesting things 1) The latest tuxtype from svn trunk/tuxtype does not exhibit this failure 2) tuxmath does not exhibit this failure 3) I managed to catch it in gdb. It seems to be failing when the menu screen is being written. Specifically when the tux animation is drawn. (gdb) run ... 0x08055efb in TitleScreen (verbose=200) at graphics.c:828 828 SDL_BlitSurface(Tux[tux_frame], NULL, screen, &Tuxdest); (gdb) Fatal signal: Segmentation Fault (SDL Parachute Deployed) ... A little closer. David |
From: David Y. <hob...@gm...> - 2006-08-23 04:30:28
|
On 8/21/06, David Yoder <hob...@gm...> wrote: > > 828 SDL_BlitSurface(Tux[tux_frame], NULL, screen, > &Tuxdest); > (gdb) Fatal signal: Segmentation Fault (SDL Parachute Deployed) > Indeed the problem was there. tux_frame was not getting set for the path through the code in which <esc> is pressed before animation is done. I just initialized tux_frame. David tuxtype-dmysegfault.patch ==================== diff -urN tuxtype/branches/tuxtype1/tuxtype/graphics.c tuxtype-dmysegfault/branches/tuxtype1/tuxtype/graphics.c --- tuxtype/branches/tuxtype1/tuxtype/graphics.c 2006-08-22 23:06: 37.000000000 -0500 +++ tuxtype-dmysegfault/branches/tuxtype1/tuxtype/graphics.c 2006-08-22 23:06:13.000000000 -0500 @@ -329,7 +329,7 @@ back_h; int i, j, - tux_frame; + tux_frame = 1; int x = 0; int y = 0; int dirx = 1; |
From: Holger L. <de...@la...> - 2006-10-08 12:27:18
|
Hi, On Wednesday 23 August 2006 06:30, David Yoder wrote: > Indeed the problem was there. tux_frame was not getting set for the path > through the code in which <esc> is pressed before animation is done. I ju= st > initialized tux_frame. Hm. You only saw this problem in the old tuxtype package (1.0.5 from dapper= ),=20 but not with the 1.5.4 from testing? Cause I know I have seen this problem= =20 there, even though your fix also is there. > diff -urN tuxtype/branches/tuxtype1/tuxtype/graphics.c > tuxtype-dmysegfault/branches/tuxtype1/tuxtype/graphics.c > --- tuxtype/branches/tuxtype1/tuxtype/graphics.c 2006-08-22 23:06: > 37.000000000 -0500 > +++ tuxtype-dmysegfault/branches/tuxtype1/tuxtype/graphics.c 2006-08-22 > 23:06:13.000000000 -0500 > @@ -329,7 +329,7 @@ > back_h; > int i, > j, > - tux_frame; > + tux_frame =3D 1; > int x =3D 0; > int y =3D 0; > int dirx =3D 1; This has been done in tuxtype/titlescreen.c now. $ grep tux_frame tuxtype/trunk/tuxtype/titlescreen.c=20 int i, j, tux_frame =3D 0; tux_frame =3D 0; case 0: tux_frame =3D 1; break; case TUX1: tux_frame =3D 2; break; case TUX2: tux_frame =3D 3; break; case TUX3: tux_frame =3D 4; break; case TUX4: tux_frame =3D 3; break; case TUX5: tux_frame =3D 2; break; There must be something else triggering the bug,=20 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D217448 regards, Holger |
From: Holger L. <de...@la...> - 2006-08-23 09:20:52
|
Hi David, On Wednesday 23 August 2006 06:30, David Yoder wrote: > Indeed the problem was there. tux_frame was not getting set for the path > through the code in which <esc> is pressed before animation is done. I ju= st > initialized tux_frame. w00t! Thank you! I won't have time to test this (I guess you did...?) until next week, but i= t's=20 great to have it :) regards, Holger |
From: David Y. <hob...@gm...> - 2006-08-23 13:41:31
|
On 8/23/06, Holger Levsen <de...@la...> wrote: > > > > I won't have time to test this (I guess you did...?)... Glad to help :) Yea, forgot to say: I tested it on Ubuntu Dapper using full screen and window mode. (The segfault was present in window mode, even though it didn't cause X problems.) David |