472,962 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,962 software developers and data experts.

gdb error: Previous frame inner to this frame (corrupt stack?)

Hello,

I have a crashing application and tried to find out what is going
wrong. So I run this application with the gdb debugger. I found the
position of the crash in a function which searches the id of a
database element by its name. If the database element is not found it
shall throw an exception. This is the related code:

SRC_ID_TYP Source::getId( const std::string& name_ )
throw( XmlDatabaseException ) {
SRC_ID_TYP srcId;
if ( GetSourceId( name_.c_str(), &( srcId ) ) != OLD_PAG ) {
string errMsg( "Source '" );
errMsg += name_ + "' does not exist in the database";
throw XmlDatabaseException( errMsg );
}
return srcId;
} // *** Source::getId() ***

If the id can be resolved correctly the application works fine. But if
not, it crashes when it tries to throw the exception. The message I
get in the debugger then is:
"Previous frame inner to this frame (corrupt stack?)"

But when I look at the backtrace of the stack it looks very ok:

8 xmldb::Source::getId() Source.cpp:398 0x08062e68
7 xmldb::Source::create() Source.cpp:106 0x0805fb3f
6 xmldb::ADSFile::parseDOMTree() ADSFile.cpp:380 0x0805aec0
5 xmldb::ADSFile::parseXML() ADSFile.cpp:312 0x0805a0cb
4 xmldb::ADSFile::read() ADSFile.cpp:104 0x08056fcf
3 ImportExport::importData() ImportExport.cpp:373 0x08051c1b
2 ImportExport::execute() ImportExport.cpp:305 0x08051764
1 main() iet.cpp:56 0x08055fbb

Know I'm at the end of my knowledge.
Can someone tell me, what is the reason for such an error message? And
what can I investigate further to find the mistake?

Thanks,
Sven
Nov 30 '07 #1
2 5963
I found the mistake!

With the usage of a factory method I had to move the search of the id
into this static method. But now the throw() declarations of one
method above does not fit any more.

But I wonder, why this is not caught by the compiler. I did not think
that a wrong throw() declaration of a method causes a runtime error.
Isn't it just for code clearance or use the compiler this information
for optimizing?

Greetz, Sven
Nov 30 '07 #2
On 30 Nov, 11:19, Sven <s...@ast.dfs.dewrote:
I found the mistake!

With the usage of a factory method I had to move the search of the id
into this static method. But now the throw() declarations of one
method above does not fit any more.

But I wonder, why this is not caught by the compiler. I did not think
that a wrong throw() declaration of a method causes a runtime error.
Isn't it just for code clearance or use the compiler this information
for optimizing?
And the moral of the story is ...
don't use exception specifications.
Nov 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Matias Silva | last post by:
Hi Everyone, I wrote a for loop to build several select statements that are combined with a UNION. When I execute one of the queries separately, it works, but when I execute the query with a UNION...
2
by: Hugh Macdonald | last post by:
I'm writing a tool at the moment that reads in an external file (which can use any Python syntax) At the moment, I'm reading the file in using: scriptLines = open(baseRippleScript).read()...
3
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a...
2
by: Mongoose7 | last post by:
Hi, I am using vc7 to call a dll function from another dll. The function seems to execute correctly (it writes binary data to the registry) but when it comes out of the function, and tries to...
0
by: Marty Cruise | last post by:
I successfully deploy my application to 20 domain users. Only one new user is giving me a problem, although he can access all domain resources. When he clicks the installation link on the...
8
by: Andrew Teece | last post by:
Hope someone can help. We are trying to deploy an ASP.Net 2.0 application to a 3-node webfarm. The application uses the ReportViewer control in local mode, hence we need session state. Because we...
2
by: K B | last post by:
I have suddenly begun getting error messages on multiple pages as follows. I tried researching, but the issue seems quite confusing...or perhaps just over my head. Could someone please advise what...
0
by: Tifer | last post by:
Hello, I am building my first .Net Application. The first couple of Publish and Installs I did went fine. But after a couple of builds, I get a modal dialogue box error every time upon trying...
2
by: Hans van Kruijssen | last post by:
We are using the windows forms webbrowser control in a WPF client application. Very rarely we get the following error message: Message Attempted to read or write protected memory. This is...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.