View Issue Details

IDProjectCategoryLast Update
0019350AI War 2Crash/ExceptionJan 26, 2018 10:24 am
ReporterBadgerBadger Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version0.703 
Fixed in Version0.703 
Summary0019350: crash in voice code
DescriptionI was spamming "Build a bunch of turrets" holding shift when I hit a crash:
1/25/2018 6:33:10 PM
-----------
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
Stack Trace: System.Collections.Generic.List`1[UnityEngine.AudioClip].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:635)
Arcen.Universal.ArcenVoiceGroup.PickRandomItemIfAvailable (Single CurrentTime, Arcen.Universal.RandomGenerator RandomToUse, System.Int32& ClipIndex)
Arcen.Universal.ArcenVoiceGroup.TryToPlayRandom (Vector3 AtLocation, Single CurrentTime)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.HandleSoundPlaybackRequests ()
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.RunUpdate ()
ArcenMainGameVisuals.Update ()



   at System.Environment.get_StackTrace() in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Environment.cs:line 227
   at Arcen.Universal.ArcenDebugging.ArcenDebugLog(System.String Message, DebugLogDestination Destination, Boolean IncludeStackTrace, Verbosity Verbosity)
   at Arcen.Universal.ArcenDebugging.ArcenDebugLog(System.String Message, DebugLogDestination Destination, Verbosity Verbosity)
   at Arcen.Universal.ArcenDebugging.ArcenDebugLog(System.String Message, Verbosity Verbosity)
   at Arcen.Universal.Engine_Universal.LogWritten(System.String LogString, System.String StackTrace, LogType Type, System.Exception Cause, Boolean CameFromUnity)
   at Arcen.Universal.Engine_Universal.LogWrittenFromUnity(System.String LogString, System.String StackTrace, LogType Type)
   at UnityEngine.Application.CallLogCallback(System.String logString, System.String stackTrace, LogType type, Boolean invokedOnMainThread)
TagsNo tags attached.

Relationships

related to 0019353 resolvedkeith.lamothe NextWithInclusiveUpperBound in ArcenRandomDrawBag? 

Activities

BadgerBadger

Jan 25, 2018 6:55 pm

manager   ~0046725

#region PickRandomItemIfAvailable
        public AudioClip PickRandomItemIfAvailable( float CurrentTime, RandomGenerator RandomToUse, out int ClipIndex )
        {
            this.FillInternalListWorking( CurrentTime );
            ClipIndex = -1;
            if ( internalListWorking.Count <= 0 )
                return null;
                                                                                                                                                                                                                                                                                                                              
            ClipIndex = RandomToUse.NextWithInclusiveUpperBound( 0, internalListWorking.Count ); <==== So if there are 4 items in the list then I'm picking a from 0, 1, 2, 3 or 4, right? I don't think you want an Inclusive check
            return internalListWorking[ClipIndex];
        }

Chris_McElligottPark

Jan 26, 2018 10:19 am

administrator   ~0046733

Thanks! Got that fixed. I have no idea why I was calling that method; it's rather alarming. I found that in three other classes it is also using that. I'm not sure if that was an intellisense-induced typo, of if it was copy-paste from ArcenRandomDrawBag, where that MIGHT be legitimately in use. I will have to check with Keith on that one.

Issue History

Date Modified Username Field Change
Jan 25, 2018 6:34 pm BadgerBadger New Issue
Jan 25, 2018 6:34 pm BadgerBadger Status new => assigned
Jan 25, 2018 6:34 pm BadgerBadger Assigned To => Chris_McElligottPark
Jan 25, 2018 6:55 pm BadgerBadger Note Added: 0046725
Jan 26, 2018 10:19 am Chris_McElligottPark Status assigned => resolved
Jan 26, 2018 10:19 am Chris_McElligottPark Resolution open => fixed
Jan 26, 2018 10:19 am Chris_McElligottPark Fixed in Version => 0.703
Jan 26, 2018 10:19 am Chris_McElligottPark Note Added: 0046733
Jan 26, 2018 10:24 am Chris_McElligottPark Relationship added related to 0019353