Bug 205847 - a segfault with backtrace
a segfault with backtrace
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: manaworld (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Wart
Fedora Extras Quality Assurance
:
Depends On: 207167
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-08 19:28 EDT by Patrice Dumas
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-14 23:48:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Check for null graphics before drawing (574 bytes, patch)
2006-09-12 19:43 EDT, Wart
no flags Details | Diff

  None (edit)
Description Patrice Dumas 2006-09-08 19:28:53 EDT
Description of problem:

It isn't easily reproducible, but I got 2 segfaults
when walking. After the first one I started tmw in gdb, 
and got a backtrace.


Graphics::drawImage (this=0x83cc478, image=0x0, x=32, y=672)
    at graphics.cpp:123
123         return drawImage(image, 0, 0, x, y, image->mBounds.w, image->mBounds.h);
(gdb) bt
#0  Graphics::drawImage (this=0x83cc478, image=0x0, x=32, y=672)
    at graphics.cpp:123
#1  0x080e678a in Map::draw (this=0x854aab0, graphics=0x83cc478, scrollX=2784, 
    scrollY=1600, layer=1) at map.cpp:156
#2  0x080d74c4 in Engine::draw (this=0x85150d0, graphics=0x83cc478)
    at engine.cpp:203
#3  0x080dd0ea in Game::logic (this=0x83b9bc0) at game.cpp:377
#4  0x080e53d9 in main (argc=135222696, argv=0xbf962994) at main.cpp:665
#5  0x00a24f2c in __libc_start_main () from /lib/libc.so.6
#6  0x08055541 in _start ()


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Wart 2006-09-12 12:53:12 EDT
According to upstream's message boards, this is caused by a missing graphics
file.  Apparently a handful of the graphics files don't get installed with 'make
install'.

I'll try to track down the missing files and make sure they get installed.
Comment 2 Wart 2006-09-12 15:02:37 EDT
Can you look in your ~/.tmw/tmw.log file to see if it mentions which graphic
resource caused the seg fault?  You might have to reproduce the crash to get
this information.

In the meantime, I'm working on a small patch that will avoid trying to draw
these missing graphics.
Comment 3 Patrice Dumas 2006-09-12 19:15:22 EDT
I got it once more. The latest line of tmw.log is:
[23:09:24] Warning: Sprite #-1 does not exist in this spriteset
Comment 4 Wart 2006-09-12 19:42:20 EDT
I have a new package that should prevent this particular 'missing graphic' crash
in the future.  Can you test the following package and let me know if it fixes
the problem?  If it does then I'll push an update to FC5 and FC6.

http://www.kobold.org/~wart/fedora/manaworld-0.0.20-2.fc6.1.i386.rpm
Comment 5 Wart 2006-09-12 19:43:03 EDT
Created attachment 136124 [details]
Check for null graphics before drawing
Comment 6 Patrice Dumas 2006-09-13 03:17:27 EDT
(In reply to comment #4)
> I have a new package that should prevent this particular 'missing graphic' crash
> in the future.  Can you test the following package and let me know if it fixes
> the problem?  If it does then I'll push an update to FC5 and FC6.

I won't know if it fixes the problem, since it happens very irregularly.
You should output something in the consosle tmw is launched from 
when the condition is encountered, or I won't be able to know if 
the code has been reached... It would certainly also help if the error
message is more explicit about the missing resource...

I'll test your rpm anyway.

Comment 7 Patrice Dumas 2006-09-13 04:37:06 EDT
(In reply to comment #4)

> http://www.kobold.org/~wart/fedora/manaworld-0.0.20-2.fc6.1.i386.rpm

I couldn't find the associated debuginfo package, I think it could 
be usefull...
Comment 8 Patrice Dumas 2006-09-18 17:33:02 EDT
I got a crash, but without segfault, and an error message
appearing on the console:

Error: Animation: Could not find graphics/sprites/item008.xml!

Is it the same bug or should I fill another one? 

Otherwise it is the first time tmw from the rpm you provided
crashed (except when hit by Bug #206213), although I've used it
since you published it.
Comment 9 Wart 2006-09-19 15:39:02 EDT
(In reply to comment #8)
> I got a crash, but without segfault, and an error message
> appearing on the console:
> 
> Error: Animation: Could not find graphics/sprites/item008.xml!
> 
> Is it the same bug or should I fill another one? 

It's different, but I'll file a follow up on this new issue:

manaworld just releated 0.0.21, and upgraded their central server to require
this 0.0.21 upgrade.  This also requires an upgrade to guichan, which may pose
additional problems for other dependent packages.  This bug might be fixed by
the 0.0.21 update, but we'll have to verify once the 0.0.21 update is pushed to
Fedora.
Comment 10 Wart 2006-10-14 23:48:55 EDT
I've just updated manaworld to 0.0.21 which should fix this problem.  Please
reopen this bug if the problem is still not fixed after the update.

Note You need to log in before you can comment on or make changes to this bug.