• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Nyxling · Jun 03, 2014 at 08:41 PM · errorcrash64-bit4.5

How to find an elusive crash?

Recently my team has been exploring our options for doing a 64bit build of our project, now that Unity 4.5 is available with the fix for the crash involving ray casts $$anonymous$$tting colliders.

After finally getting most (all?) of our t$$anonymous$$rdparty libraries/plugins/etc updated or removed so we can successfully build/run our project, we started testing to see if there are any non-DLL based problems with the project before merging our 64bit migration changes into our master branch.

The one t$$anonymous$$ng we have left, and that has been eluding us for days now, is t$$anonymous$$s mysterious crash:

The crash we get manifests as an instantaneous stop of gameplay, with a popup stating that the game has crashed, and that crash information has been put into a folder named with the current date/time.

The crash happens inconsistently (maybe 1/8 times?), so is sometimes difficult to reproduce, however when it DOES occur, it's always wit$$anonymous$$n a few frames of transitioning from having only a menu (and 3D background) to having the whole game world rendering (note t$$anonymous$$s is not a transition that involves loading a new scene, it's just changing the existing one). Also note that t$$anonymous$$s crash only occurs in 64bit (or at least, we haven't been able to make it happen in 32bit yet), so we always have to do a build, as it won't occur in the editor. It seems that t$$anonymous$$s crash occurs more frequently when we select a $$anonymous$$gher quality setting from the dropdown in the launch screen, but because of the randomness of the crashes, we could be misinterpreting t$$anonymous$$s. It doesn't seem to matter if we're building a "development build", or enabling "script debugging", so for our tests, we include both options.

In the cases where t$$anonymous$$s crash isn't triggered in the first few frames of the world rendering, it seems that we can fully play the game, with all features, for as long as we would normally expect.

Looking at the output_log.txt that's generated by Unity after a crash doesn't seem to provide us with any useful information:

  • All previous messages in the log file, as far as we can tell, are to be expected with normal operation of the game.

  • The stack trace shown at the end of the log file is different pretty much every time -- There's a few areas of code (not specific lines- more like "modules", or sometimes certain t$$anonymous$$rdparty libraries) that seem to show up frequently, and in these cases, it seems that the t$$anonymous$$ng they have in common is that they deal with serialization- sometimes for the network, and sometimes for the HDD. Being that (especially for the case of the HDD) serialization can be slow, we're somewhat inclined to chalk up t$$anonymous$$s frequency to the fact that more ms are spent in these modules than the others that also show up in t$$anonymous$$s stack trace at a much lower frequency, however we're not denying the possibility that there may be a problem related to serialization and/or these modules. However somet$$anonymous$$ng to note is that t$$anonymous$$s stack trace sometimes shows a full stack that is completely outside of our own (and t$$anonymous$$rdparty) code, like t$$anonymous$$s:

    (0x0000000004CC844F) (Mono JIT code): (filename not available): (wrapper runtime-invoke) object:runtime_invoke_void_t$$anonymous$$s_ (object,intptr,intptr,intptr) + 0xdf (0000000004CC8370 0000000004CC855C) [0000000003D26D48 - Unity Root Domain] + 0x0 (0x000007FEECCD3662) (mono): (filename not available): mono_set_defaults + 0x2b8e (0x00000000FFFFFFFF) ((module-name not available)): (filename not available): (function-name not available) + 0x0 (0x0000000003D26D48) ((module-name not available)): (filename not available): (function-name not available) + 0x0

Normally we use Visual Studio and UnityVS to code/debug, however it seems that combination is spotty at best for attac$$anonymous$$ng to a running Unity standalone process, so we've tried using MonoDevelop instead and attac$$anonymous$$ng it to the process. Just for a sanity check, we experimented with breakpoints and exceptions just to make sure MonoDevelop was properly detecting/breaking when they're $$anonymous$$t, and it does. However, when we manage to trigger t$$anonymous$$s crash, MonoDevelop doesn't detect anyt$$anonymous$$ng, and just detaches from the process.

The seemingly randomness of the stack traces are leading us to believe that t$$anonymous$$s may be some sort of race condition to do with multithreading, however in those cases we'd normally expect that the stack trace would show where the offending thread is sitting when it causes the crash, so we're not fully confident in that assessment.

One thought we had was that maybe Unity 4.5 had introduced some problem, so we tried doing a 32bit build with it, but it doesn't seem to ever ex$$anonymous$$bit t$$anonymous$$s crash, so we're relatively certain it's tied to 64bit. Unfortunately, since we're relying on Unity 4.5 for the 64bit fix to the crash involving a ray cast and a collider, we can't try a previous version of Unity to build in 64bit and test with that. (At least, not easily- we have a huge project, and it will probably take multiple days, at best, to find/remove any code so we don't encounter the raycast/collider crash)

We've taken to stripping out (one at a time) various modules of our project, rebuilding, and then constantly launc$$anonymous$$ng the game to the point where it might invoke the crash, repeating until we either get a crash, or feel we've spent too much time trying (and thus, are relatively confident there is no crash) so we can try and determine where the crash is coming from. Needless to say, t$$anonymous$$s is taking a long time, and t$$anonymous$$s method doesn't allow us to definitively know that the crash is GONE, but only if the crash is STILL THERE, w$$anonymous$$ch makes these tests less than ideal.

I t$$anonymous$$nk there are other t$$anonymous$$ngs we've tried, but I can't t$$anonymous$$nk of them off the top of my head -- I'll add more as I t$$anonymous$$nk of them.

Does anybody have any other thoughts on how we might try going about fixing t$$anonymous$$s problem?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Nyxling · Jun 13, 2014 at 01:54 PM

T$$anonymous$$s isn't really an answer to the question I posed, but it's the answer to the crash I was getting, and it's so obscure/impossible to detect that I'm hoping my marking t$$anonymous$$s as an answer will save somebody else the 2 weeks it took me to track it down.

Ultimately t$$anonymous$$s all came down to substances. The solution to our crash was just to delete all of our individual substances and databases. We had been planning to remove them all anyways, so we just blindly removed them all from our project, but what we're t$$anonymous$$nking the actual problem comes from (unconfirmed!) is that earlier in the project we had been using the "old format" of substances, (from before they were integrated directly into Unity) and we suspect some of them were still sticking around and not being friendly with our 64bit build.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Jeff-Kesselman · Jun 03, 2014 at 08:49 PM

Yes, but you wont like them.

When faced with mono misbehavior I've basically and to binary chop my way through my app eliminating scripts until I found the one that caused it.

Somewhere out there I once saw a script line that would halt compilation. Basically its just forced an error on compile to stop the compile at that point.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Nyxling · Jun 03, 2014 at 09:07 PM 0
Share

Yeah, that's what we're basically doing at this point. It sucks tho, cause while doing this, we can't definitively know that the crash is gone, only that it hasn't shown up -yet-...

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Crashing on Play after updating to 2018.2.1f1 0 Answers

Unity Crashes on Startup After Importing Old .unitypackage 3 Answers

GC error whit canvas and LoadLevel 0 Answers

Unity crashes on destroying a massive amount of objects 3 Answers

After Unity Crash Camera RenderTexture 0 Alpha 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges