Herschel / Swivel

Adobe Flash SWF to video converter
https://newgrounds.com/swivel
GNU General Public License v3.0
166 stars 22 forks source link

Adobe Animate 2019 File generating TypeError: Error #1009 #13

Open TomFulp opened 5 years ago

TomFulp commented 5 years ago

LazyCube on Newgrounds reported this:

So, I was making a flash animation with Adobe Animate CC 2019(The animation's render setting is ActionScript 3.0 and FlashPlayer 30). When the animation is finished, I rendered the animation with swivel. But then the program's crashed and these error codes appear: TypeError: Error #1009: Cannot access a property or method of a null object reference. Method(haxe.io.BytesInput,readBytes) Method(haxe.io.Input,readAll) Method(format.swf.Reader,readHeader) Method(format.swf.Reader,read) Method(com.newgrounds.swivel.swf.SwfUtils,getSwf) Method(com.newgrounds.swivel.swf.SwfUtils,_getAs3Tag) Method(com.newgrounds.swivel.swf.SwivelMutator,mutate) Method(com.newgrounds.swivel.SwivelController,runTask) Method(com.newgrounds.swivel.SwivelController,runTaskDelay)

I tried so many things to solve this problem but all the things didn't solve this. I changed the FlashPlayer settings for many times, added some scripts that might help with it, redownloaded the program several times, etcs.

GiovanH commented 4 years ago

This seems to either be an issue with the AS2 tag parser in swfutils that uses the as1 parser or the haxe format package itself.

For reproducability, https://www.homestuck.com/flash/hs2/00980/00980.swf is a fairly simple file that consistently triggers this error case.

GiovanH commented 4 years ago

This can be fixed in most cases by simply wrapping CID references in PlaceObject tags and ignoring errors, as per https://github.com/GiovanH/Swivel/blob/endOnRepeat/src/com/newgrounds/swivel/swf/ScaleFilterMutator.hx#L83 .

There are still some cases where this crashes the program, though.