pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rain splash causes segmentation fault


From: Gervase Lam
Subject: Rain splash causes segmentation fault
Date: Wed, 9 Apr 2003 22:28:22 +0100

> Date: Wed, 12 Mar 2003 18:56:04 +0100
> From: David Philippi <address@hidden>
> Subject: Re: Change gravity [Was: Movers and Colliders for Fallers]

> On Wednesday 12 March 2003 02:34, Gervase Lam wrote:
> > I was going to look into this after sorting out a segmentation fault I
> > found when using the "blockers-timpany-tutorial.xml" level.  This
> > happe=
>
> ns
>
> > whenever a rain splash is displayed by the Rain particle code.  I was
> > going to find out how to get gdb to print out a full frame info (i.e.
> > backtrace) because I've forgotten how to do it.
>
> I've worked on the rain code so I'm interested in this problem.
> For me the level is raining and snowing like it should, I think it's
> even= a=20
> level I used to test the new code with.

Managed to get back on to this problem.  And it is really puzzling me.  
The frame info I got from gdb is: 

#0  SubBlitter_Transparent<unsigned>::blt_noclip(CL_Blit_Transparent*, 
CL_Target*, int, int, int) (parent=0x883f410,
    target=0x5, x=1084377612, y=361, spr_no=1) at 
Sources/Display/Display/Generic/blit_transparent.cpp:296
#1  0x401caf4d in CL_Blit_Transparent::blt_noclip(CL_Target*, int, int, 
int) (this=0x883f410, target=0x83c9958,
    x=611, y=361, spr_no=1) at 
Sources/Display/Display/Generic/blit_transparent.cpp:373
#2  0x401cbf6e in CL_CardSurface_Blitter::put_screen(int, int, int, 
CL_Target*) (this=0x8848cd8, x=611, y=361,
    spr_no=1, target=0x83c9958) at 
Sources/Display/Display/Generic/blitters.h:164
#3  0x401dbdfc in CL_Surface_Generic::put_screen(int, int, int, 
CL_DisplayCard*) (this=0x8438bd8, x=611, y=0,
    spr_no=1, card=0x0) at 
Sources/Display/Display/Generic/surface_generic.cpp:260
#4  0x401da015 in CL_Surface::put_screen(int, int, int, CL_DisplayCard*) 
(this=0x40a24a0c, x=611, y=361, spr_no=1,
    card=0x0) at Sources/Display/Display/Generic/surface.cpp:170
#5  0x0810edb2 in DisplayGraphicContext::draw(CL_Surface&, int, int, int) 
(this=0x86a8378, address@hidden, x_pos=611,
    y_pos=361, frame=1) at display_graphic_context.cxx:222
#6  0x0810ebc5 in DisplayGraphicContext::draw(CL_Surface&, Vector const&, 
int) (this=0x86a8378, address@hidden,
    address@hidden, frame=1) at display_graphic_context.cxx:198
#7  0x081019eb in Particles::RainParticleHolder::draw(GraphicContext&) 
(this=0x8437fe8, address@hidden)
    at /usr/include/g++-v3/bits/stl_iterator.h:481
#8  0x080a61cb in World::draw(GraphicContext&) (this=0x8410ae8, 
address@hidden)
    at /usr/include/g++-v3/bits/stl_iterator.h:478
#9  0x080a5050 in View::draw() (this=0x86a8378) at view.cxx:65
#10 0x0808703e in Playfield::draw(GraphicContext&) (this=0x86a8d90, 
address@hidden)
    at /usr/include/g++-v3/bits/stl_iterator.h:478
#11 0x0810f8bd in GUI::GUIManager::draw(GraphicContext&) (this=0x8675a40, 
address@hidden)
    at /usr/include/g++-v3/bits/stl_iterator.h:478
#12 0x08110052 in GUIScreen::draw(GraphicContext&) (this=0x869e0d0, 
address@hidden) at gui_screen.cxx:42
#13 0x0805d216 in Client::draw(GraphicContext&) (this=0x869e0d0, 
address@hidden) at client.cxx:343
#14 0x0806b500 in PingusGameSession::draw(GraphicContext&) 
(this=0x83ff730, address@hidden) at game_session.cxx:91
#15 0x08110c72 in ScreenManager::display() (this=0x83c9318) at 
screen_ptr.hxx:87
#16 0x08081ab7 in PingusMain::start_game() (this=0x8260e54) at 
pingus_main.cxx:755
#17 0x08082333 in PingusMain::main(int, char**) (this=0x8260e40, argc=7, 
argv=0xbffff754) at pingus_main.cxx:793
#18 0x4025e04d in main (argc=7, argv=0xbffff754) at 
Sources/Application/Unix/clanapp.cpp:32
#19 0x40483280 in __libc_start_main () from /lib/libc.so.6

Notice x and target in #0 and #1.  CL_Blit_Transparent::blt_noclip() 
passes x and target directly into 
SubBlitter_Transparent<unsigned>::blt_noclip().  The variables are not 
used in any way or manipulate at all in CL_Blit_Transparent::blt_noclip().

I even used gdb to step through the portion of code.  x and target are OK 
immediately before stepping into 
SubBlitter_Transparent<unsigned>::blt_noclip().  But as soon as the 
function is entered, the values are corrupted!

I think this is strongly connected with the line of code that causes the 
segmentation fault, even though the line uses neither x or target.  I 
think the function is corruptly compiled.

Even changing the compiler used from g++ 3.0.4 to g++ 2.96, I still get 
the same problem.

What should I do next?  May be I should wait for Pingus to be upgraded to 
ClanLib 0.7.

Thanks,
Gervase.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]