0.0.27 client crashes on startup

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
User avatar
igneus
Peon
Peon
Posts: 75
Joined: 22 Sep 2008, 16:15
Location: Kladno, Czech republic

0.0.27 client crashes on startup

Post by igneus » 11 Jan 2009, 19:16

I just built client version 0.0.27 from source. A small problem occured during compilation - compiler stopped at gui/updatewindow.cpp shouting that function SDL_GetError is used without previous declaration in utils/mutex.h . I added line
#include <SDL_error.h>
to mutex.h, compiler was satisfied and cca 30 minutes later finished compilation of new TMW client happily.

Unfortunatelly client crashes right at the start with following output:

tmw: resources/imageloader.cpp:68: virtual gcn::Color ProxyImage::getPixel(int, int): Assertion `mSDLImage' failed.
Unsuccessfully terminated. (SIGABRT)

Here is log (sorry, my web client Dillo doesn't seem to support html element used to attach files, so I paste content of the file directly.)

[18:03:57.87] Starting The Mana World Version 0.0.27
[18:03:57.87] Initializing SDL...
[18:03:58.06] Initializing resource manager...
[18:03:58.06] Adding to PhysicsFS: /home/igneus//.tmw
[18:03:58.07] Adding to PhysicsFS: data
[18:03:58.07] Adding to PhysicsFS: /home/igneus/dist/TMW//share/tmw/data
[18:03:58.08] Initializing configuration...
[18:03:58.16] Setting video mode 800x600 windowed
[18:03:58.46] Using video driver: x11
[18:03:58.46] Possible to create hardware surfaces: no
[18:03:58.46] Window manager available: yes
[18:03:58.46] Accelerated hardware to hardware blits: no
[18:03:58.46] Accelerated hardware to hardware colorkey blits: no
[18:03:58.46] Accelerated hardware to hardware alpha blits: no
[18:03:58.47] Accelerated software to hardware blits: no
[18:03:58.47] Accelerated software to hardware colorkey blits: no
[18:03:58.47] Accelerated software to hardware alpha blits: no
[18:03:58.47] Accelerated color fills: no
[18:03:58.47] Available video memory: 0
[18:03:58.48] Initializing GUI...
[18:03:58.49] Loaded data/graphics/gui/sansserif8.png

My question is? Is this a known case? Is it problem of my hardware or libraries?
main TMW character: nguma
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: 0.0.27 client crashes on startup

Post by Jaxad0127 » 11 Jan 2009, 20:13

Someone else reported that on IRC not too long ago. It was with a different image, but we never figured it out. Try the latest git instead.
Image
User avatar
igneus
Peon
Peon
Posts: 75
Joined: 22 Sep 2008, 16:15
Location: Kladno, Czech republic

Re: 0.0.27 client crashes on startup

Post by igneus » 13 Jan 2009, 21:01

Sorry for not responding - it takes a long time, because I had to build git and now I'm building tools needed to be able to create configure script (autotools on my system are a bit out of date...). I'll tell you later if I succeeded or not.
main TMW character: nguma
User avatar
igneus
Peon
Peon
Posts: 75
Joined: 22 Sep 2008, 16:15
Location: Kladno, Czech republic

Re: 0.0.27 client crashes on startup

Post by igneus » 14 Jan 2009, 10:34

Finally I'm compiling the latest git version of tmw client. Btw. the SDL_GetError problem in utils/mutex.h (when compiling gui/updatewindow.cpp) is still there!
main TMW character: nguma
User avatar
igneus
Peon
Peon
Posts: 75
Joined: 22 Sep 2008, 16:15
Location: Kladno, Czech republic

Re: 0.0.27 client crashes on startup

Post by igneus » 14 Jan 2009, 11:31

Latest git client crashes in the same way:

[igneus@vidhost tmw]$ ~/dist/TMW/bin/tmw
tmw: resources/imageloader.cpp:68: virtual gcn::Color ProxyImage::getPixel(int, int): Assertion `mSDLImage' failed.
Unsuccessfully terminated (SIGABRT)

log:

[10:28:08.86] The Mana World v0.1.0
[10:28:08.87] Initializing configuration...
[10:28:08.88] Initializing SDL...
[10:28:09.12] Initializing resource manager...
[10:28:09.14] Adding to PhysicsFS: /home/igneus//.tmw
[10:28:09.14] Adding to PhysicsFS: data
[10:28:09.15] Adding to PhysicsFS: /home/igneus/dist/TMW/share/tmw/data
[10:28:09.20] Setting video mode 800x600 windowed
[10:28:09.55] Using video driver: x11
[10:28:09.56] Possible to create hardware surfaces: no
[10:28:09.56] Window manager available: yes
[10:28:09.56] Accelerated hardware to hardware blits: no
[10:28:09.56] Accelerated hardware to hardware colorkey blits: no
[10:28:09.56] Accelerated hardware to hardware alpha blits: no
[10:28:09.56] Accelerated software to hardware blits: no
[10:28:09.56] Accelerated software to hardware colorkey blits: no
[10:28:09.56] Accelerated software to hardware alpha blits: no
[10:28:09.56] Accelerated color fills: no
[10:28:09.56] Available video memory: 0
[10:28:09.57] Initializing GUI...
[10:28:09.66] Loaded data/graphics/gui/hits_red.png

(Yes, I accidentally got client 0.1 instead of 0.0, but doesn't matter - it doesn't work and crashes in the same way!)
main TMW character: nguma
User avatar
igneus
Peon
Peon
Posts: 75
Joined: 22 Sep 2008, 16:15
Location: Kladno, Czech republic

