• 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 jethrogillgren · Dec 14, 2018 at 11:47 AM · bugcrashvisual studiodebugexception

Debugging 'Assertion failed on expression' errors.

Hi, Does anyone have any insight on how to debug assertion failures? These normally seem to be unity bugs, and often have very strange reproduction steps and are hard to identity without further information on the problem. Often all you get is "errorA" or " sourcePoint->w > 0.0f" etc...

Is there a way to get Visual Studio to break on assertion failures, or to at least find the source code?
A project which is running on UWP using Visual Studio (2017) and breaking successfully on other Exceptions (in user code) seems to not catch these exceptions or reveal where they are thrown from.

Cheers, Jethro

Comment
Add comment · Show 1
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 jethrogillgren · Dec 14, 2018 at 11:50 AM 0
Share

Steps Tried: 1. In an Awake function, set [UnityEngine.Assertions.Assert.raiseExceptions][1] to true. 2. Build from unity with all debug stuff included, eg for UWP check "Unity C# Projects" and "Development Build" 3. In Visual Studio, use a "Debug" build, not Release or $$anonymous$$aster. 4. Under Debug > Windows > Exception Settings add an entry for UnityEngine.Assertions.AssertionException 5. Win32 Exceptions > '0xc0000420 Assertion failed' is set to break when thrown. 6. Check that Tools > Options > Tools for Unity > 'Exception Support' is enabled.

0 Replies

· Add your reply
  • Sort: 

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

115 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

Android Build Throwing SecurityException 0 Answers

SIGABRT crash while running standalone Linux app 2 Answers

Android app crashes after 15 mins of play. Too many open files. 1 Answer

Could the game crash be a GC problem? 0 Answers

VSTU support for MissingReferenceException 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges