Problem with openfl next (openfl and lime git versions)

I am trying to use the developpment versions of lime and openfl (that are supposed to have fixed some of the issue I had with openfl next with latest public releases of lime and openfl) but even if my application compiles well with -Dnext, it crash at runtime, both on windows and android:

  • On windows, it start but after 2 or 3 seconds, it automatically stop (without any action on my part) with a popup message saying that the the program has stopped working. There is no error message in the console when compiled with -debug (so kind of hard to know what is going on)
  • On android it start but crash at my first action that consist into setting text of a textfield (the first action of my app is asking the user to input a username). I have multiple warning messages on android adb logcat (I can publish them if necessary but they are mixed with messages from other programs so it is kind of a mess and I din’t took the time to look at them in detail yet)

If I compile with lime 2.6.2 and openfl 3.3.3, my application do not crash (but I have the colortransform, textfield alignment… problems) so this issue only occurs with lime and openfl git versions.
When compiled with legacy, there is no issue on both targets.

I guess it is not just a matter of lime and openfl git version beeing temporary broken by a current change because I have this issue since 3 or 4 openfl and lime git versions (have this since last week end and I updated/checkedout openfl at least 3 times and lime 1 or 2 times since)

Try updating again, been some changes to try and patch some minor leaks, but one of these patches was causing a crash. Should be resolved, but let me know how it works after updating

after the update, I now have the popup message: “lime_application_create does not have signature od” and the error message: “Called from cpp.Prime::_loadPrime C:\HaxeToolkit\haxe\std/cpp/Prime.hx line 43” in the console when building for windows. And the app doesn’t even show (I only see the popup message but no app windows).
On android, the app immediately close/minimise now when I try to open it (I only see a black screen and the app immediately goes into background)

EDIT: looks like you performed a new update as I just did a new checkout and had 5 new changes coming out in lime:

lime/_backend/native/NativeApplication.hx |   2 +-
 lime/audio/openal/ALC.hx                  |   4 ++--
 lime/graphics/cairo/CairoFontOptions.hx   |  16 ++++++++--------
 lime/graphics/cairo/CairoPattern.hx       |   2 +-
 svg.n                                     | Bin 1077410 -> 1238111 bytes
 5 files changed, 12 insertions(+), 12 deletions(-)

“lime rebuild windows” did nothing new though.

Now, I don’t have the “lime_application_create…” popup anymore but I have the same kind of behaviour as previously: The app start but immediatly crash at first action (I clicked a button) with no error in the console output. Some improvment though as it doesn’t seems to crash till I perform an action :wink: (I waited a few second doing nothing and it did not crash as it previously did))
On android, same behaviour as before the update; The application crash at first action

I just saw there was new public versions of openfl and lime available (3.3.5 and 2.6.4). I don’t know why haxelib upgrade do no proposed me an upgrade to these version but I had to do an haxelib install openfl and haxelib install lime for haxelib to see and install them…
I have the same behaviour with these latest public versions as with the current git versions (application crash when compiled with -Dnext) whereas if I go back to lime 2.6.2 and openfl 3.3.3 the application do not crash.

UP.
Would be cool to have a quick fix on this because I am currently blocked on the developpement of my app as I can’t use openfl 3.3.5 and lime 2.6.4 (or openfl git and lime git) that make my app to crash on cpp targets with openfl next and I can’t either use previous versions of openfl and lime that had display issues with next :wink:

I have fork of lime and openfl, and I don’t get crash anymore after fixing CFFI finalizer issue.
There are also crashs issue with JPEG and OGG loading, but this only occurs on Android and I don’t know when this bug was introduced.
Another issue occurs on windows is Typed Array crash that keeps me from copying content with set() method.

If you can try your app with debug build and show us callstack (or crashdump), that would be helpful.
Visual Studio will help in that.

Just pushed new versions, please give it a try :slight_smile:

Doesn’t work with these new versions either.

Here is the output I get before it crash when compiled in debug mode for android:

