View Issue Details

IDProjectCategoryLast Update
0000957AI War 1 / ClassicCrash/ExceptionNov 18, 2010 10:08 pm
ReporterdumpsterKEEPER Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version4.024 
Summary0000957: Game Freeze
DescriptionWhile playing today under OSX, I experienced a full game freeze. The game slowed to a stop and nothing was responsive in the UI and all music and sounds stopped. I had to force-quit the application to get out of it. I've attached the only error log I could find that was updated today, in case it might be of help. I can also post the save file if that would be helpful, as I had an autosave from about ten minutes prior to the freeze.
TagsNo tags attached.
Internal Weight

Activities

dumpsterKEEPER

Oct 29, 2010 4:21 pm

reporter  

ErrorsReportedByEngine.txt (512 bytes)   
10/29/2010 13:04:08 (4.021)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:FireAtObject(ForegroundObject, Int32, FInt, FInt)
ForegroundObject:TryAttack()
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()

ErrorsReportedByEngine.txt (512 bytes)   

keith.lamothe

Oct 29, 2010 4:24 pm

administrator   ~0002336

Hmm, that pthread thing again. How long were you playing before the freeze?

dumpsterKEEPER

Oct 29, 2010 4:26 pm

reporter   ~0002337

I was playing for just over an hour or so. Sorry about the dupe report, I didn't come across 0000822 until after posting this.

keith.lamothe

Oct 29, 2010 4:29 pm

administrator   ~0002338

Thanks. And don't worry about the duplicate; this one is turning out to be a lot wider spread than I thought. It's one of those annoyingly obscure problems where the actual error is deep within Unity (not saying its their bug, the problem doesn't happen on windows at all), related to an OS system call, and googling brings up extremely little useful info.

dumpsterKEEPER

Nov 1, 2010 4:22 pm

reporter  

ErrorsReportedByEngine2.txt (1,148 bytes)   
10/29/2010 13:04:08 (4.021)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:FireAtObject(ForegroundObject, Int32, FInt, FInt)
ForegroundObject:TryAttack()
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()

11/01/2010 13:00:27 (4.022)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
11/01/2010 13:00:27 (4.022)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:FireAtObject(ForegroundObject, Int32, FInt, FInt)
ForegroundObject:TryAttack()
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()



ErrorsReportedByEngine2.txt (1,148 bytes)   

dumpsterKEEPER

Nov 1, 2010 4:26 pm

reporter   ~0002481

I ran into this same issue again in 4.022. As before, I was playing for about an hour and was in the middle of a large attack on an AI planet. As the attack proceeded, the ErrorsReportedByEngine popped up on the HUD and all the sound effects stopped playing (the music continued playing, however). About 30 seconds later or so, the game froze solid.

I've attached the latest error log, containing both the previous and current error message (since I can't seem to delete attachments).

keith.lamothe

Nov 1, 2010 4:31 pm

administrator   ~0002482

Hmm, yep, same error message that doesn't indicate the underlying problem.

We've fixed a couple problems for 4.023 that may be causing the problem, but we really have no way of knowing because it seems it's just not being logged anywhere. My guess is that some other part of the app is throwing some kind of exception that is annoying the OS which in turn makes life difficult for the game until it goes away. But we can never find a trace of that original error.

Just to clarify, do you get these crashes/freezes if you disable sound and music entirely?

Chris_McElligottPark

Nov 1, 2010 10:47 pm

administrator   ~0002509

Coming in 4.023:

* If the dreaded pthread_getschedparam error is encountered on OSX, normally this means a crash is imminent within 30 seconds or so if the player does not disable their sound first.
** We've been attempting many things to solve this problem, and still will be hunting for it, but as a temporary salve we've now made it so that when this error is encountered it will AUTOMATICALLY disable the sound for the player and shows them a message advising them to save their game and restart the program asap.
** It also now logs some extra information about the state of their program to hopefully aid in actually fixing the root cause of this.
** It also stops further images, music, and similar from being loaded, as they could also trigger the same crash and the player really needs to restart, anyway.

dumpsterKEEPER

Nov 2, 2010 3:57 pm

reporter  

ErrorsReportedByEngine3.txt (1,857 bytes)   
10/29/2010 13:04:08 (4.021)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:FireAtObject(ForegroundObject, Int32, FInt, FInt)
ForegroundObject:TryAttack()
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()

11/01/2010 13:00:27 (4.022)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
11/01/2010 13:00:27 (4.022)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:FireAtObject(ForegroundObject, Int32, FInt, FInt)
ForegroundObject:TryAttack()
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()



11/02/2010 12:51:43 (4.023)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
11/02/2010 12:51:43 (4.023)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param) (audioObjects: 16, inProgressWWWs: System.Collections.Generic.List`1[UnityEngine.WWW], GC.GetTotalMemory: 218,275,840)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:MovePlayerUnit(Boolean, Boolean)
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()



ErrorsReportedByEngine3.txt (1,857 bytes)   

dumpsterKEEPER

Nov 2, 2010 4:04 pm

reporter   ~0002544

Here's the latest log file from 4.023 and it looks like it has the additional information included about program state. Hopefully that helps you, I'm not really sure what else I can do to help track this down. I find it interesting that it seems to happen regularly about an hour into the game. I often play over my lunch break, and every time it has happened as I'm wrapping up for the day.

keith.lamothe

Nov 2, 2010 4:07 pm

administrator   ~0002545

Did it actually crash this time?

dumpsterKEEPER

Nov 2, 2010 4:20 pm

reporter   ~0002548

I actually saved and exited as recommended, but in retrospect, I ought to have waited to see. Sorry about that, I can try it out again tomorrow.

keith.lamothe

Nov 2, 2010 4:26 pm

administrator   ~0002550

Well, we can't fault you for following our instructions ;)

That's actually very good info, though, that you saw the instructions and had a chance to do the save and get out. Obviously we have to eradicate the underlying cause but if we can make progress towards a situation where people at least don't lose any progress, that's a step in the right direction.

dumpsterKEEPER

Nov 3, 2010 4:05 pm

reporter  

ErrorsReportedByEngine4.txt (3,479 bytes)   
10/29/2010 13:04:08 (4.021)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:FireAtObject(ForegroundObject, Int32, FInt, FInt)
ForegroundObject:TryAttack()
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()

11/01/2010 13:00:27 (4.022)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
11/01/2010 13:00:27 (4.022)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:FireAtObject(ForegroundObject, Int32, FInt, FInt)
ForegroundObject:TryAttack()
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()



11/02/2010 12:51:43 (4.023)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
11/02/2010 12:51:43 (4.023)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param) (audioObjects: 16, inProgressWWWs: System.Collections.Generic.List`1[UnityEngine.WWW], GC.GetTotalMemory: 218,275,840)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:MovePlayerUnit(Boolean, Boolean)
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()



11/03/2010 12:54:35 (4.024)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
11/03/2010 12:54:35 (4.024)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param) (audioObjects: 16, inProgressWWWs: 2, GC.GetTotalMemory: 230,043,648)
Stack Trace: UnityEngine.WWW:.ctor(String)
GameSound:LoadForPlay()
GameSound:Play()
GameSoundGroup:Play(SoundType)
Game:PlaySound(String, SoundType)
ForegroundObject:FireAtObject(ForegroundObject, Int32, FInt, FInt)
ForegroundObject:TryAttack()
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()



11/03/2010 12:54:42 (4.024)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
11/03/2010 12:54:42 (4.024)
-----------------------------------Exception-----------------------------------Log String: ExecutionEngineException: Couldn't create thread
Stack Trace: (wrapper delegate-begin-invoke) System.Threading.WaitCallback:begin_invoke_IAsyncResult__this___object_AsyncCallback_object (object,System.AsyncCallback,object)
System.Threading.ThreadPool.QueueUserWorkItem (System.Threading.WaitCallback callBack, System.Object state)
Ionic.Zlib.ParallelDeflateOutputStream.Write (System.Byte[] buffer, Int32 offset, Int32 count)
Ionic.Zlib.CrcCalculatorStream.Write (System.Byte[] buffer, Int32 offset, Int32 count)
Ionic.Zip.ZipEntry._WriteEntryData (System.IO.Stream s)
Ionic.Zip.ZipEntry._EmitOne (System.IO.Stream outstream)
Ionic.Zip.ZipEntry.Write (System.IO.Stream s)



ErrorsReportedByEngine4.txt (3,479 bytes)   

dumpsterKEEPER

Nov 3, 2010 4:14 pm

reporter   ~0002633

Yet another log file, this time from 4.024. The freeze happened right on cue, but this time I saved when the warning came up and waited to see what would happen and it locked hard as before. I did note two differences this time though. First, when I closed out of the save dialog, the game stayed paused with the "Waiting for players..." message at the top until the freeze occurred. Second, there was an additional error message logged to the file that I hadn't seen before.

I dug through my OS logs to see if I could turn up any additional data, but couldn't seem to find a correlation. There are a number of errors logged by AI War to that file, but they are mostly network or windowing related, and they do not occur anywhere close to the time this error occurs.

Chris_McElligottPark

Nov 3, 2010 4:26 pm

administrator   ~0002634

Okay -- that new error is really illuminating, actually. Well, in some senses. What this tells us is that apparently the issue isn't with unity sounds at all, it's a matter of the threading limit being hit on the game. If you're able to use activity manager to Inspect the process and look at particularly open files and ports next time it looks like it is about to lock, that would be helpful if you could post that. I'm not sure what's consuming all those threads or why -- it shouldn't be dying until it has 255 of them, but it's clearly hitting that point when it should not be doing so.

Possibly... I almost wonder if this has something to do with the Ionic zip library or our use of that. It's just a shot in the dark, though, until we can see more information about the semaphores that are open. I'll have to see if I can't get any more profiling info into the application related to this, too. The most curious thing is that some folks see it and others don't.

Chris_McElligottPark

Nov 3, 2010 11:56 pm

administrator   ~0002664

I haven't found any HUGE smoking guns yet, but in 4.025 I did fix one non-disposed memory stream call that could potentially result in something like this. Fingers crossed that was it, but honestly my hopes aren't super high. Might be it, though, we'll see.

dumpsterKEEPER

Nov 4, 2010 4:19 pm

reporter   ~0002698

Just finished my usual play session with 4.025 and didn't experience any lockups this time! It's possible that I simply didn't stumble across the trigger that causes it, but with how regularly it was crashing, it seemed to be a factor of time and not behavior. I'll be sure to update this issue if I run into it again.

Chris_McElligottPark

Nov 4, 2010 4:39 pm

administrator   ~0002699

Wow! That's promising, at least! :)

dumpsterKEEPER

Nov 18, 2010 7:53 pm

reporter   ~0003923

You ought to be able to mark this one as resolved also. I had started up the other thread as it initially looked to be a different problem, but it ended up being the same underlying issue.

Chris_McElligottPark

Nov 18, 2010 10:08 pm

administrator   ~0003938

Awesome. :)

Issue History

Date Modified Username Field Change
Oct 29, 2010 4:21 pm dumpsterKEEPER New Issue
Oct 29, 2010 4:21 pm dumpsterKEEPER File Added: ErrorsReportedByEngine.txt
Oct 29, 2010 4:24 pm keith.lamothe Note Added: 0002336
Oct 29, 2010 4:26 pm dumpsterKEEPER Note Added: 0002337
Oct 29, 2010 4:29 pm keith.lamothe Note Added: 0002338
Nov 1, 2010 4:22 pm dumpsterKEEPER File Added: ErrorsReportedByEngine2.txt
Nov 1, 2010 4:22 pm dumpsterKEEPER Product Version 4.021 => 4.022
Nov 1, 2010 4:26 pm dumpsterKEEPER Note Added: 0002481
Nov 1, 2010 4:31 pm keith.lamothe Note Added: 0002482
Nov 1, 2010 4:32 pm keith.lamothe Status new => feedback
Nov 1, 2010 10:47 pm Chris_McElligottPark Note Added: 0002509
Nov 2, 2010 3:57 pm dumpsterKEEPER File Added: ErrorsReportedByEngine3.txt
Nov 2, 2010 3:57 pm dumpsterKEEPER Product Version 4.022 => 4.023
Nov 2, 2010 4:04 pm dumpsterKEEPER Note Added: 0002544
Nov 2, 2010 4:04 pm dumpsterKEEPER Status feedback => new
Nov 2, 2010 4:07 pm keith.lamothe Note Added: 0002545
Nov 2, 2010 4:20 pm dumpsterKEEPER Note Added: 0002548
Nov 2, 2010 4:26 pm keith.lamothe Note Added: 0002550
Nov 3, 2010 4:04 pm dumpsterKEEPER Product Version 4.023 => 4.024
Nov 3, 2010 4:05 pm dumpsterKEEPER File Added: ErrorsReportedByEngine4.txt
Nov 3, 2010 4:14 pm dumpsterKEEPER Note Added: 0002633
Nov 3, 2010 4:26 pm Chris_McElligottPark Note Added: 0002634
Nov 3, 2010 11:56 pm Chris_McElligottPark Note Added: 0002664
Nov 4, 2010 4:19 pm dumpsterKEEPER Note Added: 0002698
Nov 4, 2010 4:39 pm Chris_McElligottPark Note Added: 0002699
Nov 4, 2010 4:39 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Nov 4, 2010 4:39 pm Chris_McElligottPark Status new => confirmed
Nov 18, 2010 7:53 pm dumpsterKEEPER Note Added: 0003923
Nov 18, 2010 10:08 pm Chris_McElligottPark Note Added: 0003938
Nov 18, 2010 10:08 pm Chris_McElligottPark Status confirmed => resolved
Nov 18, 2010 10:08 pm Chris_McElligottPark Resolution open => fixed
Apr 14, 2014 9:27 am Chris_McElligottPark Category Bug - Crash or Exception => Crash/Exception