BoltEngine / Bolt-Tracker

New issue tracker for Photon Bolt
10 stars 2 forks source link

ThreadAbortException (StartServer & StartClient) #126

Closed M1raclee closed 5 years ago

M1raclee commented 5 years ago

How to reproduce issue

  1. Setup Unity 2019.1.5f1
  2. Change scripting backend IL2CPP and .Net 4.0
  3. Call "StartServer" or "StartClient"

Actual behavior

Got error: ThreadAbortException at ExitGames.Client.Photon.SupportClass+<>c__DisplayClass6_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadStart.Invoke () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadStart.Invoke () [0x00000] in <00000000000000000000000000000000>:0 System.UnhandledExceptionEventHandler:Invoke(Object, UnhandledExceptionEventArgs)

(Filename: currently not available on il2cpp Line: -1)

Configuration

ramonmelo commented 5 years ago

What is the target of your build?

M1raclee commented 5 years ago

Moving to Unity 2019 and need support ARM64, which is only in a IL2CPP (https://blogs.unity3d.com/2019/03/05/android-support-update-64-bit-and-app-bundles-backported-to-2017-4-lts/)

JohnTube commented 5 years ago

Hi @ByvDeveloper,

What is your target platform? Android? See my post here.

We think that this is a Unity bug. Update Unity and try to reproduce.

M1raclee commented 5 years ago

@JohnTube Yes, Android. And Unity 2019.1.5, but bug still exists.

JohnTube commented 5 years ago

Hi @ByvDeveloper

What Android device models did you try this on? What Android OS versions are they running?

M1raclee commented 5 years ago

@JohnTube Huawei P Smart, Huawei P Smart +, Xiaomi redmi note 5 Android 8.0, Android 8.1

Tobias-EG commented 5 years ago

I could reproduce the issue and fix it in the Photon3Unity3d.dll. An update is pending.

JohnTube commented 5 years ago

Hey @ByvDeveloper,

ICYMI:

PUN 2.13 is out with a new library v4.1.2.16 in its changelog:

Fixed: Each thread created via SupportClass.StartBackgroundCalls will now try-catch a ThreadAbortException. Apparently, the handling of a ThreadAbortException changed with Unity 2019, which started to log the exceptions on IL2CPP, 4.x runtime.

If you do not want to wait for Bolt 1.2.9 you can download PUN2 and import only the lib ("Assets/Photon/PhotonLibs/Photon3Unity3d.dll")

ramonmelo commented 5 years ago

Thanks for the feedback!

Fixed on the next release.