lime icon indicating copy to clipboard operation
lime copied to clipboard

Error: OutsideBounds when compiling a project after building with hxcpp 4.1.15

Open loudoweb opened this issue 3 years ago • 1 comments

When working on dev branch and rebuilding tools and such with hxcpp 4.1.15, I can't compile any project.

lime test html5 (or any target) gives :

Called from haxe/io/Bytes.hx line 97
Called from openfl/utils/ByteArray.hx line 1593
Called from openfl/display/BitmapData.hx line 1140
Called from SVGExport.hx line 174
Error: OutsideBounds

So I've set hxcpp to version 4.0.64, rebuilded everything and now it works. So my guess is that there is some bug in last hxcpp or some incompatibility.

It mays be related to https://github.com/openfl/openfl/issues/2243

loudoweb avatar Jul 16 '20 14:07 loudoweb

I have a little investigation in this issue and can say following. Lime build tool as any other haxelib tool is a neko bytecode. During assemble lime does a lot of stuff, in this particular case, convertiong svg icon to the appropriate format for target platform. SVGExport of lime depends on openfl classes. To call it from within neko process it uses neko cffi api (it allows to load dll compiled with c/cpp) to load lime shared library built for host platform. Seems that hxcpp cffi api little bit changed so interop between neko and lime.ndll kinda broken. The error is looking like OutsideBounds because any fail with haxe.io.bytes access throws this one.

pecheny avatar Aug 09 '20 14:08 pecheny