Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on drawing a miniature #78

Open
dougmencken opened this issue Jan 11, 2025 · 1 comment
Open

crash on drawing a miniature #78

dougmencken opened this issue Jan 11, 2025 · 1 comment

Comments

@dougmencken
Copy link
Owner

dougmencken commented Jan 11, 2025

When the room miniatures are on, the game crashes while drawing some rooms

(gdb) run --args --head-room=blacktooth5.xml

built room blacktooth4.xml
constructed Miniature( room "blacktooth4.xml", leftX=70, topY=-2, sizeOfTile=3 )
drawing two pixels at 95,40 and 94,40
Thread 13 "headoverheels" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee0006c0 (LWP 8985)]
0x0000555555587471 in allegro::Pict::drawPixelAt(int, int, AllegroColor) const () at WrappersAllegro.cpp:330
330	void Pict::drawPixelAt( int x, int y, AllegroColor color ) const
(gdb) bt
#0  0x0000555555587471 in allegro::Pict::drawPixelAt(int, int, AllegroColor) const () at WrappersAllegro.cpp:330
#1  0x000055555560a64d in Miniature::drawIsoTile (this=this@entry=0x7fffedfffbc0, where=..., x0=x0@entry=112, y0=y0@entry=13, tileX=tileX@entry=3, tileY=tileY@entry=6, color=..., 
    loX=false, loY=true, hiX=false, hiY=false) at Miniature.cpp:751
#2  0x000055555560afcc in Miniature::drawIsoTile (this=0x7fffedfffbc0, where=..., x0=112, y0=13, tileX=3, tileY=6, color=..., loX=false, loY=true, hiX=false, hiY=false)
    at Miniature.cpp:727
#3  Miniature::drawWestDoorOnMiniature (this=0x7fffedfffbc0, where=..., x0=112, y0=13, tilesX=4, tilesY=6, color=...) at Miniature.cpp:609
#4  0x0000555555610ec7 in Miniature::drawWestDoorOnMiniature (this=0x7fffedfffbc0, where=..., x0=112, y0=13, tilesX=4, tilesY=6, color=...)
    at /home/dougmencken/boo/source/Color.hpp:33
#5  Miniature::draw (this=this@entry=0x7fffedfffbc0) at Miniature.cpp:134
#6  0x00005555556178c5 in Isomot::updateMe (this=this@entry=0x5555556dbe48 <GameManager::instance+264>) at Isomot.cpp:258
#7  0x00005555555fe74c in GameManager::update (this=0x5555556dbd40 <GameManager::instance>) at GameManager.cpp:174
#8  0x00005555555feb6c in GameManager::begin (this=<optimized out>) at GameManager.cpp:139
#9  0x00005555555fec45 in GameManager::beginOrResume (pointerToBoolean=<optimized out>) at /home/dougmencken/boo/source/GameManager.hpp:49
#10 0x00007ffff76a1e2e in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
@dougmencken
Copy link
Owner Author

after 12bbd56 the backtrace turned out to be

Thread 13 "headoverheels" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee0006c0 (LWP 15327)]
0x00005555555885bf in draw_sprite (bmp=0x7fffd1eeff40, sprite=0x7fffd1fbe790, x=70, y=13) at /home/dougmencken/boo/_rootdir/allegro-4.4.3.1/include/allegro/inline/draw.inl:238
238	AL_INLINE(void, draw_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y),
(gdb) bt
#0  0x00005555555885bf in draw_sprite (bmp=0x7fffd1eeff40, sprite=0x7fffd1fbe790, x=70, y=13) at /home/dougmencken/boo/_rootdir/allegro-4.4.3.1/include/allegro/inline/draw.inl:238
#1  allegro::drawSprite (sprite=..., x=70, y=13) at WrappersAllegro.cpp:1741
#2  0x0000555555610c8c in Miniature::draw (this=0x7fffd1fbffe0) at Miniature.cpp:478
#3  0x000055555561850b in Isomot::updateMe (this=this@entry=0x5555556dde48 <GameManager::instance+264>) at Isomot.cpp:248
#4  0x00005555555fea4c in GameManager::update (this=0x5555556ddd40 <GameManager::instance>) at GameManager.cpp:174
#5  0x00005555555fee6c in GameManager::begin (this=<optimized out>) at GameManager.cpp:139
#6  0x00005555555fef45 in GameManager::beginOrResume (pointerToBoolean=<optimized out>) at /home/dougmencken/boo/source/GameManager.hpp:49
#7  0x00007ffff76a1e2e in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant