inkle/ink-unity-integration

Not sure what to do, reach out to me if you need more information on this error

Astotts opened this issue · 5 comments

Ink Compiler threw exception
Error: Collection was modified; enumeration operation may not execute.
---- Trace ----
at System.Collections.Generic.HashSet1+Enumerator[T].MoveNext () [0x00013] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at Ink.CharacterSet.AddCharacters (System.Collections.Generic.IEnumerable1[T] chars) [0x00018] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\CharacterSet.cs:37
at Ink.InkParser.ExtendIdentifierCharacterRanges (Ink.CharacterSet identifierCharSet) [0x0000e] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser_CharacterRanges.cs:36
at Ink.InkParser.get_identifierCharSet () [0x00039] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser_Logic.cs:412
at Ink.InkParser.Identifier () [0x00000] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser_Logic.cs:384
at Ink.InkParser.IdentifierWithMetadata () [0x00000] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser_Logic.cs:372
at Ink.StringParser.Parse[T] (Ink.StringParser+SpecificParseRule`1[T] rule) [0x00007] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\StringParser\StringParser.cs:267
at Ink.InkParser.AuthorWarning () [0x00007] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser_AuthorWarning.cs:11
at Ink.StringParser.ParseObject (Ink.StringParser+ParseRule rule) [0x00012] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\StringParser\StringParser.cs:250
at Ink.InkParser+<>c__DisplayClass146_0.b__0 () [0x00000] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser_Statements.cs:147
at Ink.StringParser.ParseObject (Ink.StringParser+ParseRule rule) [0x00012] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\StringParser\StringParser.cs:250
at Ink.StringParser.OneOf (Ink.StringParser+ParseRule[] array) [0x0000a] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\StringParser\StringParser.cs:280
at Ink.InkParser.StatementAtLevel (Ink.InkParser+StatementLevel level) [0x00009] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser_Statements.cs:38
at Ink.InkParser+<>c__DisplayClass141_0.b__0 () [0x00000] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser_Statements.cs:30
at Ink.StringParser.ParseObject (Ink.StringParser+ParseRule rule) [0x00012] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\StringParser\StringParser.cs:250
at Ink.StringParser.Interleave[T] (Ink.StringParser+ParseRule ruleA, Ink.StringParser+ParseRule ruleB, Ink.StringParser+ParseRule untilTerminator, System.Boolean flatten) [0x00040] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\StringParser\StringParser.cs:393
at Ink.InkParser.StatementsAtLevel (Ink.InkParser+StatementLevel level) [0x0003c] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser_Statements.cs:28
at Ink.InkParser.Parse () [0x00000] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\InkParser\InkParser.cs:46
at Ink.Compiler.Parse () [0x00033] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\Compiler.cs:35
at Ink.Compiler.Compile () [0x00000] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\InkLibs\InkCompiler\Compiler.cs:41
at Ink.UnityIntegration.InkCompiler.CompileInkThreaded (System.Object itemObj) [0x00085] in D:\UnityFiles\Mechani-Mystery\Assets\Ink\Editor\Core\Compiler\InkCompiler.cs:419

//INCLUDE globals.ink
VAR managementCodeBot0 = true
-> Robot1

=== Robot1 ===
Appetizers?
+ [No Thanks, did you flag any customers as suspicious last night?]
->managementModeReq
+ [Show me the last 10 seconds before your last shutdown]
->managementModeReq
+ [No, Did you see who shot you?]
->murderDetails
+ [What is your owners name?]
->ownerQuestions

=== managementModeReq ===
{managementCodeBot0 == true:->managementModeReq|->suspicious}
proof of management permissions required to access
+[I have access codes]
->grantPermissions
+[Hmm. . .]
->Robot1

=== suspicious ===
Suspicious
->Robot1

=== ownerQuestions ===
My owner goes by Xavier Leonidas.
+ [What is your make?]
-> make
+ [What was your date of purchase?]
->managementModeReq
+ [What is your model number]
->managementModeReq
->Robot1

=== murderDetails ===
No I didn't. . .
-> Robot1

=== make ===
Axiom Machines.
-> Robot1

=== grantPermissions ===
Codes
~ managementCodeBot0 = false
-> Robot1

Well now its more serious. I just compiled again and got no error so I tried it out in the game. Then it froze unity and started a memory leak making unity take up 6 GB of memory. When I clicked through [What is your owners name?] and [What is your make?]. Beforehand It kept having the issue of defaulting to managementModeReq despite the fact that its clearly redirecting to make in the code

Yeah I have no clue whats going on here, its working in the inspector window and in ink. But whenever I try it in game instant crash. Its exclusively linked to managementModeReq. Any choice that goes to it crashes it.

Well go figure its linked to this {managementCodeBot0 == true:->managementModeReq|->suspicious}