Closed mikosaure closed 5 years ago
Greetings and thanks for the bug report. Sorry for the late response - apparently an email arrived about this ticket while I was asleep this morning and it failed to land in my urgent inbox folder.
Are you supplying a IP address or a host name when calling that function? If it's a host name it could be that it's trying to do a DNS lookup and failing to do so. If it's just a standard IP Address then something is weird and I might have to talk to a friend who is very fluent in C. I haven't actually used the Xcode Debugger so I'll have to get a little antiquated with it.
As for iOS 9.3.5, That's definitely an older version of iOS that you're lucky that I actually have a device that supports said version iOS - I believe a 3G + WiFi iPad 2. Or a duo of iPhone 4S units.
Would you happen to be able to share a repro project or any scripts/instructions on how to get it to crash on iOS? Or do you want me to compile for iOS with the included Pong example and see if that craps itself?
Hey there!
thanks for getting back to me.
I'm supplying an IP address. I was able to reproduce the problem with a minimal project: Mirror package + Ignorance and running the "Basic" example from Mirror. Just type an IP address then LAN Client, and it'll crash right after the log "Ignorance successfully initialized ENET.".
Definitely an old version of iOS and unfortunately these iPads can't update to a newer version :(
Thanks a lot for your help. Mike
Le jeu. 22 août 2019 à 04:51, Coburn notifications@github.com a écrit :
Greetings and thanks for the bug report. Sorry for the late response - apparently an email arrived while I was asleep this morning and it failed to land in my urgent inbox folder.
Are you supplying a IP address or a hostname when calling that function? If it's a host name it could be that it's trying to do a DNS lookup and failing to do so. If it's just a standard IP Address then something is weird and I might have to talk to a friend who is very fluent in C. I haven't actually used the Xcode Debugger so I'll have to get a little antiquated with it.
As for iOS 9.3.5, That's definitely an older version of iOS that you're lucky that I actually have a device that supports said version iOS - I believe a 3G + WiFi iPad 2. Or a duo of iPhone 4S units.
Would you happen to be able to share a repro project or any scripts/instructions on how to get it to crash on iOS? Or do you want me to compile for iOS with the included Pong example and see if that craps itself?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SoftwareGuy/Ignorance/issues/50?email_source=notifications&email_token=AM62UAPQ7NDQ5B5OQ2SH7PDQFZ4SXA5CNFSM4IOLSDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD442MLI#issuecomment-523871789, or mute the thread https://github.com/notifications/unsubscribe-auth/AM62UAKOVNYYZQKGBD7YDBLQFZ4SXANCNFSM4IOLSDFA .
Excellent, thanks for that information.
I am currently in the throws of putting together a repro project, just waiting for the iOS module of unity to finish installing and I'll throw it across to the iPad 2 I have attached to my Macbook Pro.
Will update when I attempt to replicate this failure.
Okay, I tracked it down and it's due to ENET assuming availability of the monotonic clock_gettime(...)
call. On things previous to iOS 10, this causes a E_ARM_BREAKPOINT
exception that XCode catches in the debugger and provides a stack trace. I also noticed the same issue here in this Stack Overflow issue.
This will be fixed in the ENET source code contained my fork of ENET-CSharp and will be included in the release of Ignorance 1.3.2+.
I must say that this was a interesting bug as I realize some older iOS devices might be sentimental to some developers and/or you have to support a user/client base that use a lot of old versions.
Here's the replacement libenet.a
file you'll need if you don't want to wait for a new release of Ignorance. Simply use this one rather than the one that ships with Ignorance.
Please let me know how this works and I'll close the ticket after marking as resolved.
I've tried to replace the libenet.a
file with the new one but now it doesn't link anymore with the following error:
Undefined symbols for architecture armv7: "_enet_host_broadcast_excluding", referenced from: _Host_Broadcast_mBD17441DEEB7307BC68418776F7C860932A1E545 in Bulk_Mirror_0.o _Native_enet_host_broadcast_excluding_mC3547C283B7DFB5F57C408D67E3337816F029D31 in Bulk_Mirror_0.o (maybe you meant: _Native_enet_host_broadcast_excluding_mC3547C283B7DFB5F57C408D67E3337816F029D31) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any idea how to fix that?
That's really strange...
Let me check the iOS ENET Build Environment again. I might have forgotten an architecture or something silly.
Please try this binary, I built it without debug and as MinSizeRel
which is a stripped release build.
I replaced the file in the Plugins folder in Ignorance and clicked "Build" in the Unity Build Settings. It spat out a project that compiled, linked and installed onto a test iPhone 4S running OS version 9.3.5 just fine.
As you can see if you run lipo -archs
on the library:
$ lipo -archs libenet.a
armv7 armv7s arm64 arm64e
It's definitely there, maybe Xcode cache messed up? libenet_recompile.zip
Very strange: I still have the same problem with the new one.
Looks like the symbol _enet_host_broadcast_excluding
is missing.
When I do nm -a
on the old file I find the symbols but not on the new one?
Hrm.... let me talk to my C programmer friend and I'll get back to you on this. I'm stumped as well.
Hey gang, something is getting mismatched here. The symbol should be: enet_host_broadcast_exclude
And not:
enet_host_broadcast_excluding
Native: https://github.com/SoftwareGuy/ENet-CSharp/blob/master/Source/Native/enet.h#L736 Managed: https://github.com/SoftwareGuy/ENet-CSharp/blob/master/Source/Managed/ENet.cs#L983
And it's updated in Ignorance master: https://github.com/SoftwareGuy/Ignorance/blob/master/Assets/Mirror/Runtime/Transport/Ignorance/Dependencies/ENet.cs#L983
So it looks like you are missing this commit in Ignorance: https://github.com/SoftwareGuy/Ignorance/commit/9857de28f61ae2198225438ef974a023f5b70f1b
It definitely was excluding but should now be excluded
Yes!! It's working fine with that commit and updated library (and also the other commit to fix the server bug). Looks like everything is great now! Thanks a lot
Will mark this as resolved and close, please don’t hesitate to reopen if the problem comes back. 🙂
Hi there,
I'm experiencing a crash on iOS 9.3.5 (works perfect on iOS 10 and later versions) with XCode 10.2.1 and Unity 2018.3.11f1.
It crashes when I call
Mirror.Ignorance:ClientConnect(String)
. That line:int32_t returnValue = reinterpret_cast<PInvokeFunc>(enet_host_service)(___host0, ___event1, ___timeout2);
in:
Native_enet_host_service_m48FBC7FF96DFB99185B042148A1B5F95D6BD9AC6
There is not much details about the error, just:
Any idea where it can come from?
Thanks a lot for your help!