jiulongw / swift-unity

Sample code that integrate Unity (2017.1+) scene into iOS (Swift 4.0, Xcode 9+) project.
390 stars 100 forks source link

UnityGfxDeviceWorker (18): EXC_BAD_ACCESS (code=1, address=0x1) (Unity 2017.3.0f3 & Vuforia 7.0.36) #34

Closed ohwhen closed 6 years ago

ohwhen commented 6 years ago

I realize this project is strictly for Unity & iOS integration but I'm running into the same issues as #4 I made sure I included the right NSCameraUsageDescription in the plist file and tried following the advice in this reply but to no avail.

Everything works flawlessly when I run the demo app. But as soon as I drag a Vuforia ARCamera object into the Unity project and try to build I'm running into this error. This even happens with the DemoApp (drag ARCamera object onto scene and rebuild)

Stack trace

0x102d42414 <+40>:  bl     0x103f71f60               ; symbol stub for: objc_retain
0x102d42418 <+44>:  mov    x19, x0 UnityGfxDeviceWorker (14): EXC_BAD_ACCESS (code=1, address=0x1)

Console

System.Array:Resize(T[]&, Int32, Int32)
Vuforia.ITrackerManager:GetTracker()
Vuforia.ITrackerManager:GetTracker()
Vuforia.ITrackerManager:GetTracker()

**Debug Navigator**
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

(lldb)

screen shot 2018-01-08 at 4 05 53 pm

JasonPan commented 6 years ago

I had this issue and found that it was because Metal was enabled in my Unity project.

Try going into your Player settings -> Other Settings and

Hope this helps!

jiulongw commented 6 years ago

Thanks @JasonPan .

@ohwhen , feel free to re-open this issue if you still have problems.

ohwhen commented 6 years ago

Thanks @JasonPan we already found the exact same solution.