473,668 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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( XmlDatabaseExce ption ) {
SRC_ID_TYP srcId;
if ( GetSourceId( name_.c_str(), &( srcId ) ) != OLD_PAG ) {
string errMsg( "Source '" );
errMsg += name_ + "' does not exist in the database";
throw XmlDatabaseExce ption( 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::i mportData() ImportExport.cp p:373 0x08051c1b
2 ImportExport::e xecute() ImportExport.cp p: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 6053
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.d ewrote:
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
5443
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 it returns: ERROR 2013 (HY000): Lost connection to MySQL server during query I am able to run additional queries after I get the error, so the connection is not lost. I have tried running the query with the union on MySQL Query Browser and...
2
2119
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() exec scriptLines However, if I raise an exception in my main code, in a function that is called from the external script, the stack trace just has:
3
4550
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 windows application it worked fine, however I need to use a service as I don't want to rely on a user being logged in. The errors I get are: Index #:System.Web.HttpException: Could not access 'CDO.Message' object. --->...
2
2309
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 execute a standard windows debug trace (or any other line of code for that matter, I tried replacing the debug line with) it crashes giving a first chance exception, and then a access violation. I have a feeling that this has something to do with...
0
2648
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 publish page, Framework 2.0 installs successfully, but then the application installation fails during the "Verifying Application Requirements" process. Can anyone help me figure out how to solve this? Error is as follows. PLATFORM VERSION INFO...
8
5347
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 dont wan't a single point of failure we use SQL Session State. I have setup a persistant sql session state database on a SQL 2000 server (this is a cluster in production, so no SPOF) I have setup our web.config files to include; " <sessionState...
2
9367
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 this means and if there is a way to fix it. I have tried adding EnableViewstateMAC="false" in the page declaration with no success. Again, it does not appear to be consistent. I'm using ASP.NET 2.0 with IE7. THANKS! Kit
0
5238
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 to install using the setup.exe. Title is "Cannot Start Application" and it says: ==================== Cannot download the application. The application is missing required files. Contact application vendor for assistance.
2
3427
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 often an indication that other memory is corrupt. Stack Trace: at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at
0
8462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8382
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8586
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.