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
0
Question by LAiKA787SV · Apr 26, 2013 at 10:35 AM · errorcrash

Unity 4.0 Crashes without reason

It always crashes every 20 seconds during the gameplay. I also check all the code by deactivating them to find what is the problem.

I checked all, and it still crashes every 20 seconds. I didn't make any changes today, yesterday, my Unity is fine.

When it start crashes, i check the taskmanager, and it says Unity used 394,000MB (4GB DDR3 installed, 3GB usable) of memory and 25% cpu usage (Intel Corei3)

please help me.

thanks.

Comment
Add comment · Show 4
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 Legend of Hibiki · Apr 26, 2013 at 03:57 PM 0
Share

$$anonymous$$aybe you have something currupted, or you have a big fail in your code that make the process overload.

avatar image Fornoreason1000 · Apr 26, 2013 at 10:08 PM 1
Share

I had a similar problem... try creating a new project with nothing but that annoying capsule first person controller that comes with unity with a flat terrain and test that. if your still experiencing problems Unity is probably corrupted or stuck in some weird fatal error. which means you need to re-install Unity.

if it works then your code, a bad asset or the project itself is at fault. to fix this issue, create a new project and just move over all the Non-script assets and probably review your code for any really bad things(e.g preloading all assets and duplicating when needed).

I've had about 7 projects just go kaput on me and having move everything (over 30 gigs lol). I don't know why this happens, but it its started way back at Unity 3.2

avatar image LAiKA787SV · Apr 27, 2013 at 03:39 PM 0
Share

This is the latest thing i've done before the crashes

 if(theFader){//runs in lateupdate function
         if(theFader.guiTexture.color.a > 0) theFader.guiTexture.color.a -= Time.deltaTime /3;
         else Destroy(theFader);
     }

function Sort$$anonymous$$eUp(lap : int){//runs in update function if(lap == 1){ var counter1 = 0; for(var lpn1 = 0; lpn1 < absentChecker.Length; lpn1++){ if(absentChecker[lpn1]){ counter1++; lap1[counter1] = pl1[lpn1]; } }

     for(var l1p in lap1) if(l1p == 0) l1p = 100000;
     lap1.Sort(lap1,1,8);
 }//till lap10

}

 //below is other script. runs in update function
 player.nextWaypoint.Sort$$anonymous$$eUp(currentLap);
         
         if(currentLap == 1){
             for(var l1 = 0; l1 < player.nextWaypoint.lap1.length; l1++){
                 if(distanceToWaypoint == player.nextWaypoint.lap1[l1]) currentRank = l1;
             }
         }

I suspected the AI kart is the main problem, because I've tested, play this game without AIs. But i didn't do any changes to AI.

avatar image Fornoreason1000 · Apr 27, 2013 at 04:18 PM 1
Share

you can try updating Unity , though i doubt it will help... I'm unsure what you code even does..(lap1?, nextwaypoint?) only that it has to do with racing. If you tried what I said above with no improvement then the only thing i can think of left is to rely on Bug Reports.

1 Reply

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

Answer by LAiKA787SV · Apr 27, 2013 at 05:19 PM

Last time i check, this was the problem of Unity's crash!

 function OnCollisionEnter(col : Collision){
     if(!moveNow && useTranslator && rigidbody && onColliderGo){
         moveNow = true;
         Destroy(rigidbody);
         useTranslator = true;
     }
 
     if(explosionType == ExplosiveTypes.TNT){
         if(col.gameObject.tag == "Player"){
             col.transform.root.GetComponent(Kart).PlantTNT(gameObject);
             isTNT = true;
         }
         if(col.gameObject.tag == "Opponent"){    
             col.transform.root.GetComponent(AIKart).PlantTNT(gameObject);
             isTNT = true;
         }
     }else if(explosionType == ExplosiveTypes.Nitro){
         if(col.gameObject.tag == "Player" || col.gameObject.tag == "Opponent")Explode();
     }
     else if(explosionType == ExplosiveTypes.Other){
         if(col.gameObject.tag == "Player" || col.gameObject.tag == "Opponent" || col.gameObject.tag == specialTag)Explode();
     }
     else if(explosionType == ExplosiveTypes.Ice){
         if(col.gameObject.tag == "Player" || col.gameObject.tag == "Opponent")FreezeMe(col.gameObject);
     }
     else if(explosionType == ExplosiveTypes.FryingPan){
         if(col.gameObject.tag == "Player" || col.gameObject.tag == "Opponent" || col.gameObject.tag == specialTag){
             if(powerPan) StopMe(col.gameObject,5);
             else StopMe(col.gameObject, 1);
         }
     }
     else if(explosionType == ExplosiveTypes.BouncyJr){
         if(col.gameObject.tag == "Player" || col.gameObject.tag == "Opponent" || col.gameObject.tag == "Environtment"){
             if(bouncyJrCounter > 10) Explode();
             else bouncyJrCounter ++;
         }
     }
     else if(explosionType == ExplosiveTypes.Cake){
         if(col.gameObject.tag == "Player" || col.gameObject.tag == "Opponent")StickMe(col.gameObject);
     }
 }
 
 function OnTriggerEnter(col : Collider){
     if(explosionType == ExplosiveTypes.Glue){
         if(col.gameObject.tag == "Player" || col.gameObject.tag == "Opponent")GlueMe(col.gameObject,powerGlue);
     }
     if(explosionType == ExplosiveTypes.Oil){
         if(col.gameObject.tag == "Player" || col.gameObject.tag == "Opponent")SpinMe(col.gameObject);
     }
 }
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

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

16 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

Related Questions

Unity v4.1.5 Crashes When Using Resources.Load 0 Answers

Unity Crashes on Startup After Importing Old .unitypackage 3 Answers

Unity Script causing crash 1 Answer

Problem| Unity3d start to crashing all the time 1 Answer

Unity3d Crash error (Mono.dll) with NetworkView 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