473,769 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

On closing application ntdll.dll is crashed

1 New Member
Hi all,

I am getting crash in ntdll.dll just after CDialog::OnOK() ; function. It is not getting crashed everytime. Application is multithreaded, but it is after i have added new thread. In that I am using vector list and also maintaining the criticalsection and thread proc close event. Now, in constructor i m setting NULL to all handles and initialize critical section and for stopping thread i m setting close event and my thread is comeout for waitForMultiple Object and returning. I am not terminating thread/exitthread. As i have read in msdn not to do this in c++. need to first return from threadproc.

I am also delete critical section close all handles. Only thing i can think of is i am not clearing my vector list. Is that be a cause of crashing.

Also this class is derive class of a abstract class. So, that a pointer will be of a parent class.

Any guesses which i can tryout to solve this crash. As i have marked no distructor is called of my anyother class.

Please help me out.
Thank you.
Archita
Aug 10 '07 #1
1 2430
weaknessforcats
9,208 Recognized Expert Moderator Expert
The vector couklkd well bwe th cause of the crash.

You say not destructors are called. Does that mean your derived class (wirth the vector) is not having the destructoir called?? Is that right??

Be sure the destructor in your base class is virtual. Unless it is, the destructor of your derived class will never be called.

Also, be careful of iterators. If the vector is altered by the thread, all the iteratros become invaloid and can't be trusted. You would need to re-initialize them each time beofre using and this would have to be done in the crtical section unless you are using a lock that is valid outside the critical section.
Aug 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2270
by: roni | last post by:
hi. i have application written in vb.net + managed c++ dll that call also to unmanaged c++ function. the application crash. i open the dump file of the crash with WinDbg and that's is the call stack (using the sos.dll) : =====================================
0
3183
by: Andrew | last post by:
I get a Null Reference Exception if I close a modeless form (that is, a form displayed using Show()) when a selection is made from a ComboxBox. If the form is modal (displayed using ShowDialog()) or the selection is made from, say, a ListBox, no exception is thrown. I have included a simple example below. The error message refers to Unsafe Native Methods, but the code is 100% managed. What is going on ? I am using C#.NET 2003, Standard...
3
8151
by: Andrew | last post by:
I get a Null Reference Exception if I close a non-modal dialog (that is, a form opened with Show()) when a selection is made from a ComboBox. The error message refers to Unsafe Native Methods, but the code is 100% managed. The exception is not thrown if the dialog was modal (opened with ShowDialog()) or if the selection is made from, say, a ListBox. I have included a simple example below. I am using C#.NET 2003, Standard Edition.
0
2059
by: John | last post by:
Hi I have this problem on winxp/offixexp machine but not on win2k/office2k machines. I have a main form which has a panel which has a child form. The child form opens a dialog form. When the dialog form is closed using the 'x' button or using me.close in code, the app crashes. The source the error is pointed as my main app loop; Application.Run(frmMain) in Sub Main.
7
6712
by: Ralf Gedrat | last post by:
Hello! I have some Vb.Net applications, which are terminated at indefinite times without message. If I call in the program regulated system.GC.Collect, then the program is terminated here sporadically without message. It's not possible to debug in visual studio, i get no exceptions (application is terminated unexpectedly without message).
12
5879
by: JohnR | last post by:
I have narrowed a problem down to a simple example. A form with two buttons. One EXIT and one FBD. The exit button does an "END" to end the application. The FBD button does a FolderBrowserDialog and nothing else. When I start the application and hit EXIT everything works fine. However if it display the FBD box (even if I don't pick a folder and immediately hit cancel) and then try to exit one of two things happens. Either (1) the...
1
1813
by: Rama Krishna | last post by:
I have an unmanaged MFC application linked to a mixed mode MFC extension dll (.NET 2.0/VS 2005) . I followed all the instructions correctly and ensured that no managed code gets called from the DllMain. When I run the application it just crashes. Unhandled exception at 0x013f288e in ImpEDC.exe: 0xC0000005: Access violation. Hereis the stack trace 013f288e()
15
11076
by: eltonchew | last post by:
Hi, We have an inhouse developed VB.NET Windows application which runs successfully only when the user is given a local administrator rights. Without which, it fails to start. There isn't anything reported on the event viewer. Giving the user full access to C:\ drive also doesn't do the trick. Unfortunately, we do not have the code of this application and hence cannot view what the application is trying to access. Note that we have both...
2
942
by: Onlyone | last post by:
We are invoking a COM object from VC++ code and closing the Form (COM object). Our main application got disappeared or crashed at this time. Could you please help me out in resolving this issue? Regards, Sha.
0
9590
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
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
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
9866
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...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
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();...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3968
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
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.