system hangs - any hints of how to get a stacktrace?

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

system hangs - any hints of how to get a stacktrace?

Post by Rhuvaen »

Hello,

I've been trying for a week now with several attempts to run a stable version of Wesnoth 0.8.2 on Redhat 9. The way a game of Wesnoth ends for me is usually because the whole system hangs (well the x server still allows me to move the mouse). I can't even get another console to the machine.

This happens in two different places:
1. the sound goes first, and then after some while the game hangs, usually when the turn changes
2. when a scenario is finished and the save replay or game dialogs happen

I'm compiling the game on my machine and tried several things:
- upgrading gcc to the latest 3.4.1
- editing the Makefile to use the -fno-omit-frame-pointer as suggested in the gcc problem sticky post
- switching to Wesnoth-Lite because the first cause of crash might be somehow related to sound

With the Wesnoth Lite, the system hung when I hit the quit button in the main menu.

Does anyone have an idea how to get more information (core dump or stack trace...) with a problem like this, when the system hangs? Or anyone who has experienced similar problems?

Note: my system runs extremely stable otherwise and I have not had this problem with any other application.

Thanks for any hints :)

Rhuvaen
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

What version of SDL you have?

- Miyo
cedric
Posts: 320
Joined: January 24th, 2004, 10:27 pm
Location: Rennes, France
Contact:

Re: system hangs - any hints of how to get a stacktrace?

Post by cedric »

Rhuvaen wrote:Does anyone have an idea how to get more information (core dump or stack trace...) with a problem like this, when the system hangs? Or anyone who has experienced similar problems?
When Wesnoth hangs, get his PID with ps.
Launch gdb, and type 'attach <pid>' (replace <pid> with appropriate value)
From there type 'bt' or 'bt full' to get a backtrace.

Alternatively, could you check if the attached patch helps?

--
Cedric
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

miyo wrote:What version of SDL you have?
SDL-1.2.7-1

Rhuvaen
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Re: system hangs - any hints of how to get a stacktrace?

Post by Rhuvaen »

cedric wrote: When Wesnoth hangs, get his PID with ps.
Launch gdb, and type 'attach <pid>' (replace <pid> with appropriate value)
From there type 'bt' or 'bt full' to get a backtrace.
What I mean is, when Wesnoth hangs, I need to restart my computer to get it to work again! :evil:

Rhuvaen
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Re: system hangs - any hints of how to get a stacktrace?

Post by Rhuvaen »

cedric wrote:Alternatively, could you check if the attached patch helps?
Oh, I currently have the "lite" version installed. Does that patch make sense then, too?

Rhuvaen
dms
Posts: 56
Joined: August 11th, 2004, 9:08 pm
Location: New Zealand

Post by dms »

When it hangs, can you ssh (or telnet) in from another computer? (Or does it not even respond to that?)
cedric
Posts: 320
Joined: January 24th, 2004, 10:27 pm
Location: Rennes, France
Contact:

Re: system hangs - any hints of how to get a stacktrace?

Post by cedric »

Rhuvaen wrote:
cedric wrote: When Wesnoth hangs, get his PID with ps.
Launch gdb, and type 'attach <pid>' (replace <pid> with appropriate value)
From there type 'bt' or 'bt full' to get a backtrace.
What I mean is, when Wesnoth hangs, I need to restart my computer to get it to work again! :evil:
If you can still get consoles, as you said, your system does not seem hanged very hard. ;)

Do you mean you run wesnoth in fullscreen and get stuck here when it hangs? Then run it in windowed mode, and only the wesnoth window will be frozen, and then you can try to get a backtrace.
Rhuvaen wrote:Oh, I currently have the "lite" version installed. Does that patch make sense then, too?
Yes, apply that to src/sound.cpp, and recompile.

--
Cedric
cedric
Posts: 320
Joined: January 24th, 2004, 10:27 pm
Location: Rennes, France
Contact:

Re: system hangs - any hints of how to get a stacktrace?

Post by cedric »

Rhuvaen wrote:
cedric wrote: When Wesnoth hangs, get his PID with ps.
Launch gdb, and type 'attach <pid>' (replace <pid> with appropriate value)
From there type 'bt' or 'bt full' to get a backtrace.
What I mean is, when Wesnoth hangs, I need to restart my computer to get it to work again! :evil:
If you can still get consoles, as you said, your system does not seem hanged very hard. ;)

Do you mean you run wesnoth in fullscreen and get stuck here when it hangs? Then run it in windowed mode, and only the wesnoth window will be frozen, and then you can try to get a backtrace.
Rhuvaen wrote:Oh, I currently have the "lite" version installed. Does that patch make sense then, too?
Yes, apply that to src/sound.cpp, and recompile.

--
Cedric
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

dms wrote:When it hangs, can you ssh (or telnet) in from another computer? (Or does it not even respond to that?)
No idea, I don't have another computer that's connected up. :)

Rhuvaen
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Re: system hangs - any hints of how to get a stacktrace?

Post by Rhuvaen »

cedric wrote: If you can still get consoles, as you said, your system does not seem hanged very hard. ;)
No, as I said, I CAN'T get any consoles... :cry:
Do you mean you run wesnoth in fullscreen and get stuck here when it hangs? Then run it in windowed mode, and only the wesnoth window will be frozen, and then you can try to get a backtrace.
And is there a commandline option to do that? (I think I know the answer but not the option)

I will try the patch and recompile now.

Rhuvaen
cedric
Posts: 320
Joined: January 24th, 2004, 10:27 pm
Location: Rennes, France
Contact:

Re: system hangs - any hints of how to get a stacktrace?

Post by cedric »

Rhuvaen wrote:And is there a commandline option to do that? (I think I know the answer but not the option)
wesnoth -w

This is also accessible from the preferences menu.
Rhuvaen wrote:I will try the patch and recompile now.
Thanks. This reverses an attempt to improve the audio quality, which in the end caused on some systems problems very similar to the one you're encountering.

--
Cedric
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Re: system hangs - any hints of how to get a stacktrace?

Post by Rhuvaen »

cedric wrote:
Rhuvaen wrote:I will try the patch and recompile now.
Thanks. This reverses an attempt to improve the audio quality, which in the end caused on some systems problems very similar to the one you're encountering.
Well I did this and played for two hours (of course, only to try to reproduce the error :wink: ), and the game was running as smoothly as possible.

Thanks ever so much Cedric, I think I'll try the full version with music with this patch now!

Rhuvaen
Post Reply