x


Unity stops working when I play the game in editor

Hi

This happened not so long ago... I was importing audio files into my Unity project, just to realise that the files weren't either MP3 or OGG. I removed them from assets and converted them to MP3, then I imported them into the project again (this time as MP3). I had a script that was working pretty well, and that script was supposed to use the audio files. Then I selected the audio files in the inspector. This far everything seemed normal untill I started the game. The game ran for a while until I used an input command in the script that would activate the sound. Unity stopped working and I had to manually close the proces. I opened Unity again and saw a message in the debug log saying something similar to "FILENAME.m4a has been deleted because it has crashed". I didn't care too much about the message, because I had already deleted the M4A audio files. Now when I try to use the script (activating MP3 AudioClips) or try to run the game for more than 10 seconds Unity crashes. Is there a possibility that the files became corrupt? Or is there an other explenation to this? I would also like to have an answer on how to solve this problem as well. So if you have any knowledge of this, then you are welocme to leave an answer or a comment.

more ▼

asked Jun 20 '12 at 02:28 PM

MOLB gravatar image

MOLB
155 17 21 23

This is really weird... it only crashes when I press the R button. The R button is only used to toggle a bool.

Jun 20 '12 at 04:04 PM MOLB
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

It turned out to be a script that had some problems, I rewrote the script and now everything works. Thanks for the help anyway!

more ▼

answered Jun 20 '12 at 04:28 PM

MOLB gravatar image

MOLB
155 17 21 23

(comments are locked)
10|3000 characters needed characters left

If you suspect that something could be corrupted, try exporting all the assets out as a package and reimporting them into a new project. That's worked for me the couple times I've gotten a corrupted project.

more ▼

answered Jun 20 '12 at 03:57 PM

Jason_DB gravatar image

Jason_DB
1.9k 4 14 36

I was thinking about that as well, but now I found out was the source of the problem is. When I activate a ParticleEmitter then Unity crashes. Everything else seems to work...

Jun 20 '12 at 04:01 PM MOLB

Just a standard particle emitter? that seems very strange... I'm pretty sure I've only every crashed Unity by making an infinite loop or running out of memory. Is it a very intensive effect or something?

Jun 20 '12 at 04:07 PM Jason_DB
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3744
x3339
x973
x592
x525

asked: Jun 20 '12 at 02:28 PM

Seen: 422 times

Last Updated: Jun 20 '12 at 04:28 PM