Log in or register to post comments

Unity 4.2 Crashing After Ever Code Change

August 14, 2013 - 7:44pm #35

Vuforia SDK Version: 2-6-7 -

Description with steps to reproduce:

Hello.  I updated Vuforia earlier today to work with Cylinder targets and have been having some major problems ever since.

The problem occurs after I've changed code in MonoDevelop.  What normally happens is I'll make my code changes, switch back to Unity, then all the scripts will compile automatically and I can press the Play button and run.  However, since this update, that is turning into a major issue.  Now, when I switch back over to Unity after changing code one of two things happens either A) Unity immediately crashes and brings up a bug report or B) Unity will get stuck in compilation.  This is represented, since I'm OSX, as the spinning beach ball.  Either way, I cannot get ANY code changes to reflect without having to restart Unity.

Now this is a major holdup because I can't go through the process of force quitting and restarting Unity every time I want to make a change.  I'm not certain if the actual crash/hang up is during script compilation or asset importing, but as of right now I can't make any changes without a force quit and reboot.  Please help, we need this cylinder stuff in the new SDK right away.

Thank you-

Mike

-

Development OS (Mac OS X, Windows, Linux): OSX -

Mobile OS and Version: not relevant -

Mobile Device Manufacturer and Model name: not relevant -

Do the Vuforia Sample Applications show the same behavior?: I haven't changed any of the samples.

Unity 4.2 Crashing After Every Code Change With new Vuforia SDK

August 15, 2013 - 9:30am #34

Just a heads up I noticed that the last shared line between a successful compile and an unsuccessful one is this:

 

Begin MonoManager ReloadAssembly

 

I'm not sure if that's relevant but reloading the assemblines doesn't seem to be working...until you reboot Unity that is.

Thanks

 

Unity 4.2 Crashing After Every Code Change

August 15, 2013 - 12:22pm #33

UPDATE:

OK, so to try and track this down I created a fresh project, imported the latest extension (2.6.7) and the cylinder project and I'm still getting the crashes.  What I did was open up the relevant scene, make a single change to QCARBehavior, go back to Unity and it crashes every time.  I've gotten the bug report and am posting the relevant sections.  It looks like it's crashing when trying to deal with assets.  

 

Process:         Unity [14464]
Path:            /Applications/Unity/Unity.app/Contents/MacOS/Unity
Identifier:      com.unity3d.UnityEditor4.x
Version:         Unity version 4.2.0f4 (4.2.0f4)
Code Type:       X86 (Native)
Parent Process:  sh [14462]
 
Date/Time:       2013-08-15 15:17:14.073 -0400
OS Version:      Mac OS X 10.7.5 (11G63b)
Report Version:  9
 
Interval Since Last Report:          3947237 sec
Crashes Since Last Report:           19
Per-App Interval Since Last Report:  797684 sec
Per-App Crashes Since Last Report:   4
Anonymous UUID:                      BEDEF47A-E4E4-41F8-A9A0-8D5544D27215
 
Crashed Thread:  0  Dispatch queue: com.apple.main-thread
 
Exception Type:  EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000085
 
VM Regions Near 0x85:
--> __PAGEZERO             0000000000000000-0000000000001000 [    4K] ---/--- SM=NUL  /Applications/Unity/Unity.app/Contents/MacOS/Unity
    __TEXT                 0000000000001000-0000000001b81000 [ 27.5M] r-x/rwx SM=COW  /Applications/Unity/Unity.app/Contents/MacOS/Unity
 
Application Specific Information:
objc[14464]: garbage collection is OFF
abort() called
 
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib         0x95ab69c6 __pthread_kill + 10
1   libsystem_c.dylib             0x9af65f78 pthread_kill + 106
2   libsystem_c.dylib             0x9af56bdd abort + 167
3   libmono.0.dylib               0x03cac19e mono_handle_native_sigsegv + 1246
4   ???                           0xffffffff 0 + 4294967295
5   libsystem_c.dylib             0x9af56bdd abort + 167
6   com.unity3d.UnityEditor4.x     0x0124f5a5 LaunchBugReporter(BugReportMode) + 1189
7   com.unity3d.UnityEditor4.x     0x009df9fa HandleSignal(int, __siginfo*, void*) + 42
8   libmono.0.dylib               0x03d30154 mono_chain_signal + 132
9   ???                           0xffffffff 0 + 4294967295
10  com.unity3d.UnityEditor4.x     0x00dcf723 AssetDatabase::UpdateAsset(UnityGUID const&, UnityGUID const&, MdFour const&, int) + 5475
11  com.unity3d.UnityEditor4.x     0x00df79a6 AssetInterface::ProcessAssetsImplementation(double&, AssetInterface::CancelBehaviour) + 544
12  com.unity3d.UnityEditor4.x     0x00df889b AssetInterface::StopAssetEditing(AssetInterface::CancelBehaviour) + 317
13  com.unity3d.UnityEditor4.x     0x00dfe7e5 AssetInterface::Refresh(int) + 8197
14  com.unity3d.UnityEditor4.x     0x010b5307 Application::AutoRefresh() + 159
15  com.unity3d.UnityEditor4.x     0x0125520c -[EditorApplication autoRefreshIfPossible] + 28
16  com.unity3d.UnityEditor4.x     0x012551da -[EditorApplication applicationDidBecomeActive:] + 26
17  com.apple.Foundation           0x96ab2df1 __-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_1 + 49
18  com.apple.CoreFoundation       0x9889e903 ___CFXNotificationPost_block_invoke_1 + 275
19  com.apple.CoreFoundation       0x98869688 _CFXNotificationPost + 2776
20  com.apple.Foundation           0x96a9dfde -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
21  com.apple.Foundation           0x96ab3272 -[NSNotificationCenter postNotificationName:object:] + 55
22  com.apple.AppKit               0x908e9883 -[NSApplication sendEvent:] + 3008
23  com.unity3d.UnityEditor4.x     0x01266cde -[ForwardSendEvent sendEvent:] + 174
24  com.apple.AppKit               0x9087bb21 -[NSApplication run] + 1007
25  com.apple.AppKit               0x90b0cac5 NSApplicationMain + 1054
26  com.unity3d.UnityEditor4.x     0x0126695a main + 1274
27  com.unity3d.UnityEditor4.x     0x00002a19 _start + 208
28  com.unity3d.UnityEditor4.x     0x00002948 start + 40
 

Unity 4.2 Crashing After Ever Code Change

August 15, 2013 - 6:34pm #32

Which scripts are you modifying when the crashes occur?

Does this occur when modifying non-critical scripts, like the CameraDeviceMenu.cs?

Did you maintain an earlier installation of Unity that you can work with?

Unity 4.2 Crashing After Ever Code Change

August 16, 2013 - 1:38am #31

The problem occurs after I've changed code in MonoDevelop

 

 

...Glad to know that I am not the only one who is having these types of crashes, as I have seen them regularly after upgrading to Unity 4.2.0f4, and in my case it does not seem to be related to Vuforia.  In general when you make a script change in MonoDevelop, and it crashes Unity then it is unlikely that any plug-in would be responsible for this.

I will check with the development team, but in the meantime I suggest you submit a bug report to Unity and chase them.

 

BTW Are you using a retina Macbook Pro by any chance?

 

N

 

Unity 4.2 Crashing After Ever Code Change

August 16, 2013 - 9:43am #30

I've seen this happen when modifying any script in the game, including my own new scripts that are specific to the game.  However, this does tend to happen more often when modifying a script like DefaultTrackableEventHandler.cs or QCARBehavior.cs.  And the modifications don't have to be anything more than just adding a simple space key and saving the file.  This seems to have gotten worse as things went along because two versions of the Vuforia SDK ago I was changing everything without problems, but at this point it can crash with nothing more than SDK's and demo packages installed.  I'm not sure if it's Unity related but I can't roll back to an earlier version unfortunatley because my clients insist on me being the same version as them.  

Unity 4.2 Crashing After Ever Code Change

August 16, 2013 - 9:45am #29

I've been working with Unity for a while now and haven't seen anything like this before.  In fact, the Vuforia packages are the only plugins where I can even see the Unity popup telling me that it's compiling.  There are a ton of files added but the compilation still seems slow. But that's fine, it's the crashing that is causing the issue.  I have submitted the bug to Unity, even including a project that's just the SDK and cylinder demo imported (can't send my full project due to NDA etc etc etc).  And my computer is a MacBook Pro but it's not a retina version, it's the last of the 17" models.

 

Unity 4.2 Crashing After Ever Code Change

August 16, 2013 - 11:53am #28

We're pursuing this issue on our side as well and will update this thread with any info we gather.

Unity 4.2 Crashing After Ever Code Change

August 18, 2013 - 12:57am #27

I find some solve this problem which help me. When you save script in MonoDevelop, make sure that no objects are selected in Unity3d and after save refresh you script in Inspector by press 'Reset' menu. I think it problem with sync Inspector  and MonoDevelop.

Unity 4.2 Crashing After Ever Code Change

August 18, 2013 - 1:40pm #26

I've confirmed that islavik777's advice works for me as well. If I ensure that no objects in the Hierarchy are selected, I can make code changes and they will compile successfully, without crashing the Editor.

Good catch!

Unity 4.2 Crashing After Ever Code Change

August 21, 2013 - 10:11am #25

I am experiencing the exact same issues using Unity 4.2.0f4 with Vuforia 2.6.7

Importing Vuforia into a blank project causes compile time to increase from instantaneous to ~5-10 seconds, even with very slight script changes.

Bringing a Cylinder target into the scene causes the compiler to hang forever about every other time I make a change to a script (sometimes every time). 

This happens regardless of whether I have anything selected in the scene while I am changing scripts in Monodevelop.

This is a very troublesome bug, as I cannot change scripts without having to restart Unity.

Unity 4.2 Crashing After Ever Code Change

August 21, 2013 - 2:44pm #24

Unfortunately I have to agree with MerlinMo here.  Even if I have no GameObject selected in my heiratchy I still get Unity to crash.  It DID compile a couple of times but went back to crashing every time soon after.  I was also a little bit confused by some of islavik777's advice.  I tried using the Reset button on the script's cog, but A) Unity would still automatically compile anyway, thus having the same problem.  I got rid of the auto-compile by going into Unity Preferences and turning off Auto Refresh.  This stopped the automatic compile, but even if I made code changes and tried the Reset trick my changes weren't reflected.  Is there something else I'm missing or misunderstanding about the instructions?

