我在我的 .NET 项目(WinForms)中使用 agsXMPP 我有以下代码块,只要从任何客户端收到消息,就会执行此代码块。现在,每当收到一条消息时,这个块就会执行并且程序终止.. :( 我不知道发生了什么。帮助!
这与线程有关吗?(我听说 agsXMPP 封装了它工作的线程)
Private Sub messageReceived(ByVal sender As Object, ByVal msg As protocol.client.Message)
Dim chatMessage() As String
Static Dim Hi_ed As Integer = 0
chatMessage = msg.From.ToString.Split("/")
Dim chatSender As String = chatMessage(0)
If Not IsWorking Then
IsWorking = True
If Not ProcessCommands(msg.Body, chatSender) Then
Dim sStr As String = ParseEnglish(msg.Body)
Select Case sStr
Case "HI"
If Hi_ed = False Then
SendGTalkMsg("Hi. How do you do?", chatSender)
Hi_ed = True
Else
SendGTalkMsg("हाय वाई कुछ नहीं हम तो !!!", chatSender)
End If
Case "DETAILS PLEASE"
SendGTalkMsg(". Currently there are N no of sams running on me: :)", chatSender)
End Select
End If
IsWorking = False
Exit Sub
Else
SendGTalkMsg("I'm working right now. Please have patience.", chatSender)
End If
End Sub
**编辑* *** 现在,当我运行生成的 EXE 文件时,在此事件完成后出现“不响应”错误,这显然意味着存在异常,但它正在逃避 try catch 块。:(
这是我得到的错误:
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: updatecheck.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 4e8ed73e
Problem Signature 04: mscorlib
Problem Signature 05: 4.0.0.0
Problem Signature 06: 4dd23522
Problem Signature 07: 1526
Problem Signature 08: 4f
Problem Signature 09: System.InvalidOperationException
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
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