Fix exporters for assets without ABC or SymbolClass tags#40
Fix exporters for assets without ABC or SymbolClass tags#40Tutez64 wants to merge 2 commits intoopenfl:masterfrom
Conversation
|
Repo instructions from @Tutez64:
|
|
I can reproduce the Eof exception with the sample projects attached to PRs #44 and #45. I confirm that it is fixed after applying commit 385725a. However, it doesn't seem to make any difference with those projects whether I include or omit commit c40ec6c. Can you include a project where at least one null exception reproduces without the changes in commit c40ec6c? Thanks! |
|
#44 only needs the EOF fix, and #45 does need both, but it appears that for the second one to show its usefulness, you also need to also include #45 changes, which isn't ideal. |
|
Okay, thanks. I can reproduce where However, I noticed that when I try to load your SWFs in Flash Player, it is throwing a Additionally, I'm having trouble finding one of your sample projects that triggers any of the parts of this PR where you added this code: else if (#if (haxe_ver >= 4.2) Std.isOfType #else Std.is #end (tag, TagExportAssets))
{
for (symbol in cast(tag, TagExportAssets).symbols)
{
processSymbol(symbol);
symbolsByTagID.set(symbol.tagId, symbol);
}
} |
|
That's weird, I don't have any error when opening env_a.swf in Flash Player. I just noticed something about |
|
In Flash Player 32.0.465 (the standalone content debugger) on macOS, I see the following errors reported when I open env_a.swf by double-clicking on it:
I thought that I remembered seeing VerifyError instead of ReferenceError yesterday, but I guess I was mistaken. Or maybe the Linux Flash Player behaves a little differently. I'm testing on macOS this morning. Regardless, these are the same class names in env_a.xml added to the SymbolClassTag. None of the .xml files for the asset SWFs seem to define an ExportAssets tag. Although I am not familiar enough with ffdec's XML format, and it's possible that I'm misunderstanding exactly where that tag should come from. When I open your new assets.swf in Flash Player, I do not see any exceptions, so that's promising. I'll dive in a little more to see if I can use this one for testing. |
|
Merged as c1bd371 and 12b8b4d. Just some minor tweaks, and some comments why abcData might be null. I was able to work with your new stripped down assets.swf. As I mentioned, Flash Player does not throw the same ReferenceError as with the other SWFs that used TagSymbolClass instead of TagExportAssets. I confirm that the TagExportAssets path is triggered for the new assets.swf, and the check for null abcData makes sense to me in that context. The symbol has a name, but it is not a class name, so it seems like abcData should not be strictly required. |


Summary
This fixes SWF exporter/runtime issues for assets that do not include ABC data or SymbolClass tags.
It also includes a small EOF-related fix in
AnimateLibraryExporterthat was encountered while handling these assets.Changes
AnimateLibraryExporter