Embedding fonts makes Lime 3.6 building to Flash throw an uncaught exception

Since updating to Lime 3.6.0 and now 3.6.1 I am unable to build my project to Flash. Telling it to do so gives me the following error:

Called from ? line 1
Called from CommandLineTools.hx line 1683
Called from CommandLineTools.hx line 24
Called from CommandLineTools.hx line 131
Called from CommandLineTools.hx line 686
Called from lime/project/PlatformTarget.hx line 99
Called from lime/tools/platforms/FlashPlatform.hx line 240
Called from lime/tools/helpers/FlashHelper.hx line 887
Called from lime/tools/helpers/FlashHelper.hx line 706
Called from format/swf/Writer.hx line 59
Called from format/swf/Writer.hx line 1255
Called from format/swf/Writer.hx line 1163
Called from format/swf/Writer.hx line 1126
Called from C:\HaxeToolkit\haxe\std/haxe/io/Output.hx line 170
Uncaught exception - Overflow

It works fine in Lime 3.4.1 and 3.5.2 or with all other build targets I’ve tried. An empty project would build fine, but PiratePig would not, so I just started removing stuff until mine worked, and discovered that the following line from project.xml is the problem:

<assets path="assets/fonts" rename="fonts" include="*" />

Apparently this exception is caused by the font embedding. I’ve tried lime rebuild tools, but that didn’t do anything.

Oddly enough, this only happens with certain fonts. My offending font was FFF Forward. Pirate Pig’s was Freebooter. But if the fonts folder only contains other fonts like Arial, nothing happens. I can’t find a pattern in what works and what doesn’t though. Ancient, half-finished Vulcan scripts work fine, as do 4MB Korean fonts. Roboto-Regular works, but Roboto-BoldItalic doesn’t. Both NotoSerif-Regular and NotoSerif-BoldItalic work. I don’t see much of a pattern, but it’s a problem regardless.

I forgot, this was a regression in the “format” library. We were using the latest in our build server

I’ve just done another build that uses a patched version. Would you mind downloading this version of Lime, and running haxelib local to install it, and see if it fixes your issue?

Thank you!

I just downloaded “FFF Forward”, and realized I had version of “format” installed that did not have the problem. I updated to the latest (similar to our build server) and got the same overflow problem. I switched to my patched repo, and the problem went away again, so the fix should be confirmed :slight_smile:

Released :slight_smile:

Yes, that fixed it. Thank you! :slight_smile: