View Issue Details

IDProjectCategoryLast Update
0000822AI War 1 / ClassicCrash/ExceptionNov 20, 2010 3:10 pm
Reportervonkolberg Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version3.901 
Summary0000822: More sound & crash problems (OS X, 3.901)
DescriptionAfter taking 3.901 I hoped it would be solved, but again I get the problem where sounds (except music) stop playing, and the game crashes a short while later. Now it crashes to the desktop instead of freezing the PC.

(Cropped the error reports)
TagsNo tags attached.
Internal Weight

Activities

vonkolberg

Oct 22, 2010 7:44 am

reporter   ~0001926

One more detail I forgot to mention:

when the sounds stopped playing I tried to "power cycle" the sounds by going to settings and turning sound + music both off, returning to the game, then going back to re-enable them. The crash happened shortly after re-enabling the sound.

Chris_McElligottPark

Oct 22, 2010 9:44 pm

administrator   ~0001944

I've put in a change in 3.902 that will hopefully help, or possibly resolve this. However, if you do see this again, when the sound cuts out can you try disabling the sound real quick and see if you can then avoid a crash? That would be useful info, though this is a frustratingly quirky issue.

freeman08

Oct 23, 2010 1:02 pm

reporter   ~0001972

hi, did just what you suggested x4000. As soon as the sounds were gone i disabled both sound and music. No crash. As soon as I enabled both again (ca 10 min later) it crashed.
Here are the last lines of the player log: (version 3.903)


[/Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Threads/Thread.cpp line 290]
(Error: 3 Filename: /Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Threads/Thread.cpp Line: 290)

pthread_getschedparam(thread, &policy, &param)
UnityEngine.WWW:InitWWW(String, Byte[], String[])
UnityEngine.WWW:.ctor(String, Byte[], Hashtable)
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()

[/Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Threads/Thread.cpp line 290]
(Error: 3 Filename: /Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Threads/Thread.cpp Line: 290)

AI War: Fleet Command(309,0x77f45000) malloc: *** mmap(size=16764928) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Receiving unhandled NULL exception
Stacktrace:

Chris_McElligottPark

Oct 23, 2010 1:03 pm

administrator   ~0001973

Awesome, that's really encouraging actually. It's a shame that this is happening still, but at least it's isolated to what it is now! That part is exciting. :)

We'll see what we can find on this...

freeman08

Oct 23, 2010 1:04 pm

reporter   ~0001974

sry version was 3.904.

heres the errorsreportedbyengine.log:

10/23/2010 18:53:03 (3.904)
-----------------------------------Error-----------------------------------Log String: pthread_getschedparam(thread, &policy, &param)
Stack Trace: UnityEngine.WWW:.ctor(String)
<LoadTextureFromFileAsyncInner>c__Iterator0:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
GameImage:StartLoading()
Game:UpdateStreaming()
MainCameraLogic:Update()

keith.lamothe

Oct 23, 2010 1:05 pm

administrator   ~0001975

I wonder if we could put in code that, when it detects the exception in the sound code, it sets a flag that early-outs of all such sound calls for the rest of the app execution?

This would just be for debug purposes but perhaps a toggle on the audio tab of the settings window or a entered-into-the-chat-window command.

keith.lamothe

Oct 23, 2010 1:06 pm

administrator   ~0001977

To be clear, we could add a check in LogWritten that if it sees "pthread_getschedparam" in the message it sets that no-sound flag.

Chris_McElligottPark

Oct 23, 2010 1:17 pm

administrator   ~0001980

That last error from 3.904 is actually scary. What it's saying is that AI War died on trying to load an image, there. In other words, that once the game passes a certain number of sounds/images needing to be loaded, it's killing them all.

And that... I think I should be able to fix that.

keith.lamothe

Oct 23, 2010 1:19 pm

administrator   ~0001981

I wonder if the platform provides a GetModernComputingEnvironment method.

Chris_McElligottPark

Oct 23, 2010 2:59 pm

administrator   ~0002000

Okay, for the 3.905 version, which will be out in a little while:

* The game is now strictly limited to 12 open disk threads at a time. Previously it would usually be that few or fewer, anyway, but in a few cases it could get higher and this could lead to jerkiness on windows and potentially crashes on OSX.


Hopefully this will solve your problem. In my tests, I rarely even saw 12 open disk threads, even during big battles with a lot of sound effects streaming off the disk, but it was definitely possible for a confluence of events to make it reach all the way up to the 16 count that I believe would cause this on OSX.

If you still see this in 3.905, then I'll make this configurable so that you can set some lower values to see if that works instead. But this should be enough protection room between there.

Same deal as before, if you hear your sound cut out can you please disable sound and see what happens? But also, this time if you can hit F3, and then look down to the very next to last line where it shows the music, there is now a Disk Threads Count. I'd like to know what that says, if you run into this again. It could be that some sound threads are having a silent exception and aren't properly cleaning themselves up, and this would tell us that.

However, if that IS the case, then actually your sound would probably cut out, and no more images would load, and the music would stop after the next track and wouldn't continue, but the game wouldn't crash. That's what I expect, anyway.

Should be interesting to see what this does, it really feels like we're getting closer, at least! Thanks again to all the patient OSX folks for their help on this. :)

freeman08

Oct 24, 2010 6:39 am

reporter   ~0002023

Tried again this morning. Heres what happened: Version 3.905
(I didn't switch off sound or music)
1. Sound effects gone music still playing
2. Music gone as well
3. Sounds is on and off and on again
4. after a couple of minutes Crash.

Maybe this is connected: After the sound effects were gone some of the buttons were gone, like the whole build turret tab was empty, some other buttons were still there. Also I was unable to place some of the turrets.

Had another crash later, however this time there was no sign for it (sound and/or music gone) before it happened. So there was no time to switch off the music or sounds.
However the Debug line for the music (F3) says:
Current Music Track / Number Disk Threads :/Expansions/1/Music/Ingame/Heart of Zenith / 4

Chris_McElligottPark

Oct 24, 2010 12:09 pm

administrator   ~0002029

Hmmm...

I just can't duplicate this. Can anyone else at this stage? I'm starting to suspect there might be some sort of sound driver or similar on your machine at this stage, especially with only four disk threads open (and nothing suspicious in any of the logs you posted). Have you made sure that your drivers are all up to date?

At this stage, without more information, I'm kind of out of ideas on what to do. The way that it was happening in your last post really seems odd.

freeman08

Oct 25, 2010 11:19 am

reporter   ~0002104

I think the drivers should be ok, this may sound stupid but how can I check this on a Mac?
Of course theres always a chance that it's my system that is causing the crashes, lets wait and see whether there are others with the same issues.
I'll just switch to the windows Version and test again as soon as new updates are released.

Cheers cyrill

Chris_McElligottPark

Oct 25, 2010 11:21 am

administrator   ~0002105

tbh, I'm not sure how to check those on a mac. I know that a lot of the driver updates come out through the apple updater itself, and I haven't looked beyond that. Again, sorry for the trouble here.

vonkolberg

Oct 29, 2010 8:41 am

reporter   ~0002326

OK, I managed to duplicate the problem again. I am now running 4.021 on OS X.

ErrorsReportedByEngine.txt:
###########################

10/29/2010 14:32:39 (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()

I also attached my Player.log

vonkolberg

Oct 29, 2010 8:42 am

reporter  

Player.log (44,684 bytes)

keith.lamothe

Oct 29, 2010 9:19 am

administrator   ~0002330

Thanks for letting us know about it happening again and for the log file. I went through the log and didn't find any really new info.

I've never been able to get much info on the pthread_getschedparam thing, so I don't know if it's an actual threading issue or if it's just a symptom of something totally unrelated going wrong in our code.

Hanamigi

Oct 29, 2010 6:12 pm

reporter   ~0002340

I have the same issue, version 4.021

I also tried to disable-enable, first music then sound, after that the game crashed and brought me to the desktop.

Before crashing but after the sound muting it also showed some more glitches, like being unable to see full zoom models of some ship types and just not showing the markV ships that can be made in the tutorial campaign.

Where do I find my error reports? I'd like to help somehow.

Chris_McElligottPark

Oct 29, 2010 6:15 pm

administrator   ~0002341

The error reports would be under your RuntimeData folder in the game folder. The toggling on/off sound/music really wouldn't have much benefit I don't think. We have some stuff coming in the next release that might solve this problem, but we've thought that before, too. I still have yet to ever be able to duplicate it on my Mac! Very odd that it strikes some folks and not others. Anyway, I feel like we're narrowing down a lot of the issues at least, so hopefully one of these fixes coming up will do it.

Hanamigi

Oct 29, 2010 6:48 pm

reporter   ~0002342

I have two .txt, one named ErrorReportedByEngine which is really short, another one named UnhandledErrors and it's 12.3MB of stuff, all made in 6 minutes (created: 16:30 - last modified & last opened: 16:36).

Using OSX 10.5.8

Chris_McElligottPark

Oct 29, 2010 7:56 pm

administrator   ~0002343

Okay, a new version 4.022 is now out. Either hopefully that would solve it (ideally), or hopefully it will make it easier for us to track down, at worst. Or, at worst, I guess hopefully it eliminates yet one more suspect. Thanks for your patience and your help with this one!

Hanamigi

Oct 30, 2010 4:44 am

reporter   ~0002350

Thank YOU for the awesome support, if the problem happens again I'll report it.

Chris_McElligottPark

Oct 30, 2010 9:01 am

administrator   ~0002352

Our pleasure, and again our gratitude for the help!

vonkolberg

Oct 31, 2010 8:57 am

reporter   ~0002416

OK, got my first crash in 4.022 :-(

10/31/2010 13:51:47 (4.022)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
10/31/2010 13:51:47 (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()

ciaran

Oct 31, 2010 4:10 pm

reporter  

ErrorsReportedByEngine.txt (3,933 bytes)   
10/22/2010 02:09:00 (3.900)
-----------------------------------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()

10/22/2010 03:07:31 (3.900)
-----------------------------------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()

10/22/2010 09:38:29 (3.900)
-----------------------------------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()

10/22/2010 10:35:51 (3.901)
-----------------------------------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:MovePlayerUnit(Boolean, Boolean)
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()

10/31/2010 17:59:10 (4.022)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
10/31/2010 17:59:10 (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:MovePlayerUnit(Boolean, Boolean)
Game:RunOneCycleOfSimulation()
Game:RunNextCycle(Boolean)
Game:RunFrame()
MainCameraLogic:FixedUpdate()



10/31/2010 18:50:19 (4.022)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
10/31/2010 18:50:19 (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()



10/31/2010 19:42:38 (4.022)
-----------------------------------
ErrorsReportedByEngine-----------------------------------
10/31/2010 19:42:38 (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)
GameButton:DoTypeClicked(Boolean, Boolean)
GameButtonWindow:HandleButtonClick(IBoundedSelfRenderer, Boolean)
ArcenButtonSetSelfRender:Render(Rect, Vector2, Vector3)
AbstractArcenWindow:WindowFunctionCall(Int32)
UnityEngine.GUI:BeginWindows(Event, Int32, IDList, Int32)



ErrorsReportedByEngine.txt (3,933 bytes)   

Chris_McElligottPark

Nov 1, 2010 10:48 pm

administrator   ~0002510

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.

vonkolberg

Nov 4, 2010 6:27 am

reporter   ~0002675

Last edited: Nov 4, 2010 6:41 am

OK, with 4.025 I got the warning message and the sound turned off automatically, so I quit the game safely. You said there were extra logs for this? Where can I find them? I don't want to restart the game because I know some things get cleared when one starts a new session...

keith.lamothe

Nov 4, 2010 9:44 am

administrator   ~0002677

Just all the .txt error logs in your RuntimeData directory. I don't think Chris added any new logs for this, just made the messages more informative for us.

Thanks!

keith.lamothe

Nov 20, 2010 3:10 pm

administrator   ~0004109

Thankfully, it seems that Chris's rewrite of the sound subsystem has finally solved the OSX saga of problems with it :)

Issue History

Date Modified Username Field Change
Oct 22, 2010 7:17 am vonkolberg New Issue
Oct 22, 2010 7:44 am vonkolberg Note Added: 0001926
Oct 22, 2010 9:44 pm Chris_McElligottPark Note Added: 0001944
Oct 22, 2010 9:44 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Oct 22, 2010 9:44 pm Chris_McElligottPark Status new => feedback
Oct 23, 2010 1:02 pm freeman08 Note Added: 0001972
Oct 23, 2010 1:03 pm Chris_McElligottPark Note Added: 0001973
Oct 23, 2010 1:04 pm freeman08 Note Added: 0001974
Oct 23, 2010 1:05 pm keith.lamothe Note Added: 0001975
Oct 23, 2010 1:06 pm keith.lamothe Note Added: 0001977
Oct 23, 2010 1:17 pm Chris_McElligottPark Note Added: 0001980
Oct 23, 2010 1:19 pm keith.lamothe Note Added: 0001981
Oct 23, 2010 2:59 pm Chris_McElligottPark Note Added: 0002000
Oct 24, 2010 6:39 am freeman08 Note Added: 0002023
Oct 24, 2010 12:09 pm Chris_McElligottPark Note Added: 0002029
Oct 25, 2010 11:19 am freeman08 Note Added: 0002104
Oct 25, 2010 11:21 am Chris_McElligottPark Note Added: 0002105
Oct 29, 2010 8:41 am vonkolberg Note Added: 0002326
Oct 29, 2010 8:41 am vonkolberg Status feedback => assigned
Oct 29, 2010 8:42 am vonkolberg File Added: Player.log
Oct 29, 2010 9:19 am keith.lamothe Note Added: 0002330
Oct 29, 2010 6:12 pm Hanamigi Note Added: 0002340
Oct 29, 2010 6:15 pm Chris_McElligottPark Note Added: 0002341
Oct 29, 2010 6:48 pm Hanamigi Note Added: 0002342
Oct 29, 2010 7:55 pm Chris_McElligottPark Description Updated
Oct 29, 2010 7:56 pm Chris_McElligottPark Note Added: 0002343
Oct 30, 2010 4:44 am Hanamigi Note Added: 0002350
Oct 30, 2010 9:01 am Chris_McElligottPark Note Added: 0002352
Oct 31, 2010 8:57 am vonkolberg Note Added: 0002416
Oct 31, 2010 4:10 pm ciaran File Added: ErrorsReportedByEngine.txt
Nov 1, 2010 10:48 pm Chris_McElligottPark Note Added: 0002510
Nov 4, 2010 6:27 am vonkolberg Note Added: 0002675
Nov 4, 2010 6:41 am vonkolberg Note Edited: 0002675
Nov 4, 2010 9:44 am keith.lamothe Note Added: 0002677
Nov 20, 2010 3:10 pm keith.lamothe Note Added: 0004109
Nov 20, 2010 3:10 pm keith.lamothe Status assigned => resolved
Nov 20, 2010 3:10 pm keith.lamothe Resolution open => fixed
Apr 14, 2014 9:27 am Chris_McElligottPark Category Bug - Crash or Exception => Crash/Exception