在vb.net中设计的应用程序在startUp崩溃 [英] Application designed in vb.net crashes at startUp
问题描述
我遇到一个我的应用程序的奇怪问题,它在某些机器上工作正常。但它在许多其他系统上崩溃,即当我们尝试执行它时,它只是没有启动,后来弹出错误日志为
描述:
停止工作
问题签名:
问题事件名称:CLR20r3
问题签名01:ecw_apu2 .exe
问题签名02:1.0.0.1
问题签名03:532ba7ab
问题签名04:eCW_APU2
问题签名05:1.0.0.1
问题签名06:532ba7ab
问题签名07:19
问题签名08:f0
问题签名09:System.InvalidOperationException
操作系统版本:6.1.7601.2.1.0.272.7
区域设置ID:1033
在线阅读我们的隐私声明:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
如果没有在线隐私声明,请阅读我们的隐私声明离线:
C:\ Windows \system32 \\\-US \ _erofflps.txt
----- ----------------------------------------
- < ;事件xmlns =" http://schemas.microsoft.com/win/2004/08/events/event">
- <系统>
< ;提供商名称=Windows错误报告 />
< EventID Qualifiers =" 0"> 1001< / EventID>
< Level> 4< / Level>
<任务> 0< /任务>
< Keywords> 0x80000000000000< / Keywords>
< TimeCreated SystemTime =" 2014-03-25T04:41 :49.000000000Z" />
< EventRecordID> 11325< / EventRecordID>
<频道>应用< /频道>
<电脑> ECWMSSQLTEST .corp.ecw.local< / Computer>
< Security />
< / System>
- < EventData>
< Data />
< Data> 0< / Data>
< Data> CLR20r3< / Data>
<数据>不可用< / Data>
<数据> 0< /数据>
<数据> ecw_apu2.exe< /数据>
< Data> 1.0.0.1< / Data>
< Data> 532ba7ab< / Data>
< Data> ; eCW_APU2< / Data>
< Data> 1.0.0.1< / Data>
< Data> 532ba7ab< / Data>
<数据> 19< /数据>
<数据> f0< /数据>
<数据> System.InvalidOperationException< / Data>
< Data />
< Data />
<数据> C:\Users\\\
iraj.mishra\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_ecw_apu2.exe_6b43272dca559de688fcbddf069c841d0577ae9_2cf0d81f< /数据与GT;
将;数据/>
<数据> 0< /数据>
<数据> c57456d6-b3d7-11e3-8eae-00155d0a8937< / Data>
-------------------
DW20.EXE
<数据> 0< /数据>
< / EventData>
< / Event>
我认为机器上安装的.net框架或sql server的分发与此有关。
你对此有什么建议吗?
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 ?
推荐答案
我得到了解决方案......
我尝试安装不同版本的.NET框架,但大多数时候它已经安装了。很奇怪: - /
任何方式接下来经过一些谷歌搜索后,我发现一个帖子说试图处理应用程序的UnhandledException事件,所有WinForms应用程序都应该这样做。
1.所以我创建了一个名为Program的模块,以使其看起来与c#的Program.cs类似。
2.在应用程序选项卡下的项目属性中,取消选中启用应用程序框架
3.在应用程序选项卡下的项目属性中,选择新创建的模块程序作为我的启动对象。
4.程序模块看起来像这样
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
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.全套
现在每当你愿意面对任何异常,您的应用程序不会崩溃并显示奇怪的消息,而是弹出一个带有完整strack跟踪的消息框。
所有头痛的嗡嗡声找到问题将解决..
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..
这篇关于在vb.net中设计的应用程序在startUp崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!