RE: [Plib-devel] PUI crash in Tuxkart.
Brought to you by:
sjbaker
|
From: Ben W. <be...@bg...> - 2000-10-02 13:55:01
|
Confess, never. Just kidding, I had a chance to look at this and
puOneShot.cxx has not been changed since feb, so Its not that, the pu.h file
has been changed alot, but I can't find any changes to the class
declarations. The only thing is the diff between 1.15 and 1.14, puOneShot
comes up in that list but they seem to be the same, almost as if the spacing
was changed or something like that.
Sorry John, this bugs up to you to find, I don't see anything that would
cause this.
Ben
> -----Original Message-----
> From: Steve Baker [mailto:sjb...@ai...]
> Sent: Sunday, October 01, 2000 5:15 PM
> To: PLIB-devel
> Subject: [Plib-devel] PUI crash in Tuxkart.
>
>
>
> One of the recent flurry of changes has broken PUI. I run TuxKart,
> (the current CVS version - which hasn't changed in months) and start
> one of the levels running, then hit 'SPACE' to bring up a menu
> and click on any of the entries. Instead of seeing the menu drop
> down, the program crashes:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x9ac in ?? ()
> Current language: auto; currently c
> (gdb) where
> #0 0x9ac in ?? ()
> #1 0x8088a74 in puOneShot::doHit (this=0x8362b70, button=0,
> updown=0, x=28, y=15) at puOneShot.cxx:6
> #2 0x80889fd in puObject::checkHit (this=0x8362b70,
> button=0, updown=0, x=28, y=15) at puObject.cxx:223
> #3 0x8087088 in puGroup::checkHit (this=0x83629b0, button=0,
> updown=0, x=28, y=459) at puGroup.cxx:140
> #4 0x8087088 in puGroup::checkHit (this=0x8134460, button=0,
> updown=0, x=28, y=459) at puGroup.cxx:140
> #5 0x8086332 in puMouse (button=0, updown=0, x=28, y=21) at
> pu.cxx:362
> #6 0x8050313 in mousefn (button=0, updown=0, x=28, y=21) at
> gui.cxx:39
> #7 0x40024d72 in processEventsAndTimeouts () at glut_event.c:646
> #8 0x4023ea5e in __libc_start_main () at
> ../sysdeps/generic/libc-start.c:93
>
> It looks like the 'this' in that puOneShot::doHit call must
> be screwed up somehow...I don't see
> how.
>
> (gdb) print *((class puOneShot *)this)
> $1 = {<puButton> = {<puObject> = {<puValue> = {type = 195,
> integer = 0, floater = 0,
> string = '\000' <repeats 79 times>, res_integer = 0x0,
> res_floater = 0x0, res_string = 0x0,
> _vptr. = 0x80a4a00}, default_value = {type = 0, integer
> = 0, floater = 0,
> string =
> "a\001\000\000\\\00000\0004a00\00079Q\001\000\000es>\000I\001"
> , '\000' <repeats 53 times>,
> res_integer = 0x0, res_floater = 0x0, res_string = 0x0,
> _vptr. = 0x0}, bbox = {min = {0, 0}, max = {
> 249, 0}}, abox = {min = {0, 0}, max = {0, 0}}, colour
> = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0,
> 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, parent = 0x0,
> active_mouse_edge = 0, style = 0, visible = 0,
> active = 0, highlighted = 0, am_default = 0, window = 0,
> label = 0x0, labelFont = {
> glut_font_handle = 0x0, fnt_font_handle = 0x0,
> pointsize = 0, slant = 0}, labelPlace = 0,
> legend = 0x0, legendFont = {glut_font_handle = 0x0,
> fnt_font_handle = 0x0, pointsize = 0, slant = 0},
> user_data = 0x0, cb = 0, active_cb = 0, down_cb = 0, r_cb
> = 0, render_data = 0x0, next = 0x0,
> prev = 0x0}, <No data fields>}, <No data fields>}
>
>
> The 'type' field looks OK,
> 195==(PUCLASS_ONESHOT|PUCLASS_BUTTON|PUCLASS_OBJECT|PUCLASS_VALUE),
> but all of it's colours are {0,0,0,0}, it's parent pointer is
> zero, etc. It has no label or
> legend.
>
> This is pretty strange because the only place a puOneShot is
> created is in puMenuBar::add_submenu,
> where it creates the very thing I was clicking on when the
> program crashed (which is what we expect)
> - and in there it is constructed with a label and sensible colours.
>
> However, the button I was clicking on was displayed correctly
> with text and sensible colours.
>
> I ran this a second time and got this:
>
> (gdb) print *((class puOneShot *)this)
> $1 = {<puButton> = {<puObject> = {<puValue> = {type = 195,
> integer = 0, floater = 0,
> string = "\000ÿ\177\177\177\177", '\000' <repeats 14
> times>,
> "\177\177ÿÿ¿¿\000\000\000\000??ÿÿ\177\177\000\000\000\000\000\
> 000ÿÿ\177\177\000\000\000\000\000\000ÿÿÿÿ\000\000\000\000ÿÿÿÿ"
> , '\000' <repeats 14 times>, "\177\177", res_integer = 0x0,
> res_floater = 0x0, res_string = 0x0, _vptr. = 0x80a4a60},
> default_value = {type = 0, integer = 0, floater = 0,
> string =
> "1\000\000\000X,\006\tf,\006\tOSF00010101//\000ISO-10646/UCS2/
> \000\000\000\000\000\000\000\031\000\000\000P,\006\tÈ,\006\t",
> '\000' <repeats 12 times>, "1\000\000\000 ,\006\t",
> res_integer = 0x9062cae, res_floater = 0x3046534f,
> res_string = 0x30313030 <Address 0x30313030 out of
> bounds>, _vptr. = 0x2f303031}, bbox = {min = {
> 1397293103, 808529231}, max = {792081462,
> 844317525}}, abox = {min = {47, 0}, max = {25,
> 151399576}}, colour = {{0, 0, 1.40129846e-45, 0},
> {3.50324616e-44, 1.62601579e-33, 0, 0}, {
> 1.40129846e-45, 0, 2.38220739e-44, 1.60645409e-33},
> {1.53081397e-33, 2.24207754e-44,
> 3.36311631e-44, 1.52848428e-33}, {1.62619505e-33,
> 1.62331656e-33, 0, 0}}, parent = 0x19,
> active_mouse_edge = 150845352, style = 0, visible = 0,
> active = 0, highlighted = 0, am_default = 25,
> window = 150845448, label = 0x9057350 <Address
> 0x9057350 out of bounds>, labelFont = {
> glut_font_handle = 0x8fd23e0, fnt_font_handle = 0x0,
> pointsize = 0, slant = 3.50324616e-44},
> labelPlace = 150831872, legend = 0x862d070 "",
> legendFont = {glut_font_handle = 0x906abf0,
> fnt_font_handle = 0x0, pointsize = 0, slant =
> 3.50324616e-44}, user_data = 0x8fbf908,
> cb = 0x9062f40, active_cb = 0x9057080, down_cb = 0,
> r_cb = 0, render_data = 0x19, next = 0x8fd89e0,
> prev = 0x902c230}, <No data fields>}, <No data fields>}
>
>
> So it's pretty evident that the PUI tree is getting corrupted
> somewhere between displaying it and
> calling the doHit routine.
>
> Does anyone want to confess anything?
>
> --
> Steve Baker HomeEmail: <sjb...@ai...>
> WorkEmail: <sj...@li...>
> HomePage : http://web2.airmail.net/sjbaker1
> Projects : http://plib.sourceforge.net
> http://tuxaqfh.sourceforge.net
> http://tuxkart.sourceforge.net
> http://prettypoly.sourceforge.net
>
>
> _______________________________________________
> plib-devel mailing list
> pli...@li...
> http://lists.sourceforge.net/mailman/listinfo/plib-devel
>
|