Menu

#489 VerifyError even with -dontoptimize

v4.10
closed-fixed
None
5
2014-08-30
2013-12-07
No

Hi,
I'm getting a VerifyError when I run my app too but it looks to me that there's anyway something wrong in proguard.

1) I'm deploying my App as a jnlp application (no Jacoco or any other additional framework)
2) I'm compiling using oracle's javac, not eclipse (that has a bug about it)
2) if I don't obfuscate with proguard I don't get any VerifyError
3) no problem either if I compile my app with Javac 1.6. The problem appears only with java7 app.
4) important: -dontoptimize does not fix the problem!
5) of course I'm not using -dontpreverify
6) tested with the last stable + last beta of proguard

This is particularly critical as you can't provide -XX:UseSplitVerifier in a jnlp (not supported apparently in the jvm argument option).
So basically I have currently absolutely NO workaround except removing the last feature we implemented that needs java7 and compile in java6
I have now to delay my release supposed to happen Friday :(
Very critical :(
Would you have any idea or workaround?
Eg\*

Discussion

  • Eric Gavaldo

    Eric Gavaldo - 2013-12-07

    here is my proguard conf (in ANT):

    <proguard>
           -libraryjars "${dir.jse.root}\jre\lib\rt.jar"
           -libraryjars "${dir.localization}"
           -libraryjars "${dir.lib}/${lib.jcommon}"
           -libraryjars "${dir.lib}/${lib.jfreechart}"
           -libraryjars "${dir.lib}/${lib.mysql}"
           -libraryjars "${dir.lib}/${lib.mssql}"
           -libraryjars "${dir.lib}/${lib.oracle}"
           -libraryjars "${dir.lib}/${lib.jgrapht}"
           -libraryjars "${dir.lib}/${lib.jgraph}"
           -libraryjars "${dir.lib}/${lib.jcalendar}"
           -libraryjars "${dir.lib}/${lib.jortho}"
           -libraryjars "${dir.lib}/${lib.javamail}"
           -libraryjars "${dir.lib}/${lib.jnlp}"
           -libraryjars "${dir.lib}/${lib.junit}"
           -libraryjars "${dir.lib}/${lib.snmp4j}"
           -libraryjars "${dir.lib}/${lib.jexcelapi}"
           -libraryjars "${dir.lib}/${lib.xmlrpc_client}"
           -libraryjars "${dir.lib}/${lib.xmlrpc_common}"
           -libraryjars "${dir.lib}/${lib.ws_commons_utils}"
           -libraryjars "${dir.lib}/${lib.commons_logging}"
           -libraryjars "${dir.lib}/${lib.xmlrpc_server}"
           -libraryjars "${dir.lib}/${lib.servlet}"
           -libraryjars "${dir.lib}/${lib.docx4j}"
           -libraryjars "${dir.lib}/${lib.docx4j_importxhtml}"
           -libraryjars "${dir.lib}/${lib.jaxb}"
           -libraryjars "${dir.lib}/${lib.xhtmlrenderer}"
           -libraryjars "${dir.lib}/${lib.serializer}"
           -libraryjars "${dir.lib}/${lib.xmlgraphics-commons}"
           -libraryjars "${dir.lib}/${lib.commons-io}"
           -libraryjars "${dir.lib}/${lib.itext}"
           -libraryjars "${dir.lib}/${lib.fop}"
           -libraryjars "${dir.lib}/${lib.batik}"
           -libraryjars "${dir.lib}/${lib.slf4j}"
           -libraryjars "${dir.lib}/${lib.jtidy}"
           -injars ${dir.dist.tmp}/bin/${param.jar.name}_notobfuscated.jar
           -outjar ${dir.dist.tmp}/bin/${param.jar.name}.jar
           -defaultpackage 'acme'
           -dontoptimize
           -dontusemixedcaseclassnames
           -ignorewarnings
           -printseeds   ${dir.dist.log}/${param.jar.name}_${proguard.seeds}
           -printusage   ${dir.dist.log}/${param.jar.name}_${proguard.usage}
           -printmapping ${dir.dist.log}/${param.jar.name}_${proguard.mapping}
    
           -keep public class ${param.jar.mainclass} {
                public static void main(java.lang.String[]);
    
                public static void start(java.lang.String[]);
                public static void stop(java.lang.String[]);        
            }
    
           -keep class com.xqual.xagent.** {public protected *;}
           -keep class com.xqual.xcommon.** {public protected *;}
    
           -keep class com.xqual.xlauncher.manual.** {public protected *;}
           -keep class com.xqual.xlauncher.simple_manual.** {public protected *;}
           -keep class com.xqual.xlauncher.tabular_manual.** {public protected *;}
    
           -keep class com.xqual.xstudio_agent.gui.standard.CAgentStandardMain {public protected *;}
           -keep class com.xqual.xstudio_agent.gui.xml_rpc.CAgentXmlRpcMain {public protected *;}
           -keep class com.xqual.xstudio_agent.gui.xml_rpc.CRemoteSubAgent {public protected *;}
           -keep class com.xqual.xlauncher.proxy.IRemoteSubAgent {public protected *;}
    
           -keep class com.xqual.xstudio_agent.IAgentConstantsBugTracking {public protected *;} 
    
           -keep class com.xqual.xapiserver.CApiServer {public protected *;}    
    
           -keep public class com.xqual.xstudio.sql.external_bugtracking.trac_0_11_x.dynamic_proxy.** {public *;}
           -keep public class com.xqual.xstudio.sql.external_bugtracking.jira_4_1_x.dynamic_proxy.** {public *;}    
           -keep public class com.xqual.xstudio.sql.external_requirement.jira_4_1_x.dynamic_proxy.** {public *;}
    
           -keep public class com.xqual.xstudio.patch.CPatch_* {public *;}
    </proguard>
    
     
  • Eric Lafortune

    Eric Lafortune - 2013-12-07

    If you provide the failing processed class file, I can look into it.

     
  • Eric Gavaldo

    Eric Gavaldo - 2013-12-07

    Let me recompile, reproduce and attach the traces and the faulty class... Thx!

     

    Last edit: Eric Gavaldo 2013-12-07
  • Eric Gavaldo

    Eric Gavaldo - 2013-12-07

    Here is already the full trace:

    java.lang.VerifyError: Bad type on operand stack
    Exception Details:
    Location:
    acme/fm.u()Lacme/ro; @360: invokespecial
    Reason:
    Type 'acme/ab' (current frame, stack[7]) is not assignable to 'acme/oz'
    Current Frame:
    bci: @360
    flags: { }
    locals: { 'acme/fm', 'acme/rt', top, 'acme/rs', 'acme/ab' }
    stack: { 'acme/fm', uninitialized 350, uninitialized 350, 'acme/fm', null, 'acme/rt', 'acme/rs', 'acme/ab' }
    Bytecode:
    0000000: 014c bb00 3659 b700 8e4d 2cbb 0034 59b7
    0000010: 0089 1201 b600 8b2a b400 42b6 0051 b600
    0000020: 8ab6 008c b600 8f57 1101 95b8 0079 9900
    0000030: 50b8 0052 2cb6 0059 4e2d b800 873a 0419
    0000040: 04b9 009d 0100 3a05 05b8 007c b800 833a
    0000050: 06bb 0035 59b7 008d 3a07 bb00 3559 b700
    0000060: 8d3a 0819 0619 0719 08b8 0082 bb00 2859
    0000070: 2a01 1906 1905 1907 1908 b700 774c 014e
    0000080: b200 4db6 0084 9900 5b11 0196 b800 7999
    0000090: 0052 b800 522c b600 5a3a 0419 04b8 0087
    00000a0: 3a05 1905 b900 9d01 003a 0608 b800 7bb8
    00000b0: 0083 3a07 bb00 3559 b700 8d3a 08bb 0035
    00000c0: 59b7 008d 3a09 1907 1908 1909 b800 82bb
    00000d0: 0027 592a 0119 0719 0619 0819 09b7 0076
    00000e0: 4e01 3a04 1101 97b8 0079 9900 73b8 0052
    00000f0: 2cb6 005b 3a05 1905 b800 873a 0619 06b9
    0000100: 009d 0100 3a07 1007 b800 7db8 0083 3a08
    0000110: bb00 3559 b700 8d3a 09bb 0035 59b7 008d
    0000120: 3a0a 1908 1909 190a b800 82b2 004d b600
    0000130: 8499 0019 bb00 2c59 2a01 1908 1909 190a
    0000140: 1907 b700 803a 04a7 0016 bb00 2959 2a01
    0000150: 1908 1909 190a 1907 b700 783a 042a bb00
    0000160: 2559 2a01 2b2d 1904 b700 72b5 0047 2ab4
    0000170: 0047 b0
    Stackmap Table:
    append_frame(@126,Object[#40],Object[#54])
    append_frame(@225,Object[#39])
    full_frame(@330,{Object[#28],Object[#40],Top,Object[#39],Top,Top,Top,Object[#61],Object[#45],Object[#53],Object[#53]},{})
    full_frame(@349,{Object[#28],Object[#40],Top,Object[#39],Object[#21]},{})

    at acme.adr.a(Unknown Source)
    at acme.adr.valueChanged(Unknown Source)
    at javax.swing.JTree.fireValueChanged(Unknown Source)
    at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)
    at javax.swing.JTree.setSelectionPath(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at acme.xj.isCellEditable(Unknown Source)
    at javax.swing.JTable.editCellAt(Unknown Source)
    at acme.xg.editCellAt(Unknown Source)
    at javax.swing.plaf.basic.BasicTableUI$Handler.adjustSelection(Unknown Source)
    at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(Unknown Source)
    at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    

    *** {17:07:18.990} [configuration ] term not found: java.lang.VerifyError: Bad type on operand stack
    Exception Details:
    Location:
    acme/fm.u()Lacme/ro; @360: invokespecial
    Reason:
    Type 'acme/ab' (current frame, stack[7]) is not assignable to 'acme/oz'
    Current Frame:
    bci: @360
    flags: { }
    locals: { 'acme/fm', 'acme/rt', top, 'acme/rs', 'acme/ab' }
    stack: { 'acme/fm', uninitialized 350, uninitialized 350, 'acme/fm', null, 'acme/rt', 'acme/rs', 'acme/ab' }
    Bytecode:
    0000000: 014c bb00 3659 b700 8e4d 2cbb 0034 59b7
    0000010: 0089 1201 b600 8b2a b400 42b6 0051 b600
    0000020: 8ab6 008c b600 8f57 1101 95b8 0079 9900
    0000030: 50b8 0052 2cb6 0059 4e2d b800 873a 0419
    0000040: 04b9 009d 0100 3a05 05b8 007c b800 833a
    0000050: 06bb 0035 59b7 008d 3a07 bb00 3559 b700
    0000060: 8d3a 0819 0619 0719 08b8 0082 bb00 2859
    0000070: 2a01 1906 1905 1907 1908 b700 774c 014e
    0000080: b200 4db6 0084 9900 5b11 0196 b800 7999
    0000090: 0052 b800 522c b600 5a3a 0419 04b8 0087
    00000a0: 3a05 1905 b900 9d01 003a 0608 b800 7bb8
    00000b0: 0083 3a07 bb00 3559 b700 8d3a 08bb 0035
    00000c0: 59b7 008d 3a09 1907 1908 1909 b800 82bb
    00000d0: 0027 592a 0119 0719 0619 0819 09b7 0076
    00000e0: 4e01 3a04 1101 97b8 0079 9900 73b8 0052
    00000f0: 2cb6 005b 3a05 1905 b800 873a 0619 06b9
    0000100: 009d 0100 3a07 1007 b800 7db8 0083 3a08
    0000110: bb00 3559 b700 8d3a 09bb 0035 59b7 008d
    0000120: 3a0a 1908 1909 190a b800 82b2 004d b600
    0000130: 8499 0019 bb00 2c59 2a01 1908 1909 190a
    0000140: 1907 b700 803a 04a7 0016 bb00 2959 2a01
    0000150: 1908 1909 190a 1907 b700 783a 042a bb00
    0000160: 2559 2a01 2b2d 1904 b700 72b5 0047 2ab4
    0000170: 0047 b0
    Stackmap Table:
    append_frame(@126,Object[#40],Object[#54])
    append_frame(@225,Object[#39])
    full_frame(@330,{Object[#28],Object[#40],Top,Object[#39],Top,Top,Top,Object[#61],Object[#45],Object[#53],Object[#53]},{})
    full_frame(@349,{Object[#28],Object[#40],Top,Object[#39],Object[#21]},{})

     

    Related

    Bugs: #21
    Bugs: #28
    Bugs: #39
    Bugs: #40
    Bugs: #45
    Bugs: #53
    Bugs: #54
    Bugs: #61

  • Eric Gavaldo

    Eric Gavaldo - 2013-12-07

    Not sure which of the classes are useful so I'm attaching all those that are mentioned in the error...

     

    Last edit: Eric Gavaldo 2013-12-07
  • Eric Gavaldo

    Eric Gavaldo - 2013-12-07

    interested in the source files too?

     
  • Eric Gavaldo

    Eric Gavaldo - 2013-12-09

    Hi,
    do you need something else to investigate or did I provide all what is needed?
    Anyway, thank you very much to take the time to look at this. This is currently our last blocking issue that's preventing us to release...
    Thanks Eric!

    PS: btw, would you consider providing commercial support on Proguard at one point?

     
  • Eric Lafortune

    Eric Lafortune - 2013-12-09

    The information may be sufficient, but I have been extremely busy, so I haven't had the chance to look into it yet. I'll see what I can do this week.

    We provide commercial support at http://www.saikoa.com/proguard/support

     
  • Eric Gavaldo

    Eric Gavaldo - 2013-12-09

    Good to know... Thank you very much!
    Eg\*

     
  • Eric Lafortune

    Eric Lafortune - 2013-12-11

    CDispPanel_TestsReadOnly and CDispPanel_RequirementTests both extend the abstract class CDispPanel. They also both implement an interface that contains a couple of String constants and array constants, probably for convenience. When the instances of the classes are assigned to a variable, ProGuard's preverification algorithm incorrectly chooses the interface as the variable type, when it should have been CDispPanel. This is a tricky problem.

    For now, you can probably work around the issue by not letting the classes implement the interface with the constants, but just import the constants instead. This is better practice anyway.

     
  • Eric Lafortune

    Eric Lafortune - 2014-05-06

    This problem should be fixed in ProGuard 5.0 beta1.

     
  • Eric Lafortune

    Eric Lafortune - 2014-05-06
    • status: open --> open-fixed
     
  • Eric Lafortune

    Eric Lafortune - 2014-08-19
    • Status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB