Quantcast
Channel: Questions in topic: "crashing"
Viewing all 620 articles
Browse latest View live

unity seems to be broken for me?

$
0
0
Ok so I have installed unity all of these ways: installer download, editor download, from unity hub. When I run it from the hub- it just crashes When I double click the .exe I get this: VCRUNTIME140_1.dll not found. SO why is this and can I solve this? I've reinstalled unity about 5 times so that didn't help.

AssetBundle.LoadFromFile cause Inflate Error: (file zip crc32 : 00000000) (result: fffffffb)

$
0
0
I have met a crash on android device when using "AssetBundle.LoadFromFile" to load a AssetBundle which is not exist in fact. In Android Studio logcat window, it can be show with this message "E/Unity: Inflate Error: (file zip crc32 : 00000000) (result: fffffffb)". I all know that it will return null when using AssetBundle.LoadFromFile to load AssetBundle which is not exist in fact. But now it cause a crash on android device. I google about this problem, but can not find some helpful infomation. Env: Unity 2018.4.28f1 Has Anyone met this problem?

Why is my Unity Crashing when I call a fucntion within coroutine and vice versa?

$
0
0
So the idea is that each time a function runs, an enemy damages the player, and then the coroutine waits until the player hits space to strike back. This loop would go on until either side is dead. What is the reason unity just freezes when it comes to this function? void monsterBattle() { int atk = Random.Range(3, 7); takeDmg(ref knight, atk); textComp.text = string.Format("As you step into a cave a monster attacks you!...\nThe monster have dealt ",atk.ToString(),"!"); //StartCoroutine(FightBack()); } IEnumerator FightBack() { bool pressed = false; while (!pressed) { if (Input.GetKey(KeyCode.Space)) { Debug.Log("pressed"); pressed = true; monsterBattle(); break; } yield return null; //you might want to only do this check once per frame -> yield return new WaitForEndOfFrame(); } }

Loop fail and unity crash ( eng and spanish )

$
0
0
hi, hola, anyone can explain me why i cant use this condition ? Alguien me puede decir porque no puedo usar esta condicion ? private void OnTriggerStay(Collider other) { if (other.name == "healerTriger") Healing(); } void Healing() { takingDmg = false; do { hpPlayer = 1 * Time.deltaTime; } while (hpPlayer< 50); } he probado if y while y sigue petando , pero no veo porque ya que la condicion tiene limite. Even whith if or while the condition crash unity but why ? theres a limit in there.... Big Thz

My for loop is crashing unity!

$
0
0
Run into a little problem here, its a simple for loop but for some reason it crashes my unity! I've been starring at this for so long now that I can't see anything wrong with the code. Weird thing is if i remove everything inside the loop, even the Debug.Log and play, everything works fine?!!?!?!?? void Start() { sprRect = grid_Icon.GetComponent().rect; float maxInARow = Mathf.FloorToInt(Screen.width / sprRect.width); float maxInACol = Mathf.FloorToInt(Screen.height / sprRect.height); gridPerView = maxInARow * maxInACol; GenerateGrid(); } void GenerateGrid() { for (int x = 0; x < screenWidth; x++) { for (int y = 0; y < screenHeigh; y++) { Debug.Log("LOL"); } } }

Build crashes on load

$
0
0
Im using 2019.4 and im trying to build my project. im using a mac os x 10.10 btw. it keeps on crashing when it finishes building. whats happening?

My unity STOPS RESPONDING when this function is activated

$
0
0
So whenever I click play everything is fine however when I do something that calls this function: void SwapCards() { string Temp = "tmp"; for (int i = 0; i < isSelected.Count; i++) { for (int j = i + 1; i < isSelected.Count; j++) { if (isSelected[i] == true && isSelected[j] == true) { Temp = Peçass[i]; Peçass[i] = Peçass[j]; Peçass[j] = Temp; } } } howManySelected = 0; } the Unity engine stops responding. I've tried to comment this function out and the engine keeps running fine so this one is definitely the problem. **What can I do to fix this?** Here's all the code where this function is involved for better context: private void Update() { TimeStep = FindObjectOfType().timeStep; if (Input.GetKeyDown(KeyCode.P)) { canMove = !canMove; } if (canMove) { if (!isRunning) { StartCoroutine(AplicarMovimento()); } }else { StopCoroutine(AplicarMovimento()); isRunning = false; } if (howManySelected == 2) { SwapCards(); } AbrirHotbar(); FillImages(); } public void OnPointerClick(PointerEventData eventData) //Deteta os "clicks" no UI { for (int i = 0; i < Peçass.Count; i++) { Transform carta = Hotbar.transform.GetChild(i); if (carta == eventData.pointerCurrentRaycast.gameObject.transform) { isSelected[i] = true; //A carta onde deu click fica "selecionada" howManySelected++; } } } void SwapCards() { string Temp = "tmp"; for (int i = 0; i < isSelected.Count; i++) { for (int j = i + 1; i < isSelected.Count; j++) { if (isSelected[i] == true && isSelected[j] == true) { Temp = Peçass[i]; Peçass[i] = Peçass[j]; Peçass[j] = Temp; } } } howManySelected = 0; } **The Unity version I'm using is 2020.2.2f1** Thank you!

My unity STOPS RESPONDING when this function is activated

$
0
0
So whenever I click play everything is fine however when I do something that calls this function: void SwapCards() { string Temp = "tmp"; for (int i = 0; i < isSelected.Count; i++) { for (int j = i + 1; i < isSelected.Count; j++) { if (isSelected[i] == true && isSelected[j] == true) { Temp = Peçass[i]; Peçass[i] = Peçass[j]; Peçass[j] = Temp; } } } howManySelected = 0; } the Unity engine stops responding. I've tried to comment this function out and the engine keeps running fine so this one is definitely the problem. **What can I do to fix this?** Here's all the code where this function is involved for better context: private void Update() { TimeStep = FindObjectOfType().timeStep; if (Input.GetKeyDown(KeyCode.P)) { canMove = !canMove; } if (canMove) { if (!isRunning) { StartCoroutine(AplicarMovimento()); } }else { StopCoroutine(AplicarMovimento()); isRunning = false; } if (howManySelected == 2) { SwapCards(); } AbrirHotbar(); FillImages(); } public void OnPointerClick(PointerEventData eventData) //Deteta os "clicks" no UI { for (int i = 0; i < Peçass.Count; i++) { Transform carta = Hotbar.transform.GetChild(i); if (carta == eventData.pointerCurrentRaycast.gameObject.transform) { isSelected[i] = true; //A carta onde deu click fica "selecionada" howManySelected++; } } } void SwapCards() { string Temp = "tmp"; for (int i = 0; i < isSelected.Count; i++) { for (int j = i + 1; i < isSelected.Count; j++) { if (isSelected[i] == true && isSelected[j] == true) { Temp = Peçass[i]; Peçass[i] = Peçass[j]; Peçass[j] = Temp; } } } howManySelected = 0; } **The Unity version I'm using is 2020.2.2f1** Thank you!

EXC_RESOURCE crash when running AR app on iOS

$
0
0
I have an AR app developed in Unity that crashes when loading a scene. Now, it only seems to crash on the first launch of the app after being installed (On the device I am testing at least), subsequent launches seem to work fine. ---------- In XCode I get the error for a thread (It seems to change number) and a size in MB EXC_RESOURCE RESOURCE_TYPE_MEMORY ---------- I have no real idea how to debug this as I am new to development but I have taken a look at the debug profiler in unity and gathered some screenshots. At the moment these are just numbers to me. I don't know what size constitutes a reasonable amount of memory usage from the unreasonable. Before loading scene ![alt text][1] Loading Scene that crashes on iOS ![alt text][2] ![alt text][3] ![alt text][4] ---------- Now, from the error, I can gather I am using too much memory but where or how? And why does it only happen sometimes? ---------- Any help is hugely appreciated. [1]: https://i.imgur.com/K552AIw.png [2]: https://i.imgur.com/xWmo63a.png [3]: https://i.imgur.com/VspnIrl.png [4]: https://i.imgur.com/7AKZdbX.png

App crash with Unity Advertisment, here is the log:

$
0
0
Hi there, When in my game I go from Scene A to B, then back to A, the app crashes in editor and on device (Android). It looks like it happens when trying to initialize Advertisement. This is the log : Ad supported UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) AdsController:Initialize() (at Assets/TQGAssets/CS_Assets/CS_Scripts/AdsController.cs:26) MenuController:Start() (at Assets/TQGAssets/CS_Assets/CS_Scripts/MenuController.cs:54) (Filename: Assets/TQGAssets/CS_Assets/CS_Scripts/AdsController.cs Line: 26) /Applications/Unity/Hub/Editor/2020.1.15f1/Unity.app/Contents/Resources/PackageManager/Server/node_modules/winston/lib/winston/logger.js:307 throw ex; ^ Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed at doWrite (_stream_writable.js:413:19) at writeOrBuffer (_stream_writable.js:401:5) at Socket.Writable.write (_stream_writable.js:301:11) at Console.log (/Applications/Unity/Hub/Editor/2020.1.15f1/Unity.app/Contents/Resources/PackageManager/Server/node_modules/winston/lib/winston/transports/console.js:79:23) at Console._write (/Applications/Unity/Hub/Editor/2020.1.15f1/Unity.app/Contents/Resources/PackageManager/Server/node_modules/winston-transport/index.js:82:19) at doWrite (/Applications/Unity/Hub/Editor/2020.1.15f1/Unity.app/Contents/Resources/PackageManager/Server/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js:428:64) at writeOrBuffer (/Applications/Unity/Hub/Editor/2020.1.15f1/Unity.app/Contents/Resources/PackageManager/Server/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js:417:5) at Console.Writable.write (/Applications/Unity/Hub/Editor/2020.1.15f1/Unity.app/Contents/Resources/PackageManager/Server/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js:334:11) at DerivedLogger.ondata (/Applications/Unity/Hub/Editor/2020.1.15f1/Unity.app/Contents/Resources/PackageManager/Server/node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js:681:20) at DerivedLogger.emit (events.js:201:15) And this is how my code looks like: using UnityEngine; using UnityEngine.Advertisements; public class AdsController : MonoBehaviour { #if UNITY_IOS public static string gameId = "3977954"; #elif UNITY_ANDROID public static string gameId = "3977955"; #endif [SerializeField] private bool testMode; // Initialize the ads system public static void Initialize() { if (!Advertisement.isSupported) Debug.Log("Ad Not supported"); else Debug.Log("Ad supported"); if (Advertisement.isSupported && !Advertisement.isInitialized) { Advertisement.Initialize(gameId, false); Debug.Log("Initialisation..."); } } } What could be the reason of this?

Nvidia FleX - Android build crash

$
0
0
Everytime i try to make a build for android with NVIDIA FleX for Unity my unity just crashes on this part of the build. ![alt text][1] [1]: /storage/temp/176864-71a2d6cb2e3e1864be5da10d19c8a192.png Has anyone found a fix for this?

windows export is crushing in 2020.2.6

$
0
0
hey guys . after upgrading to 2020.2.6 unity after using 2019 when I try to export to windows , exporting complete but the game is crashing in game . anyone know what to do and thx . ![alt text][1] [1]: /storage/temp/177094-test.png

build crashes first time then opens fine afterwards

$
0
0
every time i build the game and open for the first time it crashes and restarts by itself then works fine after that. upon the first open there is always a blue outline around the window. i am building exclusive fullscreen. any ideas on why?

Unity crashing with instantiating

$
0
0
this line of code is causing unity to crash every time I Hit the play button, I am new to unity and am wondering can anyone tell me why this is happening. I am trying to spawn prefabs in to the world inside a random area. void Awake() { Instantiate(this, new Vector3((Random.Range(-30, 30)), 21, (Random.Range(-30, 30))), Quaternion.identity); }

Unity Crashing when time slows

$
0
0
I'm participating in a Game Jam and made a Time Slow Powerup for the game. It was working, untill I added some new code and started crashing. The problem is, even after commenting it out, it still crashed. You should know that I am using Unity 2019.4.17f1. This is the Time Slow code: void Items() { if(Input.GetKeyDown(KeyCode.T) && timeRecharged) { timeCanCancel = false; StartCoroutine(TimeSlow()); while (timeIsSlow) { if (Input.GetKeyUp(KeyCode.T)) { timeCanCancel = true; } if (Input.GetKeyDown(KeyCode.T) && timeCanCancel) { StopCoroutine(TimeSlow()); Time.timeScale = 1f; timeIsSlow = false; StartCoroutine(TimeCancel()); } } } } IEnumerator TimeSlow() { timeRecharged = false; Time.timeScale = timeSlowAmount; timeIsSlow = true; yield return new WaitForSeconds(4f); Time.timeScale = 1f; timeIsSlow = false; yield return new WaitForSeconds(7f); timeRecharged = true; } IEnumerator TimeCancel() { yield return new WaitForSeconds(4f); timeRecharged = true; }

Adding terrain crashes unity and game build

$
0
0
I am looking for help on an issue I am having with terrain. After adding a small terrain (25 x 25 x 50) with some minimal grass unity will crash and i'm not sure whats causing it. It won't happen right away. I can place the terrain and grass but randomly unity will crash if the terrain is active. Removing the terrain fixes the issue. The same error occurs when building the game. It will crash after some time randomly during the game if the terrain is active. I don't think this is a draw call issue as I have messed around with the detail resolution per patch and reduced my detail patches currently allocated down to 1 and the problem still persists. I have also tried running the terrain both drawn and not drawn as I only need the grass to show but no change. Not sure if this is related but with the terrain active it was also crashing when I went to bake the lighting. I reduced the indirect samples and environment samples and and it now bakes without crashing immediately.

Unity crashing when entering for loop

$
0
0
![alt text][1] [1]: /storage/temp/178835-capture.jpg

Unity crashes when loading an image in Animation tab on Ubuntu

$
0
0
Unity crashes most of the time when I try to load an image in the Animation timeline. I use Unity 2020.3.1f1 on Ubuntu 20.04. I created a 2D project. I want to include some animations. So I create a new Animation, drag and drop a first picture in the timeline and at this moment Unity crashes (~80% of the time). I have the same behavior with all the images I tried. Is there something I am doing wrong ? Is this a know problem on Ubuntu maybe ? I don't find much informations about this problem. How can I solve it ?

My project won't open after installing Vulkan graphics in project settings

$
0
0
Hello. I work at 2020.1.12f1 unity version for Linux and in order for one asset to work, I had to put vulkan graphics in the project settings. After that, in order to apply the new settings, the project itself began to reboot, after which my computer completely froze, so I had to make an emergency shutdown. Now my project won't open at all. It crashes during startup at the "find available build targets" stage. Has anyone had this problem? Is it possible to fix it? I have already deleted the library folder, packages and this asset, but it doesn't help. Any help is appreciated

I cannot open up my project after a crash

$
0
0
I was working on a project then unity randomly crashed. Luckily I saved minutes before the crash so I think I didn't lose any data but now when I try to open the project that crashed while its opening unity just closes. I can open up other projects but not the one that I crashed in. Did I lose everything in the project including the project itself? Help!
Viewing all 620 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>