Constant C++ errors

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:
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Constant C++ errors

Post by Anonymissimus »

vcap wrote: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).
Don't bug him with compiling please. We can't do apt-get --build-dep etc on win you know. If he manages to compile he might get an a lot better backtrace from MSVC however. On the other hand, it is quite possible that only the gcc compiled windows version has this bug while MSVC binaries may not.
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: 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."
Then run the program and std::terminate() will get resolved when the shared library that implements it will get loaded (or then, maybe not; but that's what "Make breakpoint pending on future shared library load" means).
Awen wrote: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.
Back when i was using windows, there were icons on that console that allowed to select text and copy to the clipboard. But apparently, it's gone.

EDIT:
Anonymissimus wrote: Don't bug him with compiling please.
That's not what i do. I am merely trying to help him make sense of what gdb tell him.
Awen
Posts: 46
Joined: March 16th, 2008, 6:44 pm

Re: Constant C++ errors

Post by Awen »

i done everything in the below except i had to end task the wesnoth program because it had frozen and i could not type into the cmd prompt, when i tried to switch window to it nothing appeared but after ending the wesnoth program i was able to see and type in to the cmd prompt.
-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
here is the back trace, i copied everything...
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\ME>cd..

C:\Documents and Settings>cd..

C:\>cd program files

C:\Program Files>cd battle for wesnoth 1.8.4

C:\Program Files\Battle for Wesnoth 1.8.4>"c:\mingw\bin\gdb.exe" wesnoth.exe
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\Program Files\Battle for Wesnoth 1.8.4/wesnoth.exe...don
e.
(gdb) run
Starting program: C:\Program Files\Battle for Wesnoth 1.8.4/wesnoth.exe
[New Thread 2672.0x96c]
[New Thread 2672.0xdc]
[New Thread 2672.0x860]
[New Thread 2672.0xfe4]
[New Thread 2672.0x45c]
[New Thread 2672.0xea0]
[New Thread 2672.0x7c0]
[New Thread 2672.0xcfc]

Program exited normally.
(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.
(gdb) run
Starting program: C:\Program Files\Battle for Wesnoth 1.8.4/wesnoth.exe
[New Thread 2816.0xc40]
[New Thread 2816.0xe88]
[New Thread 2816.0xa54]
[New Thread 2816.0x74c]
[New Thread 2816.0x968]
[New Thread 2816.0x3b8]
[New Thread 2816.0x9dc]
[New Thread 2816.0x710]
[New Thread 2816.0xc68]
[New Thread 2816.0xf68]
[New Thread 2816.0xb20]
[New Thread 2816.0xd24]
warning: HEAP[wesnoth.exe]:
warning: Invalid Address specified to RtlFreeHeap( 01830000, 00DFF718 )


Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
(gdb) bt
#0 0x7c90120f in ntdll!DbgUiConnectToDbg ()
from C:\WINDOWS\system32\ntdll.dll
Cannot access memory at address 0x22a15c
(gdb)
i do not kn ow if it caught the c++ error because i did not see that error box, all i got was wesnoth freezing.

i ran wesnoth in full screen mode because in windowed mode i cannot move the map in game because you have to scroll to the very corners of the map and it does not work in windowed mode. perhaps if i had been in windowed mode id been able to type into the cmd prompt after freeze, i dont know.
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Constant C++ errors

Post by Anonymissimus »

The backtrace is only that part
#0 0x7c90120f in ntdll!DbgUiConnectToDbg ()
Everything else is the other commands and info you got...
Ok this tells me, being some want-to-be-a-hacker, only that something with the memory management seems wrong (heap) (also an explanation for the bug appearing only after some time that wesnoth had already been running). Maybe post a bug report at gna including a link to this thread..
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
Awen
Posts: 46
Joined: March 16th, 2008, 6:44 pm

Re: Constant C++ errors

Post by Awen »

i rtegistered at GNA then tried to add a technical support ticket but Category was set to none and had no other items in the drop down box.. i tried submitting the ticket but it needed the Category to be somethging other than none which is not possible. so no ticket submitted.

this is the website im on..
https://gna.org/support/index.php

also internet explorer says there is a problem with the sites security certificate.
vcap
Posts: 80
Joined: August 1st, 2010, 3:34 pm

Re: Constant C++ errors

Post by vcap »

gdb wrote: warning: Invalid Address specified to RtlFreeHeap( 01830000, 00DFF718 )
Sounds like something is trying to free memory thru a bad pointer.
Awen wrote: this is the website im on..
https://gna.org/support/index.php
That should be https://gna.org/bugs/index.php?group=wesnoth, or http://bugs.wesnoth.org (which leads to the same place but is easier to remember).
Awen wrote:also internet explorer says there is a problem with the sites security certificate.
Yes, it's a known issue with gna. You can disregard it.
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Constant C++ errors

Post by Anonymissimus »

vcap wrote:
Awen wrote:also internet explorer says there is a problem with the sites security certificate.
Yes, it's a known issue with gna. You can disregard it.
In firefox, I click on adding a "security exception" (or something); mostly adding it temporarily so the problem will reappear when the site is visited in the next firefox session. Then the site is accessible.
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
Awen
Posts: 46
Joined: March 16th, 2008, 6:44 pm

Re: Constant C++ errors

Post by Awen »

i managed to complete a bug report, before i was trying to add a tech support ticket rather than a bug report.

here is the bug reported to GNA...
https://gna.org/bugs/index.php?16919
Post Reply