JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#1295 IDENTIFIER or THIS or SUPER or STRING_OP expected but BRACKET_OPEN found
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: postponed Help

> What steps will reproduce the problem? loading an existing SWF file that contains "new [STRING]();" where STRING is a string. Then editing the ActionScript source and modifying another part of the file. > What is the expected output? What do you see instead? SWF file should save correctly when editing but it is not. > What version of the product are you using? Is it "nightly build"? Which operating system do you have? Using version 9.0.0 > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. I have a SWF that contains the following is in the original SWF file in the MainTimeline: public function loadAnimation() : void { var _loc1_:int = this.dayJob; var _loc2_:int = this.dayResult; this.stageAnim = new ["job" + _loc1_ + "_" + _loc2_](); // This is the line that causes the error. this.stageAnim.name = "stageShow"; addChild(this.stageAnim); setChildIndex(this.workFade,numChildren - 1); setChildIndex(this.workDisp,numChildren - 1); setChildIndex(this.workBtn,numChildren - 1); } If I try to make any changes to SWF file, even if I add only something like: var unusedTempVariable:int = 2; at the start of the function so it looks like: public function loadAnimation() : void { var unusedTempVariable:int = 2; var _loc1_:int = this.dayJob; var _loc2_:int = this.dayResult; this.stageAnim = new ["job" + _loc1_ + "_" + _loc2_](); // This is the line that causes the error. this.stageAnim.name = "stageShow"; addChild(this.stageAnim); setChildIndex(this.workFade,numChildren - 1); setChildIndex(this.workDisp,numChildren - 1); setChildIndex(this.workBtn,numChildren - 1); } and I try to save it, an error message shows IDENTIFIER or THIS or SUPER or STRING_OP expected but BRACKET_OPEN found even though it was in the original file and I didn't change anything too significant.
Downloadoriginal.png (147 KiB)Downloadafter edit.png (123 KiB)
user
I forgot to say that I'm using the latest 9.0.0 build from the download page (as of October 10, 2016) on Windows 8.1
admin
FFDec uses it's own compiler to save AS3 code, which is not very reliable. It looks like it can't compile new [...]() syntax, I must implement it first. It the nightly build (Download->Nightly build), there's new option to compile scripts - using Flex SDK compiler. It might be less buggy, but cannot handle obfuscated names like FFDec does. You can enable Flex SDK compiler in Advanced settings and you have to download the SDK.
user
I followed your instructions, and whenever I try to compile with Flex in the nightly build of FFDec, it can't save, but I don't know what the error is.
user
some_error.png shows what happens when I try to compile using Flex SDK. using_flex.png shows that I have selected the option to use Flex SDK to compile. using_flex2.png shows what I have for the Flex path. flex_path_and_files.png shows the location of Flex on my machine and that it matches what is in using_flex2.png. Is there anyway to show anything for the error, to help fix this issue?
admin
We should definitely make error messages better. I think last time I got this empty message, there was problem with java. Please navigate to Flex SDK directory - subdirectory bin, and run commandline there, execute "mxmlc.exe". If it gives you an error message other than "no arguments", for example "Java not found", you should properly set up java. If you do not know how to do it, then please send us the error message. Anyway - we must handle this state properly in FFDec and display something user friendly to user.
user
I have the latest java installed based on the screenshot. I'm not sure why mxmlc.exe can't find it. Is is looking for a specific system environment variable?
Downloadno jre.PNG (14 KiB)
admin
It looks like Flex SDK cannot work with 64bit Java. I think it would be solved if you install 32bit Java. But FFDec is better with 64bit Java - so the best solution is to have both Javas installed. Mxmlx.exe is run in separate process, so it can use different java than FFDec. See this related article: http://stackoverflow.com/questions/2955280/mxmlc-and-64bit-jre (There's also info about editing some config file - but I did not modify any file and it works for me) We should definitely make better GUI error message for this, for user to be informed what's happening. Let us know whether it helped or not.
user
This worked. mxmlx.exe runs properly. Having FFdec compile using flex compiles the script now. Thank you for helping me.
admin
State: new→postponed