Re: 0.0.27 client crashes on startup

Post by igneus » 15 Jan 2009, 01:48

Latest 0.0 client got from git crashes in the same way.
I compiled it with option -g in CPPFLAGS, so I'll play with gdb a bit and tell you if I find anything interesting :)
Here is log:

[00:42:19.72] Starting The Mana World Version 0.0.27
[00:42:19.73] Initializing SDL...
[00:42:20.49] Initializing resource manager...
[00:42:20.56] Adding to PhysicsFS: /home/igneus//.tmw
[00:42:20.56] Adding to PhysicsFS: data
[00:42:20.56] Error: File not found
[00:42:20.57] Adding to PhysicsFS: /home/igneus/dist/TMW/share/tmw/data
[00:42:20.62] Initializing configuration...
[00:42:20.81] Setting video mode 800x600 windowed
[00:42:21.50] Using video driver: x11
[00:42:21.50] Possible to create hardware surfaces: no
[00:42:21.50] Window manager available: yes
[00:42:21.50] Accelerated hardware to hardware blits: no
[00:42:21.50] Accelerated hardware to hardware colorkey blits: no
[00:42:21.50] Accelerated hardware to hardware alpha blits: no
[00:42:21.50] Accelerated software to hardware blits: no
[00:42:21.51] Accelerated software to hardware colorkey blits: no
[00:42:21.51] Accelerated software to hardware alpha blits: no
[00:42:21.51] Accelerated color fills: no
[00:42:21.51] Available video memory: 0
[00:42:21.51] Initializing GUI...
[00:42:21.72] Loaded /home/igneus/dist/TMW/share/tmw/data/graphics/gui/rpgfont_wider.png
main TMW character: nguma
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: 0.0.27 client crashes on startup

Post by Jaxad0127 » 15 Jan 2009, 02:53

Try toggling OpenGL.
Image
User avatar
igneus
Peon
Peon
Posts: 75
Joined: 22 Sep 2008, 16:15
Location: Kladno, Czech republic

Re: 0.0.27 client crashes on startup

Post by igneus » 15 Jan 2009, 10:27

I tried to switch OpenGL off in my configuration file:

~/.tmw/config.xml:

<config>
<option name="opengl" value="0" />
</config>

In log I found following message:

[09:17:39.65] Initializing configuration...
[09:17:39.67] Warning: No configuration file (/home/igneus/.tmw/config.xml)

After some experimenting I found out that config is found, but probably can't be parsed. Because page about config on the wiki is a bit sparse (lists all options, but doesn't describe how to write the file - at least notice should be added, that root element is called "configuration" and option looks like <option name="xxx" value="yyy" />), I looked at configuration.cpp and found that root element is called "configuration" and not "config". I ran TMW again, warning disappeared, but crash remains. Should I try to recompile without OpenGL support?
main TMW character: nguma
User avatar
crazy
Peon
Peon
Posts: 43
Joined: 05 Aug 2008, 15:52

Re: 0.0.27 client crashes on startup

Post by crazy » 15 Jan 2009, 19:20

you have no need to open manual the config.xml since there is the "setup" button visible as client start

just push it put openGL then restart client
User avatar
igneus
Peon
Peon
Posts: 75
Joined: 22 Sep 2008, 16:15
Location: Kladno, Czech republic

Re: 0.0.27 client crashes on startup

Post by igneus » 15 Jan 2009, 19:57

Sorry, crazy, but I can't. I'm trying to resolve problem with client which doesn't start - it crashes long, long ago before any setup window starts to be useful... (You might want to read previous posts.)
main TMW character: nguma
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: 0.0.27 client crashes on startup

Post by Jaxad0127 » 15 Jan 2009, 20:02

crazy wrote:you have no need to open manual the config.xml since there is the "setup" button visible as client start

just push it put openGL then restart client
That's new in 0.0.27.
Image
User avatar
igneus
Peon
Peon
Posts: 75
Joined: 22 Sep 2008, 16:15
Location: Kladno, Czech republic

Re: 0.0.27 client crashes on startup

Post by igneus » 08 Feb 2009, 23:22

I haven't solved this problem yet, but here's an interesting objection:
When I delete the file reported to be loaded before the crash (in 0.0.28 it's hits_red.png), client still logs that it has been loaded.
So it could mean that there is something strange in PHYSFS_read()
(called in resources/resourcemanager.cpp, line 418 - it should load data of the file - in this case image - into a buffer).
I have PhysFS 1.1.0 (at least my physfs.h says that)
main TMW character: nguma
User avatar
igneus
Peon
Peon
Posts: 75
Joined: 22 Sep 2008, 16:15
Location: Kladno, Czech republic

Re: 0.0.27 client crashes on startup

Post by igneus » 16 Feb 2009, 15:48

I think I'm on a track of that bug. While working on ParticlEd, I discovered that it only occurs when something's being loaded by Guichan:
Particles etc., when created, ask ResourceManager to load an image for them abd everything is OK.
But when I create e.g. ImageFont, it uses another mechanism to load images, ImageLoader. ImageFont is created, but first time it's used somewhere, assertion fails in Image::drawImage (probably when drawing the first glyph).

Btw. what's the relation between gcn::Image and class Image defined in resources/image.* ? Is TMW's class Image (and other) somehow 'injected' into Guichan? (I should probably be able to find the answer myself, but I'm not.)
main TMW character: nguma
Post Reply