E/ActivityManager(  631): ANR in com.avast.android.mobilesecurity
E/ActivityManager(  631): Reason: Executing service com.avast.android.mobilesecurity/.app.fileshield.FileShieldService
E/ActivityManager(  631): Load: 11.33 / 7.92 / 6.53
E/ActivityManager(  631): CPU usage from 2136ms to -4865ms ago:
E/ActivityManager(  631):   69% 11183/com.tbdlab.darkaedalus: 61% user + 8.1% kernel / faults: 13410 minor 138 major
E/ActivityManager(  631):   27% 631/system_server: 19% user + 8.8% kernel / faults: 2511 minor 73 major
E/ActivityManager(  631):   4.4% 28713/com.FD.updater: 0.3% user + 4% kernel / faults: 1713 minor 1 major
E/ActivityManager(  631):   7.7% 151/surfaceflinger: 2.2% user + 5.4% kernel / faults: 1134 minor
E/ActivityManager(  631):   6.2% 117/mmcqd/0: 0% user + 6.2% kernel
E/ActivityManager(  631):   3.4% 154/mediaserver: 3.1% user + 0.2% kernel / faults: 27 minor
E/ActivityManager(  631):   1.2% 796/com.android.systemui: 0.9% user + 0.2% kernel / faults: 708 minor 9 major
E/ActivityManager(  631):   2.1% 53/kswapd0: 0% user + 2.1% kernel
E/ActivityManager(  631):   0.2% 909/com.android.phone: 0.1% user + 0% kernel / faults: 581 minor 9 major
E/ActivityManager(  631):   0.7% 260/sensors.qcom: 0% user + 0.7% kernel / faults: 20 minor
E/ActivityManager(  631):   0.1% 2482/kworker/u:5: 0% user + 0.1% kernel
E/ActivityManager(  631):   0.4% 684/mpdecision: 0% user + 0.4% kernel / faults: 15 minor
E/ActivityManager(  631):   0% 941/com.qualcomm.services.location: 0% user + 0% kernel / faults: 353 minor 4 major
E/ActivityManager(  631):   0.4% 979/com.android.launcher: 0% user + 0.4% kernel / faults: 301 minor 3 major
E/ActivityManager(  631):   0.4% 2427/kworker/u:1: 0% user + 0.4% kernel
E/ActivityManager(  631):   0.2% 11022/com.avast.android.mobilesecurity: 0.1% user + 0% kernel / faults: 468 minor 7 major
E/ActivityManager(  631):   0.2% 134/jbd2/mmcblk0p22: 0% user + 0.2% kernel
E/ActivityManager(  631):   0% 920/com.acer.douservice: 0% user + 0% kernel / faults: 308 minor
E/ActivityManager(  631):   0.1% 963/com.android.nfc: 0% user + 0% kernel / faults: 344 minor 1 major
E/ActivityManager(  631):   0.1% 4232/com.viber.voip: 0% user + 0.1% kernel / faults: 323 minor 12 major
E/ActivityManager(  631):   0.2% 10566/kworker/u:2: 0% user + 0.2% kernel
E/ActivityManager(  631):   0% 3/ksoftirqd/0: 0% user + 0% kernel
E/ActivityManager(  631):   0% 143/servicemanager: 0% user + 0% kernel / faults: 25 minor
E/ActivityManager(  631):   0% 1106/com.google.process.gapps: 0% user + 0% kernel / faults: 156 minor 3 major
E/ActivityManager(  631):   0.1% 1593/kworker/0:0: 0% user + 0.1% kernel
E/ActivityManager(  631):   0% 1691/com.avast.android.batterysaver: 0% user + 0% kernel / faults: 280 minor 5 major
E/ActivityManager(  631):   0% 7820/com.google.android.gms: 0% user + 0% kernel / faults: 178 minor 4 major
E/ActivityManager(  631):   0% 10573/com.uu.generaladaptiveapps: 0% user + 0% kernel / faults: 182 minor 1 major
E/ActivityManager(  631):   0% 10663/com.estrongs.android.pop: 0% user + 0% kernel / faults: 311 minor 3 major
E/ActivityManager(  631):   0% 10729/com.android.email: 0% user + 0% kernel / faults: 148 minor 1 major
E/ActivityManager(  631):   0% 10777/com.android.exchange: 0% user + 0% kernel / faults: 297 minor 5 major
E/ActivityManager(  631):   0% 28429/com.android.browser: 0% user + 0% kernel / faults: 147 minor 1 major
E/ActivityManager(  631):   0% 30123/com.staircase3.opensignal: 0% user + 0% kernel / faults: 149 minor 2 major
E/ActivityManager(  631):  +0% 11397/migration/1: 0% user + 0% kernel
E/ActivityManager(  631):  +0% 11398/kworker/1:2: 0% user + 0% kernel
E/ActivityManager(  631):  +0% 11399/ksoftirqd/1: 0% user + 0% kernel
E/ActivityManager(  631):  +0% 11400/kworker/1:0: 0% user + 0% kernel
E/ActivityManager(  631): 96% TOTAL: 46% user + 26% kernel + 22% iowait + 0.2% softirq
E/ActivityManager(  631): CPU usage from 3761ms to 4479ms later:
E/ActivityManager(  631):   75% 28713/com.FD.updater: 0% user + 75% kernel / faults: 608 minor
E/ActivityManager(  631):     71% 28718/Signal Catcher: 5.7% user + 65% kernel
E/ActivityManager(  631):   67% 11183/com.tbdlab.darkaedalus: 65% user + 1.4% kernel / faults: 6 minor
E/ActivityManager(  631):     64% 11259/SDLThread: 64% user + 0% kernel
E/ActivityManager(  631):     1.4% 11258/er$SensorThread: 1.4% user + 0% kernel
E/ActivityManager(  631):     1.4% 11364/OpenAL/sl/m: 1.4% user + 0% kernel
E/ActivityManager(  631):     1.4% 11377/GL updater: 0% user + 1.4% kernel
E/ActivityManager(  631):   22% 631/system_server: 7% user + 15% kernel / faults: 183 minor 8 major
E/ActivityManager(  631):     16% 646/ActivityManager: 4.2% user + 12% kernel
E/ActivityManager(  631):     5.6% 639/FinalizerDaemon: 0% user + 5.6% kernel
E/ActivityManager(  631):     1.4% 703/er$SensorThread: 0% user + 1.4% kernel
E/ActivityManager(  631):   8.4% 151/surfaceflinger: 4.2% user + 4.2% kernel / faults: 38 minor
E/ActivityManager(  631):     5.6% 431/SurfaceFlinger: 4.2% user + 1.4% kernel
E/ActivityManager(  631):     1.4% 570/hwcVsyncThread: 0% user + 1.4% kernel
E/ActivityManager(  631):     1.4% 16804/Binder_6: 0% user + 1.4% kernel
E/ActivityManager(  631):   2.8% 53/kswapd0: 0% user + 2.8% kernel
E/ActivityManager(  631):   2.8% 117/mmcqd/0: 0% user + 2.8% kernel
E/ActivityManager(  631):   2.8% 154/mediaserver: 0% user + 2.8% kernel
E/ActivityManager(  631):     2.8% 652/AudioOut_2: 0% user + 2.8% kernel
E/ActivityManager(  631):   1.4% 2427/kworker/u:1: 0% user + 1.4% kernel
E/ActivityManager(  631):   0.6% 11399/ksoftirqd/1: 0.6% user + 0% kernel
E/ActivityManager(  631): 100% TOTAL: 43% user + 49% kernel + 5.6% iowait + 0.7% softirq
F/libc    (11183): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 11259 (SDLThread)

