OpenFL Starling Demo runtime error

I create Starling Demo project and run: openfl test neko.
Windows 7 x64, Visual Studio Code v1.70.3, latest Lime and OpenFL versions

Called from ? line 1
Called from ApplicationMain.hx line 26
Called from ApplicationMain.hx line 135
Called from lime/app/Application.hx line 150
Called from lime/_internal/backend/native/NativeApplication.hx line 146
Called from a C function
Called from lime/_internal/backend/native/NativeApplication.hx line 173
Called from lime/_internal/backend/native/NativeApplication.hx line 586
Called from haxe/Timer.hx line 244
Called from openfl/display/Stage3D.hx line 394
Called from openfl/display/Stage3D.hx line 486
Called from openfl/events/EventDispatcher.hx line 246
Called from openfl/events/EventDispatcher.hx line 402
Called from starling/core/Starling.hx line 683
Called from starling/core/Starling.hx line 439
Called from starling/core/Starling.hx line 451
Called from starling/events/EventDispatcher.hx line 243
Called from starling/events/EventDispatcher.hx line 144
Called from starling/events/EventDispatcher.hx line 183
Called from starling/core/Starling.hx line 1039
Called from starling/core/Starling.hx line 1060
Called from starling/display/DisplayObjectContainer.hx line 118
Called from starling/display/DisplayObjectContainer.hx line 145
Called from starling/display/DisplayObjectContainer.hx line 459
Called from starling/display/DisplayObjectContainer.hx line 449
Called from starling/display/DisplayObject.hx line 778
Called from a C function
Called from starling/events/EventDispatcher.hx line 144
Called from starling/events/EventDispatcher.hx line 184
Called from starling/core/StatsDisplay.hx line 103
Called from starling/core/StatsDisplay.hx line 131
Uncaught exception - Invalid operation (*)

starling/core/StatsDisplay.hx line 131 is:
__gpuMemory = supportsGpuMem ? Reflect.field(Starling.current.context, "totalGPUMemory") * B_TO_MB : -1;

If I change that * operator (for tests) - new similar error appear in other place.
So I’m confused)

Any ideas?

Hi, I can run it on my system using Neko target and latest haxelib openfl and lime

We recently updated Starling, are you using the latest from Github ? GitHub - openfl/starling: The "Cross-Platform Game Engine", a popular Stage3D framework

I don’t think it should make a difference, but just in case this is the version I’m using (equivalent to the current as3 starling github - will be pushed to openfl’s github after a release of the current 2.7 version on haxelib) GitHub - MatseFR/starling at current-as3-starling

I use recent versions from haxelib.
I wait Staring 2.7 but seems the error does not depend on the Starling version.
Even if some files are corrupt, it is very strange runtime error (not compile time error)…

And one more question. Can I modify Starling DisplayObject class? I need one additional field for my project. Can it be a problem?

Sorry I’ve been very busy

You know you can easily use a lib that is not coming from haxelib ?
If you clone the starling github somewhere on your computer, go to that location within a powershell or command prompt (I’m on windows) and type
haxelib dev <library name> <folder to use as root for that lib>
for example
haxelib dev starling starling

About modifying DisplayObject you are not gonna break anything doing that, but I would advise to avoid it if possible : any change you make directly in the lib, you will have to do it again when you update the lib

Thx!

I reinstall all libraries and try to fix my problem.
I can do that but do not understand reasons)

Here is my code without unnecessary parts.

class StartMenuInspector extends Sprite
{
	private var _interfaceContainer:Sprite = new Sprite();		
	
	public static var instance:StartMenuInspector = new StartMenuInspector();
	
	private function new():Void  
	{		
        super();	
		
		addChild(_interfaceContainer); // error is here!

		addEventListener(Event.ADDED_TO_STAGE, onAddedToStageListener);
		addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStageListener);
	}
	
	private function onAddedToStageListener(e: Event): Void
	{
		//addChild(_interfaceContainer); // no errors! 
	}
}
class MainClass extends Sprite
{	
	// Starling inits and fraphcs loading
	...
	
	public function afterGraphicsInitialize():Void
	{
		this.addChild(StartMenuInspector.instance);
	}
}

Error inside Starling:

Uncaught TypeError: Cannot read properties of undefined (reading 'get_length')
    at Function.starling_events_Event.fromPool
    at starling_display_Sprite.dispatchEventWith 
    at StartMenuInspector.addChildAt
    at StartMenuInspector.addChild
    at new StartMenuInspector

If I comment
addChild(_interfaceContainer);
in constructor and uncomment it inside ‘onAddedToStageListener’ - error is gone.
Tell me why?)

P.S. This code works on as3 version.