# Binding agent crashes the game

**URL:** https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860
**Category:** Bug Reports
**Created:** [August 30, 2021, 3:58pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860 "2021-08-30T15:58:07Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![sparkaward](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/sparkaward/32/7277_2.png) [@sparkaward](https://community.revolutionarygamesstudio.com/u/sparkaward)
#### Post date: [August 30, 2021, 3:58pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/1 "2021-08-30T15:58:07Z")

</div>

I’ve tried playing around with binding in free build mode but anytime I turn the binding agent on the game crashes.

> **log**
>
> Process Started
> 
> Godot Engine v3.3.2.stable.mono.official - [https://godotengine.org](https://godotengine.org)
> 
> OpenGL ES 3.0 Renderer: Intel(R) UHD Graphics
> 
> OpenGL ES Batching: ON
> 
> Mono: Log file is: ‘C:/Users/JordM/AppData/Roaming/Thrive/mono/mono\_logs/2021-08-30\_11.53.29\_17300.log’
> 
> This is Thrive version: 0.5.5.0
> 
> Startup C# locale is: en-CA Godot locale is: en
> 
> user:// directory is: C:/Users/JordM/AppData/Roaming/Thrive
> 
> Game logs are written to: C:/Users/JordM/AppData/Roaming/Thrive/logs latest log is ‘log.txt’
> 
> Doing delayed apply for some settings
> 
> Set audio output device to: Default
> 
> Set C# locale to: en-CA Godot locale is: en
> 
> Loaded registry for Compound with 11 items
> 
> Loaded registry for MembraneType with 6 items
> 
> Loaded registry for Background with 11 items
> 
> Loaded registry for Biome with 11 items
> 
> Loaded registry for BioProcess with 13 items
> 
> Loaded registry for OrganelleDefinition with 18 items
> 
> Loaded registry for MusicCategory with 3 items
> 
> Loaded registry for HelpTexts with 5 items
> 
> Loaded registry for NamedInputGroup with 6 items
> 
> Loaded registry for Gallery with 3 items
> 
> SimulationParameters loading ended
> 
> SimulationParameters are good
> 
> Jukebox now playing from: Menu
> 
> Jukebox: starting track: res://assets/sounds/main-menu-theme-1.ogg position: 0
> 
> Previous patch doesn’t exist, despawning all entities.
> 
> Applying patch (Pangonian Vents) settings
> 
> Number of clouds in this patch = 8
> 
> Registering new spawner: Name: ammonia density: 4E-05
> 
> Registering new spawner: Name: glucose density: 2E-05
> 
> Registering new spawner: Name: phosphates density: 4E-05
> 
> Registering new spawner: Name: hydrogensulfide density: 4E-05
> 
> oxygen spawn density is 0. It won’t spawn
> 
> carbondioxide spawn density is 0. It won’t spawn
> 
> nitrogen spawn density is 0. It won’t spawn
> 
> sunlight spawn density is 0. It won’t spawn
> 
> Number of chunks in this patch = 4
> 
> Registering new spawner: Name: FLOATING\_HAZARD density: 0.0001
> 
> Registering new spawner: Name: SMALL\_IRON\_CHUNK density: 5E-05
> 
> MARINE\_SNOW spawn density is 0. It won’t spawn
> 
> Registering new spawner: Name: BIG\_IRON\_CHUNK density: 5E-05
> 
> Number of species in this patch = 1
> 
> Registering new spawner: Name: 1 density: 1.438849E-05
> 
> Player Microbe spawned
> 
> Jukebox now playing from: MicrobeStage
> 
> TaskExecutor started with parallel job count: 4
> 
> Jukebox: starting track: res://assets/sounds/microbe-theme-5.ogg position: 0
> 
> Jukebox: starting track: res://assets/sounds/soundeffects/microbe-ambience2.ogg position: 0
> 
> Jukebox now playing from: Menu
> 
> Jukebox: starting track: res://assets/sounds/main-menu-theme-2.ogg position: 0
> 
> Entering freebuild mode
> 
> Editor going to freebuild mode because player has activated freebuild
> 
> Starting microbe editor with: 1 organelles in the microbe
> 
> Editor action is now: cytoplasm
> 
> Jukebox now playing from: MicrobeEditor
> 
> Jukebox: starting track: res://assets/sounds/microbe-editor-theme-1.ogg position: 0
> 
> Elapsing time on editor entry
> 
> TimedWorldOperations: running effects. elapsed: 1 total passed: 100000000
> 
> Applying auto-evo results
> 
> Species Chitus Nira has gone extinct in Pangonian Mesopelagic
> 
> Species Cyulosens Obia has gone extinct in Pangonian Abyssopelagic
> 
> Species Nequito Thiomia has gone extinct in Pangonian Coast
> 
> Species Lehaeidia Raroipsis has gone extinct in Pangonian Estuary
> 
> Species Snagpien Crodntor has gone extinct in Pangonian Estuary
> 
> Species Chotrum Opaspian has gone extinct in Cave
> 
> Species Utunra Cerubra has gone extinct in Pangonian Sea Floor
> 
> Species Chitus Nira has gone extinct from the world.
> 
> Species Cyulosens Obia has gone extinct from the world.
> 
> Species Snagpien Crodntor has gone extinct from the world.
> 
> Species Chotrum Opaspian has gone extinct from the world.
> 
> Species Utunra Cerubra has gone extinct from the world.
> 
> Editor action is now: nucleus
> 
> Placing organelle ‘nucleus’ at: 0, 0
> 
> Editor action is now: mitochondrion
> 
> Placing organelle ‘mitochondrion’ at: -2, 1
> 
> Placing organelle ‘mitochondrion’ at: 2, 1
> 
> Placing organelle ‘mitochondrion’ at: -1, 3
> 
> Placing organelle ‘mitochondrion’ at: 1, -2
> 
> Placing organelle ‘mitochondrion’ at: -1, 3
> 
> Editor action is now: vacuole
> 
> Placing organelle ‘vacuole’ at: 2, -1
> 
> Placing organelle ‘vacuole’ at: -2, 2
> 
> Placing
> 
> child process exited with code 3489660927

---

<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: [August 30, 2021, 4:18pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/2 "2021-08-30T16:18:43Z")

</div>

Do you mean once you finish editing and turn on the binding mode?  
That log you provided ends while printing a message about a placed organelle in the editor.

---

<div class="post-metadata">

### Author: ![sparkaward](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/sparkaward/32/7277_2.png) [@sparkaward](https://community.revolutionarygamesstudio.com/u/sparkaward)
#### Post date: [August 30, 2021, 4:56pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/3 "2021-08-30T16:56:03Z")

</div>

Yes I finished edit. I’m now thinking that it might be the free build mode that isn’t working because I just tried playing as a plant using the free build mode and it crashed soon after I left the editor.

---

<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: [August 30, 2021, 5:13pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/4 "2021-08-30T17:13:06Z")

</div>

Can you identify a common element? Does the microbe stage work normally for example if you load a save made in the editor and exit to the stage? And also does it work if you play “normally” meaning start a new game and play through a few editor sessions?

Depending on the results, this might be a totally random crash, _maybe_ caused by an engine bug.

---

<div class="post-metadata">

### Author: ![sparkaward](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/sparkaward/32/7277_2.png) [@sparkaward](https://community.revolutionarygamesstudio.com/u/sparkaward)
#### Post date: [August 30, 2021, 5:26pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/5 "2021-08-30T17:26:07Z")

</div>

Sometimes when I exit the editor the game crashes. This type of crash has never happened before the new update yet it’s been happens every few editor visits since. I haven’t had crashes at any other time except exiting the editor.

---

<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: [August 30, 2021, 5:33pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/6 "2021-08-30T17:33:07Z")

</div>

This could be related to the rendering mode change in 0.5.5.

> <https://github.com/Revolutionary-Games/Thrive/issues/2552>
>
> \*\*Important\*\*
> Please only submit technical bug reports here. This is not a plac…e to make feature requests
> or suggestions. For that please visit our community forums:
> https://community.revolutionarygamesstudio.com/
> 
> \*\*Describe the bug\*\*
> 
> When launching Thrive on Godot, I have frequent crashes.
> 
> \*\*To Reproduce\*\*
> The crashes happen especially at launch and when opening save loading menu. 
> 
> 
> \*\*System info (please complete the following information):\*\*
> \- OS: Windows 10 Family Edition
> \- Graphics card (you can find this in the game logs) GeForce MX150/PCIe/SSE2
> \- Thrive version: 0.5.5
> 
> \*\*Logs\*\*
> 
> Common error message
> \`\`\`
> FATAL: Condition "!GDMonoUtils::is\_thread\_attached()" is true.
> At: modules/mono/csharp\_script.cpp:1344
> \`\`\`
> 
> Prior errors happen (EDIT -Not at latest crash in save menu - Maybe two unrelated issues?):
> \`\`\`
> Doing delayed apply for some settings
> Error initializing global settings: System.NullReferenceException: Object reference not set to an instance of an object
> at Settings.ApplyAll (System.Boolean delayedApply) \[0x00020\] in \<1b95359f21d6490d882710b91037946b\>:0
> at Settings.InitializeGlobalSettings () \[0x0002f\] in \<1b95359f21d6490d882710b91037946b\>:0
> ERROR: \_update\_exports: Exception thrown from constructor of temporary MonoObject:
> At: modules/mono/csharp\_script.cpp:2338
>  
> Unhandled Exception:
> System.TypeInitializationException: The type initializer for 'Settings' threw an exception. ---\> System.NullReferenceException: Object reference not set to an instance of an object
> at Settings.ApplyAll (System.Boolean delayedApply) \[0x00020\] in \<1b95359f21d6490d882710b91037946b\>:0
> at Settings.InitializeGlobalSettings () \[0x00055\] in \<1b95359f21d6490d882710b91037946b\>:0
> at Settings..cctor () \[0x0001e\] in \<1b95359f21d6490d882710b91037946b\>:0
> i --- End of inner exception stacTkh itrsace is -T-h-r
> e veart Stsaiorntu:p A0c.t5i.o5ns..0.c
> or () \[0x000a1\] in \<1Stba9r5t3u5p9 fC21#d 6l4o9c0ad88l2710be9 1i0s3:79 4f6rb-\>F:R0 G
> dot loERcRaOlRe: i sde:b furg\_
> end\_unhandled\_exception\_error: System.TypeInitializationException: The type initializeurs efro:r/ / 'dSiertetcitnogrsy' its: C:/Usershrew/Max an ime/AexcpeppDtaitoan/.R
> amin g / ThrAitv:e
> modulesG/ammeo nlo/omgos nao\_rged /wgridt\_tmeno ntoo\_:u tCi:ls/.Ucspeprs:/37Max0i
> e/AppData/Roaming/Thrive/logs latest log is 'log.txt'
> \`\`\`
> 
> Full log: (crash at launch)
> https://pastebin.com/LW2XvQjG
> 
> Full log: (crash when opening load menu)
> https://pastebin.com/M4Jx4ZCi

@Maxonovien I think this thread might interest you.

---

<div class="post-metadata">

### Author: ![Maxonovien](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/m/f4b2a3/32.png) [@Maxonovien](https://community.revolutionarygamesstudio.com/u/Maxonovien)
#### Post date: [August 30, 2021, 8:43pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/7 "2021-08-30T20:43:06Z")

</div>

Not sure this truly is related to the problem linked above, given that it seems strongly tied to thread (and I have not experienced anything related to binding agents…). The best way would be to find what error is tied to the crash, but I wasn’t able to really find it from the exit code… I’ll see if I can replicate this bug somehow.

However, since I’ve manually removed multi-threading and reinstated it again with a git stash, the game has been pretty stable. So, good news for me, but this may seem I won’t be able to replicate. I don’t really know what is going on here.  
EDIT: Take that back, it just crashed

---

<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: [August 31, 2021, 7:36am UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/8 "2021-08-31T07:36:02Z")

</div>

So perhaps the crash has nothing to do with the render mode? It just wants to crash randomly / due to another problem?

---

<div class="post-metadata">

### Author: ![Maxonovien](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/m/f4b2a3/32.png) [@Maxonovien](https://community.revolutionarygamesstudio.com/u/Maxonovien)
#### Post date: [August 31, 2021, 9:56am UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/9 "2021-08-31T09:56:20Z")

</div>

From what I get there seems to be a consistency with the binding agents: if placed in the editor, the game crashes for op. Pretty interestingly it seems to affect the logs (Placed … _nothing here_), so I suspect something related to the print instruction.

---

<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: [August 31, 2021, 9:57am UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/10 "2021-08-31T09:57:45Z")

</div>

I give it that it is pretty rare for logs to end within a single log line.  
However the bug reporter said that they can exit the editor. And that placed organelle message is printed _before_ exiting the editor, so doesn’t that mean that the log message is not related to the crash?

---

<div class="post-metadata">

### Author: ![Maxonovien](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/m/f4b2a3/32.png) [@Maxonovien](https://community.revolutionarygamesstudio.com/u/Maxonovien)
#### Post date: [August 31, 2021, 10:36am UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/11 "2021-08-31T10:36:04Z")

</div>

Indeed. Can’t that hint at a null variable instead of the `Organelle` that should be printed? Might explain why it crashes afterwards.

---

<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: [August 31, 2021, 10:40am UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/12 "2021-08-31T10:40:39Z")

</div>

I’m way certain that you can’t fail placing like that, I think there’s at least 2 places that check that you are placing an organelle properly. Also C# exceptions seem to very often actually print some kind of error. The log lines being cut off more indicates like a very serious crash inside Godot itself. Also the log message is cutoff within a static string part. If the organelle was null I expect either nothing to be printed (instead an exception is thrown) _or_ the first string part is printed fully `"Placing organelle '"`.  
From our code perspective it makes 0 sense that the log message is cutoff at that point. It must be a native code crash on Godot’s side.

---

<div class="post-metadata">

### Author: ![Maxonovien](https://thrivecommunity-cdn.b-cdn.net/letter_avatar_proxy/v4/letter/m/f4b2a3/32.png) [@Maxonovien](https://community.revolutionarygamesstudio.com/u/Maxonovien)
#### Post date: [August 31, 2021, 11:00am UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/13 "2021-08-31T11:00:40Z")

</div>

If there’s a single string, you are probably right in saying that we have a crash from Godot. It seems to be too consistent for a random crash, though… I’ve finished my editor button branch (although I’m fairly sure there are neater way to do some things, but I didn’t find them), so I’ll make the PR and try to replicate.

---

<div class="post-metadata">

### Author: ![sparkaward](https://thrivecommunity-cdn.b-cdn.net/user_avatar/community.revolutionarygamesstudio.com/sparkaward/32/7277_2.png) [@sparkaward](https://community.revolutionarygamesstudio.com/u/sparkaward)
#### Post date: [August 31, 2021, 1:35pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/14 "2021-08-31T13:35:46Z")

</div>

I think I should verify I was the one who closed Thrive. The crash I talked about only made the screen completely black. I exited the app myself because there was nothing I could do.

---

<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: [August 31, 2021, 1:37pm UTC](https://community.revolutionarygamesstudio.com/t/binding-agent-crashes-the-game/3860/15 "2021-08-31T13:37:11Z")

</div>

Well technically if the program becomes stuck, it hasn’t crashed actually. Instead it is stuck showing a black screen.
