# Unhandled Exceptions at Multicellular stage

**URL:** https://community.revolutionarygamesstudio.com/t/unhandled-exceptions-at-multicellular-stage/8784
**Category:** Bug Reports
**Created:** [December 6, 2025, 7:44pm UTC](https://community.revolutionarygamesstudio.com/t/unhandled-exceptions-at-multicellular-stage/8784 "2025-12-06T19:44:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Thanatos](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@Thanatos](https://community.revolutionarygamesstudio.com/u/Thanatos)
#### Post date: [December 6, 2025, 7:44pm UTC](https://community.revolutionarygamesstudio.com/t/unhandled-exceptions-at-multicellular-stage/8784/1 "2025-12-06T19:44:11Z")

</div>

Hi,

I had an unhandled exception error on my second evolution after reaching multicellular, initially I check to continue and was able to access the editor. I continued with the modification but noticed after placing flagella in symmetry mode and switching to place cillia the unhandled exception in the top red corner counted up whenever I hovered over the cell. When it reached ~300 I restarted the game, the cilia bug did not repeat however after reloading and entering the editor the confirm button had stopped working. The log from the launcher is below.

> <https://pastebin.com/nLVEFWcE>

---

<div class="post-metadata">

### Author: ![hhyyrylainen](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/hhyyrylainen/32/32_2.png) [@hhyyrylainen](https://community.revolutionarygamesstudio.com/u/hhyyrylainen)
#### Post date: [December 6, 2025, 8:14pm UTC](https://community.revolutionarygamesstudio.com/t/unhandled-exceptions-at-multicellular-stage/8784/2 "2025-12-06T20:14:27Z")

</div>

I think you ran into this long-standing multicellular bug:

> <https://github.com/Revolutionary-Games/Thrive/issues/4635>
>
> With a specific cell layout it is possible to get the following error:
> 
> \`\`\`
> Syst…em.ArgumentException: CellTemplate can't be placed at this location
> 
> at HexLayout\`1\[T\].Add (T hex) \[0x00022\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> 
> at EarlyMulticellularSpecies.Clone () \[0x00040\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> 
> at AutoEvo.GenerationRecord.UpdateSpeciesData (Species species) \[0x00021\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> 
> at CreatureStageBase\`2\[TPlayer,TSimulation\].OnReturnFromEditor () \[0x00058\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> 
> at MicrobeStage.OnReturnFromEditor () \[0x00014\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> 
> at EditorBase\`2\[TAction,TStage\].OnEditorExitTransitionFinished () \[0x0009f\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> 
> at EarlyMulticellularEditor.OnEditorExitTransitionFinished () \[0x00007\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> 
> at TransitionManager+Sequence.StartNext () \[0x00094\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> 
> at TransitionManager+Sequence.Process () \[0x00087\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> 
> at TransitionManager.\_Process (System.Single delta) \[0x00019\] in \<059a6e8017b947d18ebf2446d1e30318\>:0 
> \`\`\`
> 
> Seems like the editor causes a cell layout to be created which when duplicated detects that some of the cells actually overlap in the created layout. Probably need to adjust how the cell layout is adjusted after exiting the editor (at least a safety check there anyway to make sure incorrect layouts can't be created would be good).
> 
> Edit: here's a cell layout that triggers the bug:
> 
> !\[screenshot\](https://thrivecommunity-uploads.b-cdn.net/original/2X/a/a61b8506f1622b8ad1173ccecbd8f2c24a4b7570.jpeg)
> 
> that is from this report: https://community.revolutionarygamesstudio.com/t/crash-upon-leaving-multicellular-freebuild-editor/7063
> 
> This newer callstack should be the same issue and is easier to read:
> \`\`\`
> ERROR: System.ArgumentException: CellTemplate can't be placed at this location
> at HexLayout\`1.AddFast(T hex, List\`1 temporaryStorage, List\`1 temporaryStorage2) in /home/hhyyrylainen/Projects/Thrive/src/general/HexLayout.cs:line 67
> at MulticellularSpecies.Clone() in /home/hhyyrylainen/Projects/Thrive/src/multicellular\_stage/MulticellularSpecies.cs:line 248
> at AutoEvo.GenerationRecord.UpdateSpeciesData(Species species) in /home/hhyyrylainen/Projects/Thrive/src/auto-evo/records/GenerationRecord.cs:line 115
> at CreatureStageBase\`2.OnReturnFromEditor() in /home/hhyyrylainen/Projects/Thrive/src/general/base\_stage/CreatureStageBase.cs:line 213
> at MicrobeStage.OnReturnFromEditor() in /home/hhyyrylainen/Projects/Thrive/src/microbe\_stage/MicrobeStage.cs:line 841
> at EditorBase\`2.OnEditorExitTransitionFinished() in /home/hhyyrylainen/Projects/Thrive/src/general/base\_stage/EditorBase.cs:line 1074
> at MulticellularEditor.OnEditorExitTransitionFinished() in /home/hhyyrylainen/Projects/Thrive/src/multicellular\_stage/editor/MulticellularEditor.cs:line 449
> at TransitionManager.Sequence.StartNext() in /home/hhyyrylainen/Projects/Thrive/src/gui\_common/TransitionManager.cs:line 280
> at TransitionManager.Sequence.Process() in /home/hhyyrylainen/Projects/Thrive/src/gui\_common/TransitionManager.cs:line 271
> at TransitionManager.\_Process(Double delta) in /home/hhyyrylainen/Projects/Thrive/src/gui\_common/TransitionManager.cs:line 51
> at Godot.Node.InvokeGodotClassMethod(godot\_string\_name& method, NativeVariantPtrArgs args, godot\_variant& ret)
> at Godot.Control.InvokeGodotClassMethod(godot\_string\_name& method, NativeVariantPtrArgs args, godot\_variant& ret)
> at TransitionManager.InvokeGodotClassMethod(godot\_string\_name& method, NativeVariantPtrArgs args, godot\_variant& ret) in /home/hhyyrylainen/Projects/Thrive/.godot/mono/temp/obj/ExportRelease/linux-x64/Godot.SourceGenerators/Godot.SourceGenerators.ScriptMethodsGenerator/TransitionManager\_ScriptMethods.generated.cs:line 88
> at Godot.Bridge.CSharpInstanceBridge.Call(IntPtr godotObjectGCHandle, godot\_string\_name\* method, godot\_variant\*\* args, Int32 argCount, godot\_variant\_call\_error\* refCallError, godot\_variant\* ret)
> at: void Godot.NativeInterop.ExceptionUtils.LogException(System.Exception) (:0)
> C# backtrace (most recent call first):
> \[0\] void Godot.GD.PushError(string)
> \[1\] void Godot.NativeInterop.ExceptionUtils.LogException(System.Exception)
> \[2\] Godot.NativeInterop.godot\_bool Godot.Bridge.CSharpInstanceBridge.Call(nint, Godot.NativeInterop.godot\_string\_name\*, Godot.NativeInterop.godot\_variant\*\*, int, Godot.NativeInterop.godot\_variant\_call\_error\*, Godot.NativeInterop.godot\_variant\*)
> \`\`\`

Which is seemingly caused by making a very specific cell layout in the editor (which is why the bug is still not fixed as there has never been a simple way to trigger the problem)

This is the relevant part of the logs (the first error):

```auto
ERROR: System.ArgumentException: CellTemplate can't be placed at this location (Cell (Leaf) at -7, 0 at -7, 0)
ERROR: at HexLayout`1.AddFast(T hex, List`1 temporaryStorage, List`1 temporaryStorage2) in /home/hhyyrylainen/Projects/Thrive/src/general/HexLayout.cs:line 68
ERROR: at MulticellularSpecies.Clone() in /home/hhyyrylainen/Projects/Thrive/src/multicellular_stage/MulticellularSpecies.cs:line 339
ERROR: at AutoEvo.GenerationRecord.UpdateSpeciesData(Species species) in /home/hhyyrylainen/Projects/Thrive/src/auto-evo/records/GenerationRecord.cs:line 115
ERROR: at CreatureStageBase`2.OnReturnFromEditor() in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/CreatureStageBase.cs:line 213
ERROR: at MicrobeStage.OnReturnFromEditor() in /home/hhyyrylainen/Projects/Thrive/src/microbe_stage/MicrobeStage.cs:line 844
ERROR: at EditorBase`2.OnEditorExitTransitionFinished() in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/EditorBase.cs:line 1085
ERROR: at MulticellularEditor.OnEditorExitTransitionFinished() in /home/hhyyrylainen/Projects/Thrive/src/multicellular_stage/editor/MulticellularEditor.cs:line 493
ERROR: at TransitionManager.Sequence.StartNext() in /home/hhyyrylainen/Projects/Thrive/src/gui_common/TransitionManager.cs:line 305
ERROR: at TransitionManager.Sequence.Process() in /home/hhyyrylainen/Projects/Thrive/src/gui_common/TransitionManager.cs:line 271
ERROR: at TransitionManager._Process(Double delta) in /home/hhyyrylainen/Projects/Thrive/src/gui_common/TransitionManager.cs:line 51

```

If you have an image or a save or something that can easily show the same problem, I think that info would be helpful in solving the issue.

---

<div class="post-metadata">

### Author: ![Thanatos](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@Thanatos](https://community.revolutionarygamesstudio.com/u/Thanatos)
#### Post date: [December 6, 2025, 9:18pm UTC](https://community.revolutionarygamesstudio.com/t/unhandled-exceptions-at-multicellular-stage/8784/3 "2025-12-06T21:18:21Z")

</div>

Multicell structure

 ![20251206204443_1](https://thrivecommunity-uploads.b-cdn.net/original/2X/2/282af38c126906812957f4c3455e1aa37e8aa8f4.jpeg)

If you let me know where to find the files and where to send them I’m happy to send the save file. Or if you need to see the cell components as I can only embed one image per reply.

---

<div class="post-metadata">

### Author: ![aah31415](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/aah31415/32/14564_2.png) [@aah31415](https://community.revolutionarygamesstudio.com/u/aah31415)
#### Post date: [December 6, 2025, 9:21pm UTC](https://community.revolutionarygamesstudio.com/t/unhandled-exceptions-at-multicellular-stage/8784/4 "2025-12-06T21:21:44Z")

</div>

Since you seem to be playing on windows, you need to access the appdata folder via the windows+r key combination, type in “%appdata%”, find the “Thrive” folder, within which will be a “saves” folder with the save of interest in there.

---

<div class="post-metadata">

### Author: ![Thanatos](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@Thanatos](https://community.revolutionarygamesstudio.com/u/Thanatos)
#### Post date: [December 6, 2025, 9:29pm UTC](https://community.revolutionarygamesstudio.com/t/unhandled-exceptions-at-multicellular-stage/8784/5 "2025-12-06T21:29:06Z")

</div>

Ok thank you, I’ve put a copy in the drop box below

> **[Dropbox](https://www.dropbox.com/scl/fi/9pstj7ez0yjq9sn9hxdyn/Unhandled-errors.thrivesave?rlkey=92nneyae8xbcbd9eo9gh5u1hf&st=6rzdvnu4&dl=0)**

This should put you in the editor after the initial error, I checked quickly and it does reoccur when hitting next. It drops into the game but with the ammonia and phosphate full and lets you open the editor a second time but after resolving the ATP issue does not allow you to hit next.

---

<div class="post-metadata">

### Author: ![hhyyrylainen](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/hhyyrylainen/32/32_2.png) [@hhyyrylainen](https://community.revolutionarygamesstudio.com/u/hhyyrylainen)
#### Post date: [December 6, 2025, 9:30pm UTC](https://community.revolutionarygamesstudio.com/t/unhandled-exceptions-at-multicellular-stage/8784/6 "2025-12-06T21:30:42Z")

</div>

You know, there’s perfectly good buttons in the game to directly open the saves folder (and even the logs folder)…

> [@Thanatos](#):
>
> Ok thank you, I’ve put a copy in the drop box below

Thanks for the save, I’ll investigate it on Monday once I’m back to work.

Edit:

I think I’m getting somewhere, I found these results in our cell type repositioning logic (the repositioning is not stable for very specific cell type layouts):

```auto
Raw center of mass: (-0.6617647, 0, -0.15282802)
Center of mass before: -1, 0
Raw center of mass: (-0.6617647, 0, -0.15282802)
Raw center of mass: (0.4632353, 0, 0.49669102)
Center of mass after: 1, 0

```

Fix probably tomorrow.

Edit: I’ve now made a fix:

> <https://github.com/Revolutionary-Games/Thrive/pull/6559>
>
> \*\*Brief Description of What This PR Does\*\*
> 
> This should finally fix the interm…ittent reported multicellular editor exit problems. The root cause was cell layouts shifting when calling RepositionToOrigin multiple times in a row. Certain cell layouts were not stable, so I had to actually modify the core center of mass algorithm so that it considers much bigger numbers to be close enough to 0 to round them to it.
> 
> \*\*Related Issues\*\*
> 
> 
> closes #4635
> 
> \*\*Progress Checklist\*\*
> 
> Note: before starting this checklist the PR should be marked as non-draft.
> 
> \- \[x\] PR author has checked that this PR works as intended and doesn't
> break existing features:
> https://wiki.revolutionarygamesstudio.com/wiki/Testing\_Checklist
> (this is important as to not waste the time of Thrive team
> members reviewing this PR)
> \- \[\] Initial code review passed (this and further items should not be checked by the PR author)
> \- \[\] Functionality is confirmed working by another person (see above checklist link)
> \- \[\] Final code review is passed and code conforms to the 
> \[styleguide\](https://github.com/Revolutionary-Games/Thrive/blob/master/doc/style\_guide.md).
> 
> Before merging all CI jobs should finish on this PR without errors, if
> there are automatically detected style issues they should be fixed by
> the PR author. Merging must follow our
> \[styleguide\](https://github.com/Revolutionary-Games/Thrive/blob/master/doc/style\_guide.md#git).

Which required changing the core cell center of mass algorithm a tiny bit (to consider small values to be equal to 0). That impacts earlier stages as well, but hopefully not in any bad way.
