Constant C++ errors

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

Moderators: Forum Moderators, Developers

Forum rules
Before reporting issues in this section, you must read the following topic:
User avatar
Ramza
Posts: 4
Joined: September 8th, 2010, 1:49 am

Constant C++ errors

Post by Ramza »

Hello,

I hate for this to be my first post but heregoes:

I keep getting C+++ errors and the game will just crash... upon this happening I will have to reboot the game multiple times (as it lags and sometimes crashes instantly) while I try to re-enter my lost game. In most instances (if it did not crash at the loading screen) it will crash as soon as the game loads.

I can't for the life of me figure out why this game crashes so much and I HATE IT. It's so annoying playing survival maps and having the game crash right before the end... or during a good session.

I run windows professional xp 2002
Running on service pack 2 (thought I was on 3 until i just checked)

I'm running the current version of wesnoth (1.8.4)
And I usually play survival maps with ageless era (which I've downloaded via add-on).

As for save games I don't have any current... How can I save a game that crashed?

Any feedback into a possible solution would be great.


Sincerely,

Ramza

User avatar
Pentarctagon
Forum Administrator
Posts: 4319
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Constant C++ errors

Post by Pentarctagon »

a save-game isn't so useful in this case as the stderr.txt
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
Ramza
Posts: 4
Joined: September 8th, 2010, 1:49 am

Re: Constant C++ errors

Post by Ramza »

What is the stderr.txt?

Also, does this happen to anyone else this often?

I am running current specs and my computer isn't shabby by any means.

User avatar
Iris
Site Administrator
Posts: 6646
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Constant C++ errors

Post by Iris »

Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

Anonymissimus
Inactive Developer
Posts: 2460
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Constant C++ errors

Post by Anonymissimus »

@shadow He said win xp...
@Ramza Look for stderr.txt in your wenoth installation directory. If it' so annoying for you you may want to work out how to give a backtrace to the devs, some info here: http://hamsterrepublic.com/ohrrpgce/ind ... ndows.html
Does it happen in singleplayer too ? Note that I use win xp too and don't experience any crashes.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign

User avatar
Iris
Site Administrator
Posts: 6646
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Constant C++ errors

Post by Iris »

Anonymissimus wrote:@shadow He said win xp...
Hey, I only linked our mandatory reading, regardless of operating system. :P
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

Awen
Posts: 46
Joined: March 16th, 2008, 6:44 pm

Re: Constant C++ errors

Post by Awen »

yes others experience this.

http://www.wesnoth.org/forum/viewtopic.php?f=4&t=31231

edit: perhaps the developers could supply us with a debug version of wesnoth if there is one and if it will help... then we could collect te error info, not sure how though... ie doing a backtrace perhaps?
Last edited by Gambit on September 9th, 2010, 7:35 pm, edited 1 time in total.
Reason: Don't double post without good reason. We have an edit button.

Anonymissimus
Inactive Developer
Posts: 2460
Joined: August 15th, 2008, 8:46 pm
Location: Germany

some backtrace how to

Post by Anonymissimus »

I give you some description of how I can create a backtrace with gdb and a wesnoth release version on win xp. Silene taught it to me on irc. If someone who can reproduce it does this it is likely to be helpful to the developers. I take this bug/backtrace as an example:
http://gna.org/bugs/index.php?16544

-Get the gnu debugger gdb.exe - I use the one that comes with the installer of the IDE CodeBlocks, mingw version. For me it is located in E:\Programme\CodeBlocks\MinGW\bin\.
-click start>run, type cmd, click ok
-type cd .. to climb up a directory, type cd <subdirectory> to enter a directory, until reaching the wesnoth installation folder (tab completes partly typed names)
-type <drive letter>: (c: in my case) to change the hard drive partition (only needed for me due to the location of my installation folder)
-when in wesnoth's installation folder with the shell I type

"E:\Programme\CodeBlocks\MinGW\bin\gdb.exe" wesnoth.exe
run

(wesnoth starts up, I close it and type)

break std::terminate()
run

(wesnoth runs until execution reaches the breakpoint, wesnoth freezes, I can again type in the shell, and I do type)

bt

Use right-click menu to mark the backtrace and to copy it (I'm confused about that part, it seems to work only sometimes :P).
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign

User avatar
Ramza
Posts: 4
Joined: September 8th, 2010, 1:49 am

Re: Constant C++ errors

Post by Ramza »

Well, thank you to all who replied but the system for self debugging seems a little above my paygrade ( so to speak).

I don't know how to do all that but it seems very excessive if it is only to upload select data for the event of the crash.

Anyways, in the link provided, the TC seems to be experiencing a similar problem (although maybe from a different source) so at least I'm not the only person.
Maybe it's the combination of my Windows XP service pack 2 and wesnoth 1.8.4 (although it did the same thing with 1.8.3)

Anonymissimus
Inactive Developer
Posts: 2460
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Constant C++ errors

Post by Anonymissimus »

Anonymissimus wrote:Does it happen in singleplayer too ?
Does it ?
It may be unrelated to wesnoth and a firewall problem or something I'm guessing. It's also possible to open more than one instance of BfW on the same computer and create a local network game (if I understood Gambit right :P) to see whether it crashes.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign

User avatar
AdityaThakur
Posts: 1
Joined: September 11th, 2010, 9:02 am

Re: Constant C++ errors

Post by AdityaThakur »

this is common problem i guess because am also experiencing these problems in my pc while playing online..............
it just crashes repoerting C++ error.
i am using windows seven ultimate,
1.5 gb ram, p-4 processor, 128 mb onboard graphics card...........

i had only found one solution to this that we should not play long online games,,,, :augh: :oops: :augh: :evil:

Awen
Posts: 46
Joined: March 16th, 2008, 6:44 pm

Re: Constant C++ errors

Post by Awen »

Anonymissimus,

i installed gdb.exe with mingw and am trying to perform a backtrace by following your guidelines but am confused.

this is the text copied from my cmd window after i try one of your commands...
(gdb) break std::terminate()
Can't find member of namespace, class, struct, or union named "std::terminate"
Hint: try 'std::terminate()<TAB> or 'std::terminate()<ESC-?>
(Note leading single quote.)
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (std::terminate()) pending.
i did not expect to be asked a yes or no question, you did not tell us about that, i said y anyway but it looked like it hasn't worked.

can i get away without using the break command? the sticky from the developers about backtraces does not state to use it (how to generate a backtrace).

another thing will this other method work just as well?... just a different game thats all... though running gdp outside of cmd means you wont be able to mark and copy the text youd need to take a screenshot...

http://freedroid.sourceforge.net/dev_docu/node4.html

i got mingw from here in case anyone else is interested...

http://sourceforge.net/projects/mingw/files_beta/

i choose the Automated MinGW Installer which even when i ticked all of the programming languages only took 10-20 minutes to finish installation though i did wonder if it would go on all day lol. gdb.exe is after default installation in the folder C:\MinGW\bin

Anonymissimus
Inactive Developer
Posts: 2460
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Constant C++ errors

Post by Anonymissimus »

Well done.
It worked, probably, "breakpoint pending" is good. I guess you can restart BfW from gdb after that and wait for (or trigger, if possible) the crash.
Awen wrote: can i get away without using the break command? the sticky from the developers about backtraces does not state to use it.
Quite possible. The breakpoint causes BfW to halt when it is about to crash and enables me to type backtrace in the gdb console. Without a breakpoint I got "no stack".
another thing will this other method work just as well?... just a different game thats all...

http://freedroid.sourceforge.net/dev_docu/node4.html
Quite possible. Glanced over that page, looks nice however.

I gave you just some hints; you have started your own way of finding out now...
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign

vcap
Posts: 80
Joined: August 1st, 2010, 3:34 pm

Re: Constant C++ errors

Post by vcap »

Awen wrote:
(gdb) break std::terminate()
Can't find member of namespace, class, struct, or union named "std::terminate"
Hint: try 'std::terminate()<TAB> or 'std::terminate()<ESC-?>
(Note leading single quote.)
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (std::terminate()) pending.
Did it say "(no debugging symbols found)" just before that? That would be why. If the game has not been compiled with debugging symbol, gdb can't resolve the name std::terminate() to the appropriate memory address (kind of like what just happened with wesnoth.org and the dns).
Awen wrote: can i get away without using the break command? the sticky from the developers about backtraces does not state to use it (how to generate a backtrace).
Yes, i would try that. That's how i would have done it on linux, but windows signals handling is different so maybe the breakpoint on terminate() is actually needed there. You won't break anything by trying, in any case.

Awen
Posts: 46
Joined: March 16th, 2008, 6:44 pm

Re: Constant C++ errors

Post by Awen »

Did it say "(no debugging symbols found)" just before that? That would be why. If the game has not been compiled with debugging symbol, gdb can't resolve the name std::terminate() to the appropriate memory address (kind of like what just happened with wesnoth.org and the dns).
no it did not say "no debugging symbols found" if i read some lines before it actually says "reading symbols from C:\Program Files\Battle for Wesnoth 1.8.4/wesnoth.exe...done."

i actually had to type the above as the cmd console would not let me mark and copy it. like was talked about above in another post.

Post Reply