Still, this did lead me to the only permanent solution I've been able to find. Turn off Auto Refresh, then every time you make a code change do Assets->Synch Monodevelop Project.  This does all the compiling and things are ok.  

So the crash is still definitely there, but at least there's some leads to work arounds.  

If I discover any more information I'll be sure to share it right away.

-Mo

Unity 4.2 Crashing After Ever Code Change

August 21, 2013 - 3:22pm #23

OK just a quick update for a workaround that so far has worked.  

1) Go to Unity->Preferences->General and turn off Auto Refresh

2) Update code in MonoDevelop normally.

3) Go back to Unity, highlight the script in the Project window (other scripts seem to work as well), right click and select ReImport.

4) Game compiles and runs normally.

 

Still odd that it crashes if Auto Refresh is on but I'm still digging.

-mo

Unity 4.2 Crashing After Ever Code Change

August 22, 2013 - 12:35am #22

Thanks Mike for this great tips, if I may just slightly correct the procedure:

  1. In the Unity Editor menubar, select Edit > Preferences > General and disable the Auto Refresh option
  2. Update code in MonoDevelop normally
  3. When back to the Unity Editor, highlight the script in the Project window, right-click on it and select ReImport or Refresh

Unity 4.2 Crashing After Ever Code Change

August 29, 2013 - 4:13am #21

Thanks for the workarounds! This issue has been bugging me for weeks.

I noticed that It does only occur on my Windows PC, not on the Mac!

Unity 4.2 Crashing After Ever Code Change

August 29, 2013 - 5:35am #20

@jank, I can't confirm this. to me it happens on a MBPr constantly.

The strange thing is, that I have 2 almost identical machines (one at home, one at work) and just one of them seems to crash constantly, while the other one doesn't at all.

Well let's hope Unity is going to fix it. Did someone actually file a bug report already???

Unity 4.2 Crashing After Ever Code Change

August 29, 2013 - 5:52am #19

I cannot tell for sure yet, but chances are that this bug will be fixed in the next 4.2.1 release of Unity.

Fingers crossed!

Unity 4.2 Crashing After Ever Code Change

August 29, 2013 - 6:44am #18

I am in touch with Unity and they are aware of the issue, but so far to my knowledge this has not yet been resolved successfully.

N

Unity 4.2 Crashing After Ever Code Change

August 29, 2013 - 7:41am #17

I can definitely confirm that it's happening on a MacBook Pro because that's the exact machine I'm using heh.  Sounds like it could be inonsistent between computers but once you have the problem it's there to stay.  I have filed multiple bug reports with Unity, including one where I sent up a zipped up copy of a cylinder demo project, and haven't hard back.  The only thing I've heard is from a regular in the forums who said it could be related to an issue that is getting resolved in 4.2.1.  Or 4.3 whatever comes out first but I'm not sure when that is coming out.

 

Unity 4.2 Crashing After Ever Code Change

September 3, 2013 - 12:52am #16

Not fixed for me in 4.2.1f4.

Although something seems to behave differently when importing, it still freezes.

Unity 4.2 Crashing After Ever Code Change

September 3, 2013 - 9:46am #15

Thank you for the info, this bug was actually the only reason I was going to try an update so you've saved me the time heh.

FWIW I've found that you don't even need to mess around with things in the Project window to get a recompile.  Once you tab back to Unity just hit ctrl-R/cmd-R to Refresh and it works exactly like a compile button.  

