diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java index 7649ff95b..fb7fc28f6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -768,14 +768,11 @@ public class SWFInputStream implements AutoCloseable { * @return * @throws IOException */ - public Amf3Value readAmf3Object(String name) throws IOException { + public Amf3Value readAmf3Object(String name) throws IOException, NoSerializerExistsException { Amf3InputStream ai = new Amf3InputStream(is); ai.dumpInfo = this.dumpInfo; - try { - return new Amf3Value(ai.readValue("amfData")); - } catch (NoSerializerExistsException nse) { - return new Amf3Value(nse.getIncompleteData()); - } + + return new Amf3Value(ai.readValue("amfData")); } /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java index 311ac8011..22c51c9c3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java @@ -359,7 +359,12 @@ public class PlaceObject4Tag extends PlaceObjectTypeTag implements ASMSourceCont clipActions = sis.readCLIPACTIONS(swf, this, "clipActions"); } if (sis.available() > 0) { - amfData = sis.readAmf3Object("amfValue"); + try { + amfData = sis.readAmf3Object("amfValue"); + } catch (NoSerializerExistsException nse) { + amfData = new Amf3Value(nse.getIncompleteData()); + Logger.getLogger(PlaceObject4Tag.class.getName()).log(Level.WARNING, "AMFData in PlaceObject4 contains IExternalizable object which cannot be read. Data object is truncated.", nse); + } } }