473,663 Members | 2,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crashes while exiting from c# application

GL
I am getting a crash while exiting from my application. Pl find the
Stack Trace of the crash:

System.Windows. Forms.Applicati on.ThreadWindow s.ThreadWindows (System.Windows .Forms.Control
parent = <undefined value>, bool onlyWinForms = true) + 0x8c bytes
system.windows. forms.dll!Threa dContext.Dispos eThreadWindows( ) + 0x54
bytes
system.windows. forms.dll!Threa dContext.Dispos e() + 0xa1 bytes
system.windows. forms.dll!Threa dContext.RunMes sageLoopInner(i nt reason =
0xffffffff, System.Windows. Forms.Applicati onContext context =
{System.Windows .Forms.Applicat ionContext}) + 0x280 bytes
system.windows. forms.dll!Threa dContext.RunMes sageLoop(int reason =
0xffffffff, System.Windows. Forms.Applicati onContext context =
{System.Windows .Forms.Applicat ionContext}) + 0x50 bytes
system.windows. forms.dll!Syste m.Windows.Forms .Application.Ru n

I am not able to reproduce this crash in Debug mode. But this is only
coming in Release mode.

Could anyone help me to resolve this issue?

Thanks,
GL

NOTE: This application calls functions from our unmanaged dll very
frequently.

Nov 17 '05 #1
6 3675
Could you include also the exception type and exception message.

Nov 17 '05 #2
GL
hey .. I forgot to notedown the Exception Name. I think, it
ExecutionEngine Exception (not sure).

Sometime this application gives the following Error dialog
Caption: Setup Error
Message: Failed to load resources

-GL

Nov 17 '05 #3
GL
hey .. I forgot to notedown the Exception Name. I think, it
ExecutionEngine Exception (not sure).

Sometime this application gives the following Error dialog
Caption: Setup Error
Message: Failed to load resources

Nov 17 '05 #4
There is not enough information to say anything. Is your app
multithreaded? What kinds of unmanaged code does it call? What inside
the forms' closing events? Do you update UI from other thread without
marshaling to the owner thread by using Control.Invoke or
Control.BeginIn voke?

Nov 17 '05 #5
Hey GL,

"GL" <gl*****@gmail. com> schreef in bericht
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
hey .. I forgot to notedown the Exception Name. I think, it
ExecutionEngine Exception (not sure).

Sometime this application gives the following Error dialog
Caption: Setup Error
Message: Failed to load resources

-GL


It also helps to give us some versioning, like
- OS version + any service packs
- .NET Framwork version + any service packs
- Development environment version
- Language + version

Anyway, if it is an ExecutionEngine Exception it could indicate a bug in the
..NET framework. From the .NET docu for EEE:
<quote>
Execution engine errors are fatal errors that should never occur. Such
errors occur mainly when the execution engine has been corrupted or data is
missing. The system can throw this exception at any time. When possible, the
system throws an exception that provides more information than the
ExecutionEngine Exception exception.
</quote>

This leads me to my first question:
- 1/ Are you using .NET Framework 1.1?
And second
- 2/ Have you installed SP1 (service pack 1) for .NET Framework 1.1?

If you answer 1/ Yes, 2/ No, then I advise you to install SP1 for .NET
Framework 1.1 and see if that solves your problem. A lot of issues are
solved in that service pack, and most probably your issue too.

Get SP1 for .NET Framework 1.1 here:
http://www.microsoft.com/downloads/d...displaylang=en
Get more info on updates for .NET Framework here:
http://msdn.microsoft.com/netframewo...s/default.aspx

Tell us if that solved your problem.

Kind regards,
PS: I solved an obstructing ExecutionEngine Exception in my current dev.
project by upgrading to SP1 for .NET Framework 1.1
--
Tom Tempelaere.
Nov 17 '05 #6

"GL" <gl*****@gmail. com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
I am getting a crash while exiting from my application. Pl find the
Stack Trace of the crash:

System.Windows. Forms.Applicati on.ThreadWindow s.ThreadWindows (System.Windows .Forms.Control
parent = <undefined value>, bool onlyWinForms = true) + 0x8c bytes
system.windows. forms.dll!Threa dContext.Dispos eThreadWindows( ) + 0x54
bytes
system.windows. forms.dll!Threa dContext.Dispos e() + 0xa1 bytes
system.windows. forms.dll!Threa dContext.RunMes sageLoopInner(i nt reason =
0xffffffff, System.Windows. Forms.Applicati onContext context =
{System.Windows .Forms.Applicat ionContext}) + 0x280 bytes
system.windows. forms.dll!Threa dContext.RunMes sageLoop(int reason =
0xffffffff, System.Windows. Forms.Applicati onContext context =
{System.Windows .Forms.Applicat ionContext}) + 0x50 bytes
system.windows. forms.dll!Syste m.Windows.Forms .Application.Ru n

I am not able to reproduce this crash in Debug mode. But this is only
coming in Release mode.

Could anyone help me to resolve this issue?

Thanks,
GL

NOTE: This application calls functions from our unmanaged dll very
frequently.


The crash is probably due to the call's into unmanaged code, check your
argument types and sizes very carefully, also check your calling
convention(s). Failures in both result in ExecutionEngine Exceptions, because
you might overwrite CLR and/or GC structures.

Willy.
Nov 17 '05 #7

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

Similar topics

9
3840
by: greeningster | last post by:
I have written an application in Visual C++ for a customer but it seems to crash randomly. Could anyone give me any help on how I could track this down ? Also, there appears there might be memory leaks too. How can i track these down ?
7
3985
by: David Elliott | last post by:
I have created an application that will dynamically load other DLLs (plugins). The new plugin is a winform with an embedded IE Browser. I am wanting to have the form to run in its own thread. This would allow for other plugins and the main application to be free to do other work. I have written a little TestDriver for the plugin and am having some difficulty. If I don't use threads everything works just fine. If I do use threads, upon...
8
2589
by: Andrew Warren | last post by:
I'm trying to exit a Windows Forms application while in the form's constructor (after InitializeComponent() has been called) and am finding that calling Application.Exit () still leaves the form displayed and running. Trying to force the form to close with this.Close() does not work either. Any suggestions? Thanks.
2
1753
by: pnp | last post by:
Hi all, I'm working on a win app that uses a logon form to verify the user that logs in the program and then hides the first form and displays an MDI form where the user does his work. The app is STA. The problem is that I wan't to be able to close the app from wherever in my app (no matter how deep in the code) and make sure that all the resources are being freed after exiting the app. Any ideas? Is there a way to re-open the app...
2
10554
by: tt | last post by:
Hi, ANy ideas on this? When I click the close button of a window in VB.net which method gets called? I used Applicaton.exit in some method of my appln. to exit the application but, it still leaves the process in the process table. Can someone help me exiting an application cleanly. Thanks -tt
1
1900
by: kuhrty | last post by:
Hi, I am creating a multi-winform project. Everything has been working fine, except after I perform an update to the database and decide to Exit the winform after the update operation is complete. I have error handling in my code but not on the dispose method. I call the dispose method exiting the application using the code below but results in this error message "An unhandled exception of type 'System.NullReferenceException'
6
2494
by: Ant | last post by:
Hi all, I'm putting together a simple help module for my applications, using html files stored in the application directory somewhere. Basically it sets up a basic web server, and then uses the webbrowser module to display it in the users browser. I have it set up to call sys.exit(0) if the url quit.html is called, but for some reason (on Windows XP via the cmd.exe shell) python won't let me have the console back. I get the System Exit...
4
6682
by: yinglcs | last post by:
Hi, I have a c++ application which crashes in this line (from the debugger, I have a segmentation fault here): void *object = dynamic_cast<void>(aObject); I have stepped thru the code in debugger and the 'aObject' pointer is Not null. So can you please tell me, what else can go wrong so that my program crashes in this line?
1
1733
by: =?Utf-8?B?SmVycnk=?= | last post by:
I've created an assembly that, because of 3rd party controls, requires full trust to run. This is no problem when running from the local harddrive, but when the application is run from a network drive, the application crashes and want's to send information to Microsoft. To deal with this, I added code to demand PermissionState.Unrestricted before any other code is executed. I also added a strong name to facilitate giving full trust to the...
0
8345
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
8858
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...
0
8771
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
8548
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
8634
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
7371
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
4182
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4349
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1757
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.