Getting errors on neko target

So I had to reinstall everything on my computer after a seriously bad crash on my HDD. Luckily all my work was backed up on external drives. But now after installing the latest libs I am getting these errors on my project when I try to build for neko or html5 targets:

Called from ApplicationMain.hx line 30
Called from ApplicationMain.hx line 147
Called from lime/app/Application.hx line 167
Called from lime/_internal/backend/native/NativeApplication.hx line 163
Called from a C function
Called from lime/_internal/backend/native/NativeApplication.hx line 198
Called from lime/_internal/macros/EventMacro.hx line 101
Called from lime/system/ThreadPool.hx line 236
Called from lime/_internal/macros/EventMacro.hx line 101
Called from lime/_internal/backend/native/NativeHTTPRequest.hx line 556
Called from lime/app/Promise.hx line 116
Called from lime/net/HTTPRequest.hx line 139
Called from lime/app/Promise.hx line 116
Called from lime/app/Future.hx line 324
Called from lime/app/Future.hx line 143
Called from lime/app/Promise.hx line 116
Called from lime/utils/Assets.hx line 545
Called from lime/app/Promise.hx line 139
Called from lime/app/Future.hx line 143
Called from lime/app/Promise.hx line 116
Called from lime/utils/Preloader.hx line 328
Called from lime/utils/Preloader.hx line 228
Called from lime/utils/Preloader.hx line 350
Called from lime/utils/Preloader.hx line 247
Called from lime/_internal/macros/EventMacro.hx line 101
Called from ApplicationMain.hx line 128
Called from openfl/display/Preloader.hx line 57
Called from openfl/display/DisplayObject.hx line 942
Called from openfl/display/DisplayObject.hx line 1335
Called from openfl/display/DisplayObject.hx line 1264
Called from a C function
Called from openfl/events/EventDispatcher.hx line 443
Called from openfl/display/Preloader.hx line 308
Called from openfl/display/Preloader.hx line 255
Called from openfl/display/DisplayObject.hx line 942
Called from openfl/display/DisplayObject.hx line 1335
Called from openfl/display/DisplayObject.hx line 1264
Called from a C function
Called from openfl/events/EventDispatcher.hx line 443
Called from openfl/display/Preloader.hx line 123
Called from lime/_internal/macros/EventMacro.hx line 101
Called from ApplicationMain.hx line 131
Called from ApplicationMain.hx line 179
Called from openfl/display/Stage.hx line 1894
Called from ApplicationMain.hx line 230
Called from ApplicationMain.hx line 303
Called from a C function
Called from ApplicationMain.hx line 326
Called from a C function
Called from Startup.hx line 36
Called from a C function
Called from starling/core/Starling.hx line 211
Called from a C function
Called from starling/core/Starling.hx line 379
Called from starling/rendering/Painter.hx line 228
Called from starling/utils/RenderUtil.hx line 240
Uncaught exception - Profile must be of type ‘String’ or ‘Array’

“Uncaught exception - Profile must be of type ‘String’ or ‘Array’”

I may be off target here, but what sort of textures are you using?

Here is a snippet:

var backgrounds0Texture:Texture = Texture.fromBitmapData(Assets.getBitmapData("assets/backgrounds-0.png"), false);
            var backgrounds0lasXml:Xml = Xml.parse(Assets.getText("assets/backgrounds-0.xml")).firstElement();

            Game.assets.addTexture("backgrounds0", backgrounds0Texture);
            Game.assets.addTextureAtlas("backgrounds0", new TextureAtlas(backgrounds0Texture, backgrounds0lasXml));

Ok. If I recall, I had a similar error when using ATF textures, is all. Looks like you’re using PNG’s though, which was how I resolved my issue.

Yes all the image assets are PNGs

The project was working fine before, trouble is I don’t remember what version of Haxe and OpenFL I was using before my HDD crash. Otherwise I would have gone back to that. Seems all this is related library compatibility issues. I did upgrade all my libs to the latest versions. I could be I am using deprecated code somewhere but not sure at this point where to look.

Perhaps have a look where you’ve initialized the Starling instance. Try setting your profile to Auto, if it’s not already.

var starling:Starling = new Starling(ViewRoot, this.stage, null, null, "auto", "auto");

Replace “ViewRoot” with your Starling entry class.

2 Likes

The error is being thrown from here, and relates to the Context3D Profile:

YES! That was it! Thanks!

1 Like

Great news Frank :smiley: