Error when launching game in Windows

I tried on my tablet earlier with no success, and I only have the default Windows security there. It worked fine on my dev machine, which of course has haxe and lime. Both Win10.

Could other people run Your haxeflixel demos? If yes, probably error is in development version of flixel (which is linking to both lime and lime-legacy). The hard way is probably rewrite game with previous version of flixel then.
One of the probable errors is if You are using dev version, maybe You have sources from middle of switching from lime-legacy to lime, this could explain dependency of both libs. One of the test could be finding in flixel .hx files function that invokes lime_application_create_prime and remove it from project (I mean remove fuction that invocate this part of code). If it is in unremovable place, like app initialisation, then
other option is to check whether newer version of flixel exist (but then, it could mean rewriting part of code again if there are changes in api)

With Lime 2.6.1 ndlls included, my customer is getting the error
Custom([file_write,stderr])

When compiled with debug flag and hxcpp debugger, the game opens and crashes immediately.

Also, there doesn’t seem to be any reference to lime_application_create_prime in flixel (or flixel-addons, which I’m also using).

lime_application_create is used in lime.app.Application, which should not be available in legacy

Maybe compiling app with -Dlegacy will turn lime dependency off then…? Or manually editing file Application.hx?

It sounds like there’s some rogue code that’s trying to pull current OpenFL/Lime classes, while the rest of the code is trying to force legacy. We don’t have OpenFL legacy guards on all the Lime code, as that’s the current standard code anyway

Perhaps you can do a build with “-xml”, and open the XML, and look for Lime classes, it might tell you what code is importing it

This is the output when I run lime test windows -xml -v: http://hastebin.com/ularinofet.tex

The XML file is huge - almost 65k lines - what should I look for?

I think “-xml” generates an XML file somewhere in the output directory, like “Export/windows/cpp/haxedoc.xml” or something. It should tell us what classes were imported, and what types they refer to. It might give us a method of figuring out what’s trying to pull in non-matching classes :slight_smile:

Yeah here is the XML file - you can find “prime” in one particular spot, but I’m not really sure what I’m looking at - https://www.dropbox.com/s/08zfg1rm6domla9/types.xml?dl=0

Could You send me your obj files from Your build? Should be in windows/cpp/obj/$(compiler).

Sure thing - https://www.dropbox.com/s/yy8bq5jz2u6dyah/obj.zip?dl=0

thanks for the help :slight_smile:

Ok, You can remove obj, but now could You send me Your /lime/_backend/native/NativeApplication.hx file?
Ah, wait these are on git, I’ll check them.

Try rebuilding with haxeflag or haxedef with word “macro”

You can’t define macro, it’s reserved by the compiler for when macros are running.

Hmm… Is there a way of disabling cffi? There is switch in lime hx code with disable_cffi word. Will passing haxedef=“disable-cffi” work?

For the tools yes, you can add the flag -nocffi to the lime command.

1 Like

So compiling with this argument could solve @OP problem…

Btw, sorry for OT, but when is keyword “macro” added?
There is for example from NativeApllication.hx:

	public function setFrameRate (value:Float):Float {
        		#if !macro
        		lime_application_set_frame_rate (handle, value);
        		#end
        		return frameRate = value;
        	}

@ibilon do You know when it is added, or what other flags decide to add it to the defines?

The compiler adds it when running a macro http://haxe.org/manual/macro.html

1 Like

Thank You sir! :slightly_smiling: