TextRendering sample: invalid field access h

I just installed Haxe 3.2.1, Lime 2.8.2, OpenFL 3.5.3, etc. I generated the TextRendering sample project. When I run the SWF, it seems to crash (I don’t think I have the Flash debugger). When I run the Neko version, it crashes with this stack:

Called from ? line 1
Called from ApplicationMain.hx line 93
Called from ApplicationMain.hx line 28
Called from lime/app/Preloader.hx line 58
Called from lime/app/Preloader.hx line 242
Called from lime/app/Event.hx line 145
Called from Main.hx line 54
Called from Main.hx line 209
Uncaught exception - Invalid field access : h

This sample didn’t work with Haxe 3.1.3 and OpenFL 2.0.2. I’m pretty sure my environment is set up correctly (because Lime/HaxeFlixel seem to work correctly otherwise).

This looks like some kind of environment derp. I ran the same setup on a similar VM and it works fine. Strange…

I am getting the same error with the sample. The call responsible seems to be images.exists (position.glyph) on line 209 - Some testing showed images.get yields a similar error. The issue appears to be accessing the Map object returned by textLayout.font.renderGlyphs.

Try upgrading to Haxe 3.2.0.

I have version 3.2.1 installed (from the official installer, on OSX 10.11).

Looking at the source code it’s no wonder - renderGlyphs has been completely commented out returning nothing but null since commit 23be78719850b17421b68960f690709599e25330 a few months ago.

(I wonder how it worked on your different setup, did you install an older version there?)

1 Like

I don’t know. It works now, though, after reinstalling. (I think in my case, I upgraded to 3.2.0)

Are there any updates on this? I’m currently experiencing the same problem that @adams experienced.

@ashes999 By any chance, do you remember the specific Haxe and Lime version you were using when it finally worked?

@Anheurystics I don’t remember, sorry. What I do remember, is that it was environmental (bad install of something). Upgrading/installing everything fresh, on a new machine (I use Linux VMs), fixed the problem.

I get a similar stack today:

Called from ? line 1
Called from ApplicationMain.hx line 93
Called from ApplicationMain.hx line 28
Called from lime/app/Preloader.hx line 58
Called from lime/app/Preloader.hx line 242
Called from lime/app/Event.hx line 145
Called from Main.hx line 54
Called from Main.hx line 209
Uncaught exception - Invalid field access : exists

This is with lime 2.9.1 (the one that installs when you use HaxeFlixel). I get the same version with lime 3.7.4 (the latest version I have installed).

TextRendering is not currently working, but the other samples should work fine. OpenFL uses different APIs (Cairo and canvas) for text rendering, but there are plans to update Lime text support with Harfbuzz bindings and porting text measurement logic from OpenFL into an updated TextLayout API, which should make it easier to add OpenGL text support in the future

1 Like