Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

ThreadAbortException #11

Open
skullthug opened this issue Aug 7, 2018 · 3 comments
Open

ThreadAbortException #11

skullthug opened this issue Aug 7, 2018 · 3 comments

Comments

@skullthug
Copy link

I'm noticing whenever I stop playing in the editor, this exception is always thrown:

ThreadAbortExceptionSystem.Threading.ThreadAbortException: Thread was being aborted at (wrapper managed-to-native) System.Net.Sockets.Socket:RecvFrom_internal (intptr,byte[],int,int,System.Net.Sockets.SocketFlags,System.Net.SocketAddress&,int&) at System.Net.Sockets.Socket.ReceiveFrom_nochecks_exc (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags, System.Net.EndPoint& remote_end, Boolean throwOnError, System.Int32& error) [0x00000] in <filename unknown>:0 at System.Net.Sockets.Socket.ReceiveFrom_nochecks (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags, System.Net.EndPoint& remote_end) [0x00000] in <filename unknown>:0 at System.Net.Sockets.Socket.ReceiveFrom (System.Byte[] buffer, System.Net.EndPoint& remoteEP) [0x00000] in <filename unknown>:0 at System.Net.Sockets.UdpClient.Receive (System.Net.IPEndPoint& remoteEP) [0x00000] in <filename unknown>:0 at UDPPacketIO.ReceivePacket (System.Byte[] buffer) [0x0003e] in C:\Users\Rushfell\Dropbox\Lusio\Lusio_Unity\Assets\Scripts\OSC\OSC.cs:244 at OSC.Read () [0x00014] in C:\Users\Rushfell\Dropbox\Lusio\Lusio_Unity\Assets\Scripts\OSC\OSC.cs:573 UnityEngine.Debug:Log(Object) OSC:Read() (at Assets/Scripts/OSC/OSC.cs:595)

I doesn't seem to necessarily do anything bad(?), as in preventing me from using OSC, but I felt I should report it.
Using Unity 2018.2.1f1, but also had it happening in Unity 2017.4 before I upgraded the project.

@thomasfredericks
Copy link
Owner

Ok, I figured out what the problem is. It is because of the UDP receive that is blocking the thread. I do not have enough experience to fix this.

@thomasfredericks
Copy link
Owner

Basically I do not know how to break byte[] incoming = Receiver.Receive( ref iep ); before closing the Read() thread.

@noemis84
Copy link

I had the same problem (thread hang on the line byte[] incoming = Receiver.Receive( ref iep );

I recived the incoming osc data with a ocs monitor, but not in Unity. After turning off the firewall completly I got the incoming data. So I turned on firewall again, looked for advanced rules of the firewall (incoming rules) and there the Unity Version xxx entry. In my case, incoming connections weren't allowed for some reason for this version.

Maybe this helps someone. I searched hours for a solution and tested even other plugins.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants