# Stack Overflow in 'Simplifying Code' phase

**URL:** https://talk.remobjects.com/t/stack-overflow-in-simplifying-code-phase/24700
**Category:** Elements Bugs
**Created:** [May 5, 2021, 6:13am UTC](https://talk.remobjects.com/t/stack-overflow-in-simplifying-code-phase/24700 "2021-05-05T06:13:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![joe.grist](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@joe.grist](https://talk.remobjects.com/u/joe.grist)
#### Post date: [May 5, 2021, 6:13am UTC](https://talk.remobjects.com/t/stack-overflow-in-simplifying-code-phase/24700/1 "2021-05-05T06:13:55Z")

</div>

**IDE:** _Fire_  
**Version:** 10.0.0.2617  
**Target:** _Android/iOS/OSX/Net_  
**Description** :

Updating old project. Project is a cross-platform library for a product with MacOS / iOS / Android / Windows clients. Project will not build due to apparent compiler bug.

**Expected Behaviour** :

Code compiles or we get a useful reason why not

**Actual Behaviour** :

Nasty stack overflow in the “Simplifying Code” phase. Begins like this:

Stacktrace:  
at \<0xffffffff\>  
at (wrapper alloc) object.AllocVector (intptr,intptr) \<0x001b2\>  
\<…\>  
at System.Collections.Immutable.ImmutableArray`1/Builder\<T\_REF\>…ctor (int) [0x00018] in \<2257bd9deb0541b693a3701083404f11\>:0  
at System.Collections.Immutable.ImmutableArray.CreateBuilder\<T\_REF\> (int) [0x00000] in \<2257bd9deb0541b693a3701083404f11\>:0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitBeginStatement (RemObjects.Oxygene.Code.BeginStatement) [0x002b6] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitStatement (RemObjects.Oxygene.Code.Statement) [0x00356] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitStatement (RemObjects.Oxygene.Code.Statement) [0x00012] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitCastExpression (RemObjects.Oxygene.Code.CastExpression) [0x00378] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x0085f] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x000a4] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitCastExpression (RemObjects.Oxygene.Code.CastExpression) [0x00014] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitCastExpression (RemObjects.Oxygene.Code.CastExpression) [0x00386] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x0085f] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x000a4] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitCastExpression (RemObjects.Oxygene.Code.CastExpression) [0x00014] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitCastExpression (RemObjects.Oxygene.Code.CastExpression) [0x00386] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x0085f] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x000a4] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitAssignmentStatement (RemObjects.Oxygene.Code.AssignmentStatement) [0x00158] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitStatement (RemObjects.Oxygene.Code.Statement) [0x00363] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitStatement (RemObjects.Oxygene.Code.Statement) [0x00012] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitIfStatement (RemObjects.Oxygene.Code.IfStatement) [0x00014] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitIfStatement (RemObjects.Oxygene.Code.IfStatement) [0x0001c] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitStatement (RemObjects.Oxygene.Code.Statement) [0x003a4] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitStatement (RemObjects.Oxygene.Code.Statement) [0x00012] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitBeginStatement (RemObjects.Oxygene.Code.BeginStatement) [0x002f3] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitStatement (RemObjects.Oxygene.Code.Statement) [0x00356] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitStatement (RemObjects.Oxygene.Code.Statement) [0x00012] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitCastExpression (RemObjects.Oxygene.Code.CastExpression) [0x00378] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x0085f] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x000a4] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitCastExpression (RemObjects.Oxygene.Code.CastExpression) [0x00014] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitCastExpression (RemObjects.Oxygene.Code.CastExpression) [0x00386] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x0085f] in :0  
at RemObjects.Oxygene.Code.Compiler.CodeSimplifier.VisitExpression (RemObjects.Oxygene.Code.Expression) [0x000a4] in :0  
at RemObjects.Oxygene.Code.BaseVisitor.VisitCastExpression (RemObjects.Oxygene.Code.CastExpression) [0x00014] in :0

…etc etc etc

**Steps** :

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [May 5, 2021, 10:53am UTC](https://talk.remobjects.com/t/stack-overflow-in-simplifying-code-phase/24700/2 "2021-05-05T10:53:34Z")

</div>

Do you have a testcase I can try? (you can also send it to support@, we’ll keep it private).

---

<div class="post-metadata">

### Author: ![joe.grist](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@joe.grist](https://talk.remobjects.com/u/joe.grist)
#### Post date: [May 5, 2021, 9:15pm UTC](https://talk.remobjects.com/t/stack-overflow-in-simplifying-code-phase/24700/3 "2021-05-05T21:15:13Z")

</div>

I wish I could isolate the fault so we could have it posted here for future ref, but I’ll have to send the whole project to support. Doing so. thx …

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [May 5, 2021, 9:53pm UTC](https://talk.remobjects.com/t/stack-overflow-in-simplifying-code-phase/24700/5 "2021-05-05T21:53:45Z")

</div>

Thanks, logged as [bugs://85897](https://www.remobjects.com/portal/bugs/?id=85897)

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [May 6, 2021, 6:58pm UTC](https://talk.remobjects.com/t/stack-overflow-in-simplifying-code-phase/24700/6 "2021-05-06T18:58:11Z")

</div>

[bugs://85897](https://www.remobjects.com/portal/bugs/?id=85897) got closed with status fixed.
