[HTML5 - Openfl 8.9.1 - Lime 7.5.0] Substring error, length < 0

I have upgraded to the latest Lime-Openfl, and now I receive this error from Haxe Develop while compiling:

Length cannot be less than zero.
Parameter name: length

   in System.String.Substring(Int32 startIndex, Int32 length)
   in HaXeContext.ExternalToolchain.Run(String command)
   in HaXeContext.PluginMain.HandleEvent(Object sender, NotifyEvent e, HandlingPriority priority)
   in PluginCore.Managers.EventManager.DispatchEvent(Object sender, NotifyEvent e)

It looks like Substring receives -1 as length.
Did you receive the same error?

That sounds like a HaxeDevelop bug and should be reported there.

System.string is part of haxe.

What haxe version are you using?

No it’s not. This is a C# stacktrace from HaxeDevelop. :slight_smile:

Haxe 3.4.7

The problem didn’t appear with the previous Openfl/Lime versions.
I know that it could be an HaxeDevelop error, but I’d like to know if someone got the same error and how often, because in my case it doesn’t popup at every compile, it looks pretty random.

I was getting the same error with HaxeDevelop with recent openfl/lime versions. Sometimes restarting HaxeDevelop did help. And i agree seems pretty random issue. As i’m switching between different versions not sure what version did have this problem.

I switched from Lime 7.2.1 + Openfl 8.8.0 to Lime 7.5.0 + Openfl 8.9.1, but I am pretty sure to remember that I skipped the intermediate versions for the same issue.
Restarting HD or reselecting the project more than once sometimes help, but I think I will jump back to the old libraries to avoid wasting further time.

Yes, maybe an unhandled exception in HD, but with the old Lime-Openfl versions this didn’t happen.
I am not in a good position to install dev versions of HaxeDevelop, and the latest official version is more than 1 year old.


I tried update openfl from 8.8.0 and lime 7.2.1 to openfl 9.1.0 and lime 7.9.0.

I already update haxe to 4.2.5 and hxcpp 4.2.1

But when try to build the project using flashdevelop 5.3.3, I got this error

Anyone know how to solve this issue?