[Solved] Could not load asset manifest (bytes was null)


After upgrading to OpenFL 3.0.1, I am testing my projects (HxScout and the DisplayABitmap sample) with -Dlegacy and without.

I’ve seen all my projects work in both v3 and Legacy, but occasionally a project seems to get in a stuck state using -Dlegacy where it instantly segfaults on startup with errors about the asset manifest file:

> lime test linux -debug -Dlegacy
DefaultAssetLibrary.hx:584: Warning: Could not load asset manifest (bytes was null)
Failure type not string @ ./Sys.cpp:404
Called from extern.cffi (/home/jward/dev/hxcpp/src/hx/Lib.cpp line 132)
Called from sys.FileSystem.stat (/usr/lib/haxe/std/cpp/_std/sys/FileSystem.hx line 43)
Called from DefaultAssetLibrary.new (DefaultAssetLibrary.hx line 97)
Called from openfl._legacy.Assets.initialize (openfl/_legacy/Assets.hx line 583)
Called from *._Function_1_1 (ApplicationMain.hx line 84)

But I can see that the asset manifest file is there:

>cat export/legacy/debug/linux64/cpp/bin/manifest

And the weird thing is, this just starts happening (but seems related to switching between legacy and v3).

I can erase my export directory, recompile and it doesn’t alleviate the issue. I’ve also setup my project.xml to use separate export areas for legacy/next/debug/release, and this didn’t fix it either.

<app main="Main" file="hxScoutMain" />
<app path="export/legacy/debug" if="legacy debug" />
<app path="export/legacy/release" if="legacy release" />
<app path="export/next/debug" if="debug" unless="legacy" />
<app path="export/next/release" if="release" unless="legacy" />

I’m using OpenFL 3.0.1, Lime 2.3.1, and Haxe 3.2.0.

Anybody else seen this or know how to fix a project stuck in this state?

Hmm, upgrading to 3.0.3 may have fixed the problem (unless it just masked the problem.) But it seems to be working now.