-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught exception when running with OpenFL Neko #77
Comments
I'd be tempted to log this to openfl instead... I cannot reproduce it in a non-openfl project with just neko + nape class Main
{
static function main() {
var space = new nape.space.Space(nape.geom.Vec2.weak(0, 10));
var b = new nape.phys.Body();
b.shapes.add(new nape.shape.Circle(10));
b.space = space;
space.step(1/60);
trace(b.position.y);
}
} haxe -x Main -lib nape |
As you can see I've reported the issue with OpenFL. I'll soon test your code to see if the error is gone then on my machine as well. |
Yes, your sample works here too. |
I get this error when trying to run with Neko target:
I put these two defines in my project.xml:
|
Could you reproduce that without using openfl and it's build tools? This seems to stem from the ID.hx file which is basicly just a bunch of 'static var X_ID = 0;' lines not ending up in the compiled code, and with the integers initialised to null (hence the invalid operationr + error). |
Well, here's a test project that initializes nape without openfl, it seems to work... but I need openfl and its build tools to make my games that use of Nape. So I'm still kinda sad, because Neko compiles much faster than cpp. |
It might be a neko issue HaxeFoundation/neko#14 |
It works. hehe.. <haxeflag name="-dce full" />
<!-- Optional -->
<haxedef name="NAPE_RELEASE_BUILD" />
|
As I mentioned in openfl/openfl#158, that flag doesn't resolve the issue for me, using all the same versions. @deltaluca do you know why the static variables in |
There's no point investigating any further unless you build the latest neko with the lifted opcode limit as that is the reason for this problem. (OpenFL + Nape triggers it by being so damn huge paired together) |
It doesn't work for me:
I'm in the middle of a coding jam so I will do it with flash and loose all the neko debugging facility... |
Just pointing out that I compile Neko from the GIT source and this does fix it for the example in the first post, however testing it on my game, the same error still occured. Here my build of neko: http://test.failsafevault.com/files/neko-2.0.1-win.zip don't forget to replace the neko.dll in the bin folder |
@starburst997, raise it with haxe/neko, if it's the exact same issue it may still be something on the lines of not having a large enough opcode size since presumably your game is more than a few lines of code ^^ |
Thanks, I'll try tweaking the values to allow more size |
It appears something in Nape causes an error when running an OpenFL game with Neko.
Demo code:
This works fine. However, if you uncomment the
var space
line, the output is as follows:Am I doing something wrong or is this a Nape thing. If the latter, is it a bug or is Neko deliberately unsupported? Will it be fixed/added in the future?
Thanks
The text was updated successfully, but these errors were encountered: