What could cause this?

Called from Std::parseFloat line 55 Uncaught exception - Invalid field access : __s

Code was previously working fine.

Do you have the full stack trace? Is this occurring only after updating OpenFL and Lime, or something else?

This can occur on the Neko target when running Std.parseFloat (null) I believe

If you are using dce=“full”, try it without or “std”.

Here you go:

VisiBeat.hx:1463: Corner radius:20
Called from sys.io.FileOutput::$statics line 1
Called from ApplicationMain::main line 79
Called from ApplicationMain::create line 111
Called from lime.app.Application::exec line 225
Called from lime._backend.native.NativeApplication::exec line 154
Called from a C function
Called from lime._backend.native.NativeApplication::handleApplicationEvent line 195
Called from lime.app._Event_Int_Void::dispatch line 101
Called from lime.system.ThreadPool::__update line 206
Called from lime.app._Event_Dynamic_Void::dispatch line 101
Called from lime._backend.native.NativeHTTPRequest::threadPool_onComplete line 390
Called from lime.app.Promise_haxe_io_Bytes::complete line 39
Called from lime._backend.native.NativeHTTPRequest::loadText line 158
Called from lime.app.Promise_String::complete line 39
Called from lime.net._HTTPRequest_String::load line 163
Called from lime.app.Promise::complete line 39
Called from openfl.net.URLLoader::load line 91
Called from openfl.events.EventDispatcher::dispatchEvent line 97
Called from openfl.events.EventDispatcher::__dispatchEvent line 218
Called from openfl._internal.swf.SWFLiteLibrary::load line 218
Called from openfl._internal.swf.SWFLiteLibrary::load line 186
Called from lime.app.Future::onComplete line 80
Called from openfl._internal.swf.SWFLiteLibrary::load line 189
Called from lime.app.Promise_lime_utils_AssetLibrary::complete line 39
Called from lime.app.Promise_lime_utils_AssetLibrary::complete line 39
Called from lime.app.Preloader::updateProgress line 331
Called from lime.app.Preloader::loadedAssetLibrary line 231
Called from lime.app.Preloader::updateProgress line 353
Called from openfl.display.Preloader::start line 56
Called from a C function
Called from openfl.events.EventDispatcher::dispatchEvent line 97
Called from openfl.display.DisplayObject::__dispatchEvent line 413
Called from a C function
Called from openfl.events.EventDispatcher::__dispatchEvent line 218
Called from openfl.display.DefaultPreloader::this_onComplete line 287
Called from openfl.display.DefaultPreloader::onLoaded line 234
Called from a C function
Called from openfl.events.EventDispatcher::dispatchEvent line 97
Called from openfl.display.DisplayObject::__dispatchEvent line 413
Called from a C function
Called from openfl.events.EventDispatcher::__dispatchEvent line 218
Called from openfl.display.Preloader::display_onUnload line 114
Called from a C function
Called from lime.app.Preloader::start line 250
Called from lime.app._Event_Void_Void::dispatch line 101
Called from ApplicationMain::create line 95
Called from ApplicationMain::start line 143
Called from openfl.display.Stage::__handleError line 1194
Called from ApplicationMain::start line 130
Called from ASMLEngine::main line 3731
Called from ASMLEngine::$init line 84
Called from a C function
Called from ASMLEngine::new line 264
Called from ASMLEngine::construct line 753
Called from ASMLEngine::processStory line 3328
Called from ASMLEngine::processStory line 3333
Called from ASMLEngine::processStory line 3356
Called from ASMLEngine::nextBeat line 1359
Called from a C function
Called from VisiBeat::$init line 48
Called from a C function
Called from VisiBeat::new line 129
Called from a C function
Called from VisiBeat::PlaceContent line 1465
Called from Std::parseFloat line 55
Uncaught exception - Invalid field access : __s

Error is the same on CPP.

the value is not null.

As you see from my trace, the value is currently “20”

Is it possible that the value is not a String? Is it an Int or Float value?

It is a String. It is an Int, but could be a Float sometimes, I can make it work by replacing all occurrences of parseFloat with parseInt, but should it not be allowed to parse the String “20” to a float? It seems now only “20.x” will be ok. I have not run this code in a while, but in earlier versions this used to just work…

It may depend upon the platform. If you ever cast to Dynamic, JavaScript handles dynamic types and auto-casts to the type you are wanting, but other platforms will not and can crash

You could also do Std.parseFloat (Std.string (var));

1 Like