Unity 4.2 Crashing After Ever Code Change

September 13, 2013 - 12:01pm #14

Nope, 4.2.1 is just as bad.  Worse when importing assets it seems.  My newly installed 4.2.1 has crashed 8 times today alone.

Unity 4.2 Crashing After Ever Code Change

September 14, 2013 - 1:36pm #13

@cap10subtext are you on Mac or Win? - the newest Win versions should be stable.

Unity 4.2 Crashing After Ever Code Change

September 14, 2013 - 1:43pm #12

Mac 10.7.5

Unity 4.2 Crashing After Ever Code Change

September 18, 2013 - 12:35pm #11

Hey guys, same issues here

-long compile time every time I come back to Unity from Monodevelop

-occasional crashes when that happens

-occasional crashes when importing packages

 

Mac, osx 10.8.4, Unity 4.2.0

Unity 4.2 Crashing After Ever Code Change

September 18, 2013 - 11:56pm #10

We are monitoring this issue with the Unity team, as there are indeed some stability problems in Unity 4.2.x, particularly on Mac.

On the Windows side, the latest 4.2.1 seems to be a bit more stable than 4.2.0, however, we are still observing some crashes occasionally.

Unity 4.2 Crashing After Ever Code Change

September 19, 2013 - 7:51am #9

Seems that in the Unity 4.2.x version, when you came back from Mono there is now the progress bar indicating compiling status. If you take a look to it, you can see that after this progress bar another one will appear very quickly, I can't see what's going on. Unity crashes at this time.

If you disable the auto refresh, it seems that the progress bar is not displayed anymore, it compiles as before and doesn't crash.

Hope it helps...

Unity 4.2 Crashing After Ever Code Change

September 27, 2013 - 7:04pm #8

I am experiencing exactly the same problem using Unity 4.2.1f4.

Unity 4.2 Crashing After Ever Code Change

October 9, 2013 - 1:39am #7

Unity is now preparing a 4.2.2 release (currently they are in RC phase), which seems to include several fixes/improvements;

as far as I can tell, based on the latest tests, the Editor still crashes after editing script code in MonoDevelop;

however, as MikePilated has suggested in a previous post, a simple workaround is to:

  •  Disable AutoRefresh (via Menu -> Edit -> Preferences),
  • and then simply hitting Ctrl+R (or Cmd+R on Mac) to trigger a refresh (after editing a script and returning to the Editor view);

this seems to work flawlessly.

 

Unity 4.2 Crashing After Ever Code Change

November 6, 2013 - 9:17am #6

Ugh. Nope. 4.2.2f1 is still crashing. Funny thing is that everything was fine with script saving / auto-reimporting until I modified a few lines in the DefaultTrackableEventHandler.cs, more specifically when I had added a public var up top.

MacbookPro 10.8.5
Unity 4.2.2f1
MonoDevelop 2.8.2

This needs fixed. The workaround is messing with my zen thing man.

 

Yar,

CapnJ

Unity 4.2 Crashing After Ever Code Change

November 6, 2013 - 8:43pm #5

Some of my students observed that it only seems to crash if you are using an image target in your scene and if any object is selected in your hierarchy when you switch back to the editor form mono develop.  Otherwise it doesn't seem to crash.

But seriously this is brutal.  Teaching students to disable the auto-refresh and then having to keep reminding them to refresh to see the changes in their code or else watching them get frustrated from it crashing has made for a pretty stressful last couple months.

Unity 4.2 Crashing After Ever Code Change

November 7, 2013 - 12:33am #4

Seems like Unity 4.3 should probably arrive soon and may (hopefully) fix this issue. Stay tuned....

 

Unity 4.2 Crashing After Ever Code Change

November 14, 2013 - 7:03pm #3

looks to be fixed in 4.3! haven't tested all my projects yet but seems to be working so far in the ones I've tried.

thanks for staying on top of this guys!

Unity 4.2 Crashing After Ever Code Change

November 15, 2013 - 2:23am #2

Please note that Unity 4.3 which was just released is not compatible with Vuforia 2.6. 

This issue will be resolved in the next release of the Vuforia Unity extension, which will be available in the near future
 

However, if you are developing for iOS only, there is a simple workaround described here:

https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/unity-43-ios-compatibility-and-workaround

 

Unity 4.2 Crashing After Ever Code Change

November 20, 2013 - 7:21am #1

I updated to v4.2.2f1 a few weeks ago and I'm also experiencing this issue, didn't have it before in 4.2.0 for some reason. It does seem to happen most often when I modify Vuforia type scripts, like when I created a TrackableEventHandler script and interacting with the ImageTarget prefabs. Wasn't noticing it before when I was working on my own scripts.

Log in or register to post comments