Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im encountering a strange problem with one of my application, it works fine on some machine. But it crashes on many other systems, i.e. when we try to execute it, it just doesnt start and later pops an error log as

Description:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: ecw_apu2.exe
Problem Signature 02: 1.0.0.1
Problem Signature 03: 532ba7ab
Problem Signature 04: eCW_APU2
Problem Signature 05: 1.0.0.1
Problem Signature 06: 532ba7ab
Problem Signature 07: 19
Problem Signature 08: f0
Problem Signature 09: System.InvalidOperationException
OS Version: 6.1.7601.2.1.0.272.7
Locale ID: 1033

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt

---------------------------------------------
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Windows Error Reporting" />
<EventID Qualifiers="0">1001</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-03-25T04:41:49.000000000Z" />
<EventRecordID>11325</EventRecordID>
<Channel>Application</Channel>
<Computer>ECWMSSQLTEST.corp.ecw.local</Computer>
<Security />
</System>
- <EventData>
<Data />
<Data>0</Data>
<Data>CLR20r3</Data>
<Data>Not available</Data>
<Data>0</Data>
<Data>ecw_apu2.exe</Data>
<Data>1.0.0.1</Data>
<Data>532ba7ab</Data>
<Data>eCW_APU2</Data>
<Data>1.0.0.1</Data>
<Data>532ba7ab</Data>
<Data>19</Data>
<Data>f0</Data>
<Data>System.InvalidOperationException</Data>
<Data />
<Data />
<Data>C:\Users\niraj.mishra\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_ecw_apu2.exe_6b43272dca559de688fcbddf069c841d0577ae9_2cf0d81f</Data>
<Data />
<Data>0</Data>
<Data>c57456d6-b3d7-11e3-8eae-00155d0a8937</Data>

-------------------
DW20.EXE
<Data>0</Data>
</EventData>
</Event>



I think that the distribution of .net framework or sql server installed on the machine has some thing to do with this.

Do you have any suggestions for this ?
Posted
Comments
Jim Meadors 26-Mar-14 1:18am    
I had a similar crash when I installed on a machine without 3.5 which was my target framework. If that is your problem it should resolve by installing the correct framework. Good Luck!
vikram_bullet 26-Mar-14 1:21am    
Although my target framework is 3.5, but i have made sure that framework 4.0 is installed on the machine I'm trying my application on.
Dave Kreskowiak 26-Mar-14 10:31am    
.NET 4.0 will NOT run your application. .NET 4.0 runs on an entire different CLR version. Both .NET 4.0 and 4.5 run on CLR 4.0, while .NET 2.0, 3.0 and 3.5 run on CLR 2.0.

You MUST have .NET 3.5 installed on the target machine or your code will not run.

1 solution

I got the solution alast..

I tried installing the different versions of .NET frameworks but most of the times it said ,it's already installed. Weird :-/

Any Ways Next after some googling, I found a post that said to try to handle the UnhandledException event of an application, which all WinForms apps should do.

1. So I created a module named "Program", so as to make it look similar to Program.cs of c#.
2. In the Project properties under Application tab unchecked "Enable Application Framework"
3. In the Project properties under Application tab selected the newly created module "Program" as my startup object.
4. The Program module looked like this
VB
Imports System.Threading

Module Program
    Public Sub Main()
        'MessageBox.Show(" Before program ")
        AddHandler Application.ThreadException, AddressOf OnThreadException

        ''Added this
        AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf UnhandledExceptionEventRaised
        Application.Run(New Form1()) ''//Use your main form here
    End Sub
    Private Sub OnThreadException(ByVal sender As Object, _
                      ByVal e As ThreadExceptionEventArgs)
        ' This is where you handle the exception
        MessageBox.Show(e.Exception.Message)
    End Sub

    'Added this
    Sub UnhandledExceptionEventRaised(ByVal sender As Object, ByVal e As UnhandledExceptionEventArgs)
        If e.IsTerminating Then
            Dim o As Object = e.ExceptionObject
            MessageBox.Show(o.ToString) ' use EventLog instead
        End If
    End Sub
End Module


5. All set

Now whenever you will face any exception, your application will not crash and display weird messages byt instead a message box with the complete strack trace is popped up.

And all the headaches of buzzing around to find the issue will resolve..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900