Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
1
Question by raycosantana · Nov 02, 2013 at 08:06 PM · bugscrashes

how do you interpret error logs?

How can I interpret and fix the error logs? I have a bug somewhere it seems the game always crashes (not in the same spot) the same way, and error logs all say basically the same thing here is an example of two error logs with minutes of difference

 Unity Player [version: Unity 4.2.0f4_38efbd14869d]
 
 favoreme.exe caused an Access Violation (0xc0000005)
   in module favoreme.exe at 0033:403f335c.
 
 Error occurred at 2013-11-02_195218.
 I:\Builds\favoreme.exe, run by rayco.
 75% memory in use.
 3264 MB physical memory [813 MB free].
 10808 MB paging file [3372 MB free].
 8388608 MB user address space [8388050 MB free].
 Read from location ffffffff caused an access violation.
 
 Context:
 RDI:    0x0bbefce0  RSI: 0x00000004  RAX:   0x00000000
 RBX:    0x0b4f7570  RCX: 0x00000000  RDX:   0x0000000f
 RIP:    0x403f335c  RBP: 0x00000030  SegCs: 0x00000033
 EFlags: 0x00010202  RSP: 0x001ef410  SegSs: 0x0000002b
 R8:    0x00000003  R9: 0x0bbefbf8  R10:   0x00000286
 R11:    0x001ef3d0  R12: 0x00000008  R13:   0x00000001
 R14:    0x0ba51e28  R15: 0x03d9c428

and the second one

 Unity Player [version: Unity 4.2.0f4_38efbd14869d]
 
 favoreme.exe caused an Access Violation (0xc0000005)
   in module favoreme.exe at 0033:406a335c.
 
 Error occurred at 2013-11-02_195758.
 C:\Users\rayco\Documents\Build\favoreme.exe, run by rayco.
 75% memory in use.
 3264 MB physical memory [797 MB free].
 10808 MB paging file [3315 MB free].
 8388608 MB user address space [8387924 MB free].
 Read from location ffffffff caused an access violation.
 
 Context:
 RDI:    0x27663b80  RSI: 0x00000002  RAX:   0x00000003
 RBX:    0x14a87570  RCX: 0x00000009  RDX:   0x0000000c
 RIP:    0x406a335c  RBP: 0x00000018  SegCs: 0x00000033
 EFlags: 0x00010202  RSP: 0x001af2c0  SegSs: 0x0000002b
 R8:    0x00000003  R9: 0x27663a40  R10:   0x00000286
 R11:    0x001af280  R12: 0x00000008  R13:   0x00000001
 R14:    0x2773fa78  R15: 0x03dac428

It happens sometimes when I hit an enemy, specially if there is more than one enemy on screen. How can I interpret this to find the bug?

Comment
Add comment · Show 13
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 Zaeran · Nov 02, 2013 at 08:13 PM 0
Share

have you tried using try/catch to find an exception?

avatar image raycosantana · Nov 02, 2013 at 08:23 PM 0
Share

No, I dont even know what that is, how do you do that? I'm a little worried I want to release a demo in a month and I don't want to give people the impression that my game is full of bugs :S

avatar image Freaking-Pingo · Nov 02, 2013 at 08:40 PM 0
Share

For your information, its okay to have bugs in your game :)

avatar image Zaeran · Nov 02, 2013 at 08:45 PM 0
Share

try/catch is used to allow the program to keep running running if errors occur.

Code is executed in the 'try' block. if an error occurs, an exception is thrown, and the code breaks from the 'try' block, going to the 'catch' block. This 'catch' block contains code that instructs the program what to do if an error occurs. You can have multiple catch blocks for handling specific exceptions.

go through your methods where you think the bug may be occurring, and put:

 try{
     //your method code here
 }
 catch(Exception e){
     Debug.Log(e.message + ", " + gameObject.name);
     //this is for c#. replace e.message with e.get$$anonymous$$essage if using java.
 }

If an error occurs in your code, this will display the error type, as well as the gameobject that it originated from, in the console window. Hopefully it'll help you find your issue.

avatar image raycosantana · Nov 02, 2013 at 09:07 PM 0
Share

I understand, however what if I don't know where the problem is? because I have no clue really, it seems it happens in one of the level/scenes only and when there´s more than one enemies but other than that I have no clue what could it be.

Show more comments

1 Reply

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

Answer by Immanuel-Scholz · Nov 07, 2013 at 03:49 PM

In "theory", you should not be able to produce an access violation with just writing C# code. (At least not easily). I doubt that the idea of "exception catching" in the comments would help you here, since the crash probably happens outside the C# environment control.

Without the Unity source code and symbol table, the crash log is not really helpfull either.

Here a general description about how to find any kind of bug systematically. It really works, I do this dozends of times a week:

1 First thing: Backup your scene. 2 Find a way to reliant reproduce the case. Something like "Click here, then move there, than do that, than that and finally quickly that."

Excercise the steps a couple of time so you are sure you can reproduce the case. This will give you a way to ensure, that you actually got rid of the bug later. Also, most of the times you get a very good clue about where the problem could probably be.

Do not skip this step, its the most crucial one in reliable fixing bugs. Just poking around the code and some "mh.. didn't happen for some minutes.. maybe my last change was the fix" is NOT a way of doing things.

3 Next step is to simplify your Scene and Code step-by-step until the error doesn't happen anymore. Always follow the sub-steps:

  • Backup your scene again (some version control system is excellent here)

  • Do one of the two following things:

a) Remove lots of stuff where you either think "that's most probably never ever influence the bug". Then verify that the bug is still present. If not, restore to last backup.

b) Remove very few things where you think "that will probably make the problem go away" and check whether the bug is really gone now. If not, restore to last backup.

  • rinse and repeat

4 After a while, you will have a very good and small test case scene for the crash and in 99% of the cases you know exactly where the problem may be.

5 Now restore to your original scene and fix the bug.

6 Finally test whether its really gone.

7 If its a bug in unity (more often than you might think :( ), file a bug report for unity with your minimal scene attached.

PS: Sorry for the style. The Markup Language used here does not like structured lists..

Comment
Add comment · Show 2 · 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 raycosantana · Nov 07, 2013 at 04:48 PM 0
Share

Hi, thanks for the answer, I've been doing something similar actually, I know its not my coding because it only happens in that particular scene, I think its a corrupted 3D model, sometime ago I bought a pack of 3D models (the same pack im using in this game) and it come with a bunch of textured planes for map tiling, well I had the same error with the same or a pretty similar description and I had to fix the planes by replacing them with Unity's prefab ones and error disappeared; I will do a test with each of the models used in that scene.

avatar image raycosantana · Nov 07, 2013 at 04:49 PM 0
Share

will mark your answer as correct as is the right thing to do. Thanks.

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.

Follow this Question

Answers Answers and Comments

18 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

Related Questions

Asset store Crash how do I fix ? 1 Answer

When using visual studio, and saving code outside of unity, it wrecks my projects. Why and how can I fix my old pojects? 2 Answers

Is anybody elses Unity 4.3, crashing after opening another project 2 Answers

Reading texture2D without artifacts 0 Answers

Curious mouse-flickering problem on MacBookPro, Unity editor 1 Answer


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