on windows, I have nothing in the console ouput (it just crash whithout any message)

Are you using this from source? If so, try a -clean rebuild of each Lime target. I just downloaded the latest release, it’s running here (as is my development copy). I’ll try Android in a minute

I always delete the “export” directory of my project before rebuilding it and I used latest public lime version (2.6.5) so do I need to make a clean rebuild of it?

Is this installed from haxelib? Or is it installed from GIT? Could you run haxelib path lime and haxelib path openfl to see what’s in use?

haxelib path lime:
-L lime/2,6,5/ndll/
C:\HaxeToolkit\haxe\lib/lime/2,6,5/
-D lime=2.6.5

haxelib path openfl:
C:\HaxeToolkit\haxe\lib/openfl/3,3,6/
-D openfl=3.3.6

haxelib list:
actuate: 1.7.5 1.8.5 [1.8.6]
akifox-asynchttp: 0.4.1 [0.4.2]
away3d-examples: [1.1.0]
away3d: [1.1.0]
BabylonHx: git [dev:C:\HaxeToolkit\haxe\lib/BabylonHx/git]
BabylonHx_Extensions: git [dev:C:\HaxeToolkit\haxe\lib/BabylonHx_Extensions/git]
BabylonHx_old: git [dev:C:\HaxeToolkit\haxe\lib/BabylonHx/git]
box2d: [1.2.3]
extension-iap: [1.1.0]
extension-locale: 1.0.0 [1.0.1]
extension-share: 1.2.2 2.1.0 [2.2.0]
extensionkit: git [dev:C:\HaxeToolkit\haxe\lib/extensionkit/git]
firetongue: [1.0.0]
flixel-addons: [1.1.0] git
flixel-demos: 1.1.1 [1.1.2]
flixel-templates: [1.0.2]
flixel-tools: 1.0.2 1.0.5 1.1.0 [1.1.1]
flixel-ui: [1.0.2]
flixel: [3.3.11] 3.3.6 3.3.8 3.3.9 git
format: [3.2.0]
haxe-ga: 0.4.16 0.4.21 0.5.0 [0.5.2]
haxe-gif: [0.3.3]
haxelib_client: 3.1.0-rc.4 [3.2.0-rc.3]
hxColorToolkit: [1.6.0]
hxcpp: 3.1.39 [3.2.102] 3.2.94
layout: 1.2.0 [1.2.1]
lime-samples: 2.3.0 [2.6.0]
lime: 2.0.0 2.0.0-alpha 2.0.1 2.4.1 2.4.3 2.4.4 2.4.6 2.4.7 2.6.0 2.6.1 2.6.2 2.6.4 [2.6.5] git
mobiledisplay: git [dev:C:\HaxeToolkit\haxe\lib/mobiledisplay/git]
nape: 2.0.16 [2.0.19]
OimoHx: git [dev:C:\HaxeToolkit\haxe\lib/OimoHx/git]
openfl-admob: 1.2.1 1.2.2 1.4.0 [1.4.1]
openfl-gpg: 1.0.0 1.2.2 [1.3.0]
openfl-gps-lib: 1.0.1 1.0.2 [1.0.4]
openfl-locale: 1.0.0 [1.0.1]
openfl-samples: 2.1.0 2.2.2 [3.3.0]
openfl-share: 1.2.0 [1.2.2]
openfl: 2.1.0 2.1.6 2.1.7 2.2.4 3.0.0-beta.2 3.0.6 3.0.8 3.1.0 3.1.1 3.3.2 3.3.3 3.3.5 [3.3.6] git
poly2trihx: [0.1.4]
polygonal-ds: [1.4.1]
polygonal-printf: [1.0.2-beta]
svg: [1.0.8]
swf: 1.6.0 1.6.9 1.7.0 1.8.7 1.8.8 1.8.9 2.0.1 2.0.2 2.0.3 [2.0.4]
systools: [1.1.0]
task: [1.0.6]
thx.color: 0.16.0 [0.17.0]
thx.core: 0.25.1 0.26.0 0.32.0 0.33.1 [0.34.0]
thx.culture: 0.3.0 [0.4.0]
thx.format: 0.2.1 0.4.0 0.5.0 [0.5.1]
thx.promise: [0.5.1]
thx.semver: [0.2.2]
thx.stream: [0.4.1]
thx.unit: 0.4.1 [0.5.0]

The bug seems to have been introduced into lime 2.6.3 because if I use openfl 2.6.2 and openfl 3.3.3, everything is fine. But if I use lime 2.6.3 and openfl 3.3.3, my application crash.

Things are still working here, have you tried any sample projects, to see if they run? Perhaps this is isolated to something specific that’s going on in your application. That might help us narrow it down :slight_smile:

OK. I tested piratepigs and it worked (both on windows and android). So the problem seems to be that I am using haxeflixel (tested 3 of my haxeflixel apps and they are all affected by the issue). I will try to do a minimal haxeflixel app and see if it crash to try to isolate the issue.

OK. I did a small test with an haxeflixel sample simply supposed to display a picture with this code:

class MenuState extends FlxState
{
	
    override public function create():Void
	{
		super.create();
		
		var Title:FlxSprite = new FlxSprite();
		Title.loadGraphic("assets/images/logo.png");
		add(Title);
	}
}

and the program crash without any error in the console! (tested it with different png pictures so it is not a matter of picture having alpha transparency or not)
So it looks like new versions of lime and openfl are not compatible with haxeflixel anymore…

Here is the logo.png picture I used:

What target were you compiling to when it crashed?

It look like you’re using version 3.x of flixel – you might consider posting an issue over at HaxeFlixel and someone will take a look at it when they have the chance:

Is that the latest haxelib version? Or something else?

3.x is the “released” version of flixel that’s available on haxelib. The version I tend to use is the unreleased github version, 4.x.

I don’t think it is related to haxeflixel as this work well with older versions of openfl and lime (lime 2.6.2 or older and openfl 3.3.3 or older).

@larsiusprime I was compiling for windows and android with -Dnext (no issue with openfl legacy). And I won’t pass my older projects to haxeflixel developpment version (4.x) as it is not back compatible with haxeflixel 3.x …