Potential Bug: String Concat with 4 Arguments causes total crash

Gray 2 years ago updated 2 years ago 11

Followed the Youtube tutorial by One Wheel Studio (https://www.youtube.com/watch?v=-fRtYKHK30M) which uses String Concat with 4 Arguments, but the resulting flow machine causes a complete crash of Unity

String Concat with 3 Arguments works ok (with an additional concat added to make up the four arguments required).

The following macro works:AlternateListUpdater.asset

But this causes a complete crash of Unity when used instead:4_Arg_Concat_listupdater.asset

Can attach Unity package if required - it's 14.7MB

Bolt Version:
Unity Version:
2019.1.11f1 Personal
Scripting Backend:
.NET Version (API Compatibility Level):
Satisfaction mark by Gray 2 years ago
Pending Review

Hi Gray,

Thanks for the report and sorry you're having this issue. Thankfully it's avoidable, but it's very odd! I'll have a look at what might be causing this.

I would like to second Gray's issue. I am using Bolt 1.4.5 but with Unity 2018.4.5f1 and .Net version 3.x (I think).

Thanks for the help.

Hi Lazlo,

Same here on Unity 2019.2.0f1 on Bolt 1.4.5 .NET 4.x

Thanks !

Yes, it is an old bug, but it's not so important to disturb Lazlo from "classes in Bold 2" ))


Oh, forgive me. I did not want to waste anyone's time! Nevertheless, a bug is a bug. Oh, and I took note of what it says at the top of the forum:

  • Bugs in Bolt 1 are our priority, as Bolt 2 is still in Alpha.

Haha, they are indeed, Bolt 2 development comes after Bolt 1 stability. :) Thanks for the report. Now that our other tool Peek is launched, I'll have time this week to issue some Bolt fixes.

Working on Fix

Can confirm the issue is happening, not exactly sure why yet. Investigating!


Fascinating, I learned a new thing today!

The definition of Concat with 4 arguments uses an undocumented C# keyword (!!!) called __arglist and is marked as non-CLS compliant. This causes the reflection optimization library from Bolt to go haywire because __arglist isn't even a valid parameter as far as reflection is concerned.

I'll make it so version 1.4.6 excludes methods marked with [CLSCompliant(false)], so concat with 4 args won't show up anymore (really, it shouldn't... an undocumented language keyword is not something you want to be using in your codebase in my book!).

OK, so I managed to also avoid the crash by reverting to less-optimized versions of method invocation for methods with a VarArgs calling convention (which __arglist seems to indicate), so I won't need to filter out the String.Concat method away. 


Awesome. Thanks for the hard work. That's why Bolt, Peek and Chronos, and the team behind them, are worth their weight in gold.