Return-Path: X-Original-To: apmail-flex-issues-archive@minotaur.apache.org Delivered-To: apmail-flex-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 50E79117E1 for ; Sun, 15 Jun 2014 08:45:05 +0000 (UTC) Received: (qmail 32753 invoked by uid 500); 15 Jun 2014 08:45:02 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 32716 invoked by uid 500); 15 Jun 2014 08:45:02 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 32568 invoked by uid 99); 15 Jun 2014 08:45:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Jun 2014 08:45:02 +0000 Date: Sun, 15 Jun 2014 08:45:02 +0000 (UTC) From: "Guest (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-34371) how TagEncoder handles duplicate define* tags MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLEX-34371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guest updated FLEX-34371: ------------------------- Description: Suppose there are two DefineEditText tags that are the same by .equals, and a TagEncoder handles them. This writes them both to the SWF, but assigns them the same character ID. Adobe's Flash player can load the SWF fine, but it causes swfdump to crash with an exception like the following: {code} Exception in thread "main" java.lang.IllegalArgumentException: symbol 154 redefined by identical tag at flash.swf.Dictionary.add(Dictionary.java:142) at flash.swf.TagDecoder.decodeDefineEditText(TagDecoder.java:1160) at flash.swf.TagDecoder.decodeTag(TagDecoder.java:319) at flash.swf.TagDecoder.decodeTags(TagDecoder.java:194) at flash.swf.TagDecoder.parse(TagDecoder.java:142) at flash.swf.tools.SwfxPrinter.dumpSwf(SwfxPrinter.java:2318) at flash.swf.tools.SwfxPrinter.main(SwfxPrinter.java:2225) {code} Actual result: defineEditText(tag) in TagEncoder calls {code:java} int id = dict.add(tag); {code} When serializing the second DefineEditText, the Dictionary finds the first one and returns its ID. Then, the defineEditText(tag) method writes the second copy with the first one's ID. Expected result: either - it writes the duplicate with a new ID or - it does not write anything and uses the first copy's ID for references to the second. was: Suppose there are two DefineEditText tags that are the same by .equals, and a TagEncoder handles them. This writes them both to the SWF, but assigns them the same character ID. Adobe's Flash player can load the SWF fine, but it causes swfdump to crash. defineEditText(tag) in TagEncoder calls {code:java} int id = dict.add(tag); {code} When serializing the second DefineEditText, the Dictionary finds the first one and returns its ID. Then, the defineEditText(tag) method writes the second copy with the first one's ID. Expected result: either - it writes the duplicate with a new ID or - it does not write anything and uses the first copy's ID for references to the second. > how TagEncoder handles duplicate define* tags > --------------------------------------------- > > Key: FLEX-34371 > URL: https://issues.apache.org/jira/browse/FLEX-34371 > Project: Apache Flex > Issue Type: Bug > Affects Versions: Apache Flex 4.12.0 > Reporter: Guest > > Suppose there are two DefineEditText tags that are the same by .equals, and a TagEncoder handles them. This writes them both to the SWF, but assigns them the same character ID. Adobe's Flash player can load the SWF fine, but it causes swfdump to crash with an exception like the following: > {code} > Exception in thread "main" java.lang.IllegalArgumentException: symbol 154 redefined by identical tag > at flash.swf.Dictionary.add(Dictionary.java:142) > at flash.swf.TagDecoder.decodeDefineEditText(TagDecoder.java:1160) > at flash.swf.TagDecoder.decodeTag(TagDecoder.java:319) > at flash.swf.TagDecoder.decodeTags(TagDecoder.java:194) > at flash.swf.TagDecoder.parse(TagDecoder.java:142) > at flash.swf.tools.SwfxPrinter.dumpSwf(SwfxPrinter.java:2318) > at flash.swf.tools.SwfxPrinter.main(SwfxPrinter.java:2225) > {code} > Actual result: > defineEditText(tag) in TagEncoder calls > {code:java} > int id = dict.add(tag); > {code} > When serializing the second DefineEditText, the Dictionary finds the first one and returns its ID. Then, the defineEditText(tag) method writes the second copy with the first one's ID. > Expected result: > either > - it writes the duplicate with a new ID or > - it does not write anything and uses the first copy's ID for references to the second. -- This message was sent by Atlassian JIRA (v6.2#6252)