Search Issue Tracker
Fixed in 5.2.0
Votes
6
Found in
5.0.0p3
Issue ID
685815
Regression
No
[WebCamTexture] Unity crashes upon first Webcam texture access on OSX
Steps to reproduce this issue:
-import the attached Unity package (' WebcamBugUnity5;)
-open the 'webcamscene'
-in the scene, select the Quad game-object
-select a webcam from the dropdown list in the inspector
-play
-wait a few seconds and observe the crash
-The second time you run it, the webcam will work fine
The crash only occurs the FIRST TIME you run this project AFTER REBOOTING the OSX machine
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Size value in Particle System Curve's tab is highlighted with selection across all tab header
- Particle System Curve's Presets window has no visual indication of what preset is selected
- Blur shader doesn't work when the "Scene Color" Node is attached to the UI "Output" Node
- Particle System Curve presets can't be scrolled and some of them can't be selected if window is too narrow to fit them all
- Mistakes in multiple Particle System Components pop-up
Cromfeli
Aug 12, 2015 13:45
"If before accessing the camera in Unity, I access it from another source, such as http://webcamtoy.com/app/ the Unity crash doesn't happen, even on the first load. This makes me believe the issue is isolated to how Unity handles loading the webcam on OS X."
I can also confirm that launching any app on OSX that utilizes camera before running prevents the crash from happening.
Process: aaa [4203]
Path: /Users/USER/Desktop/aaa.app/Contents/MacOS/aaa
Identifier: unity.bbb.aaa
Version: Unity Player version 5.0.2f1 (5.0.2f1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: aaa [4203]
User ID: 501
Date/Time: 2015-06-04 13:47:04.465 +0300
OS Version: Mac OS X 10.10.3 (14D136)
Report Version: 11
Anonymous UUID: 7A3A5694-124D-FCA6-377B-1AB77F8B9DDC
Time Awake Since Boot: 14000 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: EXC_I386_GPFLT
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff977c8286 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff8c97eb53 abort + 129
2 libmono.0.dylib 0x0000000101ddc05a mono_handle_native_sigsegv + 732
3 libmono.0.dylib 0x0000000101e23b8f sigabrt_signal_handler + 100
4 libsystem_platform.dylib 0x00007fff9214ef1a _sigtramp + 26
5 libsystem_kernel.dylib 0x00007fff977c8286 __pthread_kill + 10
6 libsystem_c.dylib 0x00007fff8c97eb53 abort + 129
7 unity.bbb.aaa 0x0000000100432754 HandleSignal(int, __siginfo*, void*) + 36
8 libmono.0.dylib 0x0000000101e2379a mono_chain_signal + 71
9 libmono.0.dylib 0x0000000101d70c7f mono_sigsegv_signal_handler + 213
10 libsystem_platform.dylib 0x00007fff9214ef1a _sigtramp + 26
11 unity.bbb.aaa 0x00000001008d8757 GfxDeviceClient::BeginFrame() + 71
12 unity.bbb.aaa 0x00000001002230ed Camera::Render(CullResults&, ShaderLab::ShaderPassContext&, int) + 381
13 unity.bbb.aaa 0x000000010026010d RenderManager::RenderCameras(int) + 413
14 unity.bbb.aaa 0x00000001003d68a4 PlayerRender(bool) + 148
15 unity.bbb.aaa 0x00000001003d73c9 PlayerLoop(bool, bool, IHookEvent*) + 2121
16 unity.bbb.aaa 0x00000001008580d0 -[PlayerAppDelegate UpdatePlayer] + 240
17 com.apple.Foundation 0x00007fff91ca1953 __NSFireTimer + 95
18 com.apple.CoreFoundation 0x00007fff8eba42e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
19 com.apple.CoreFoundation 0x00007fff8eba3f73 __CFRunLoopDoTimer + 1059
20 com.apple.CoreFoundation 0x00007fff8ec1753d __CFRunLoopDoTimers + 301
21 com.apple.CoreFoundation 0x00007fff8eb5f608 __CFRunLoopRun + 2024
22 com.apple.CoreFoundation 0x00007fff8eb5ebd8 CFRunLoopRunSpecific + 296
23 com.apple.HIToolbox 0x00007fff92b0d56f RunCurrentEventLoopInMode + 235
24 com.apple.HIToolbox 0x00007fff92b0d2ea ReceiveNextEventCommon + 431
25 com.apple.HIToolbox 0x00007fff92b0d12b _BlockUntilNextEventMatchingListInModeWithFilter + 71
26 com.apple.AppKit 0x00007fff9809c9bb _DPSNextEvent + 978
27 com.apple.AppKit 0x00007fff9809bf68 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
28 com.apple.AppKit 0x00007fff98091bf3 -[NSApplication run] + 594
29 com.apple.AppKit 0x00007fff9800e354 NSApplicationMain + 1832
30 unity.bbb.aaa 0x0000000100857c92 PlayerMain(int, char const**) + 738
31 unity.bbb.aaa 0x0000000100001974 start + 52
More here: http://www.touch-code-magazine.com/how-to-debug-exc_bad_access/
SoylentGraham
Apr 30, 2015 16:04
Issue 689738 should have a callstack (somewhere in dynamic texture allocation IIRC)
SoylentGraham
Apr 30, 2015 16:01
Also occurs for me on first OS wake up from sleep.
codeStrider
Apr 23, 2015 19:52
I am getting the exact same issue.
OS X 10.10.3
Unity 5.0.1p1
The code to duplicate this crash for me can be isolated to the following code. It doesn't matter when it runs, I've done it on Awake(), Start(), Update(), and in a Coroutine. All with the same result.:
CameraContainer.texture = new WebCamTexture();
((WebCamTexture) CameraContainer.texture).Play();
If I run Debug.Break(); immediately after this I see the webcamtexture being loaded, but it looks like it has vertical scanlines of the camera input.
If before accessing the camera in Unity, I access it from another source, such as http://webcamtoy.com/app/ the Unity crash doesn't happen, even on the first load. This makes me believe the issue is isolated to how Unity handles loading the webcam on OS X.