[SOLVED][BUG][Flash] SWF loading and null-pointer

Lime 2.6.2, OpenFl 3.3.3, SWF 2.0.2

project.xml

<library path="assets/lib.swf" id="mylib" preload="false" />

Main.hx

public function new() 
{
    super();
    Assets.loadLibrary("mylib", veclibLoaded);
}
    
function veclibLoaded(lib:AssetLibrary):Void
{
    
    trace("lib.swf is loaded");
    
    var mc = Assets.getMovieClip("mylib:sym_1");
    addChild(mc);
}

And result:

TypeError: Error #2007: Parameter url must be non-null.
    at flash.display::Loader/_load()
    at flash.display::Loader/load()
    at format.swf::SWFLibrary/load() (swf\2,0,2\format\swf\SWFLibrary.hx:166)
    at lime::Assets$/loadLibrary()
    at openfl::Assets$/loadLibrary()
    at Main()
    at DocumentClass()
    at Type$/createInstance()
    at ApplicationMain$/start()
    at ApplicationMain$/init()
    at lime.app::Event$1/dispatch()
    at lime.app::Preloader/start()
    at openfl.display::Preloader/display_onComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at NMEPreloader/onLoaded()
    at openfl.display::Preloader/start()
    at lime.app::Preloader/current_onEnter()

There is no problem with html5 but for Flash.
Also for Lime 2.4.2, OpenFl 3.0.8, and SWF 1.8.8 all works. What am I doing wrong? Is something changed with ways to work with swf libraries?

This was a minor regression that is going to be fixed in the next release. You can hang tight (it will go out soon) or you can patch it yourself with this change: https://github.com/openfl/openfl/commit/514b5bc2d55df352cf0973928fd6a080d587985c :slight_smile:

Oh, thanks. Patched!