Bug 36211 - REGRESSION: VerifyError
Summary: REGRESSION: VerifyError
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-08 09:53 EDT by Olivier Thomann CLA
Modified: 2003-06-02 06:13 EDT (History)
2 users (show)

See Also:


Attachments
rebuilt source from reporter testcase (4.09 KB, text/plain)
2003-04-28 12:03 EDT, Philipe Mulet CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2003-04-08 09:53:15 EDT
From Eclipse corner, 

using 2.1, I get a VerifyError compiling existing code that compiled fine with
Eclipse 2.0.x:

java.lang.VerifyError: (class: snsoft/sndata/CreateDatabase, method:
modifyDatabase signature: ()V) Unable to pop operand off an empty stack
 at snsoft.sndata.SndataConfig.parseDatabaseDriver(SndataConfig.java:122)
 at snsoft.sndata.SndataConfig.getJdbcConection(SndataConfig.java:225)
 at snsoft.htext.Htextset.getRootConnection(Htextset.java:301)
 at snsoft.htext.Htextset.getRootDBInfo(Htextset.java:256)
 at snsoft.htext.Htextset.getRootConnection(Htextset.java:298)
 at snsoft.sndata.LoginDialog.changeUser(LoginDialog.java:148)
 at snsoft.sndata.LoginDialog.onOkExit(LoginDialog.java:174)
 at snsoft.awt.DialogPanel.onExit(DialogPanel.java:821)
 at snsoft.awt.DialogPanel.actionPerformed(DialogPanel.java:1569)
 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
 at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButto
n.java:1820)
 at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4
19)
 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
 at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener
.java:258)
 at java.awt.Component.processMouseEvent(Component.java:5022)
 at java.awt.Component.processEvent(Component.java:4819)
 at java.awt.Container.processEvent(Container.java:1525)
 at java.awt.Component.dispatchEventImpl(Component.java:3527)
 at java.awt.Container.dispatchEventImpl(Container.java:1582)
 at java.awt.Component.dispatchEvent(Component.java:3368)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3359)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3074)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004)
 at java.awt.Container.dispatchEventImpl(Container.java:1568)
 at java.awt.Window.dispatchEventImpl(Window.java:1586)
 at java.awt.Component.dispatchEvent(Component.java:3368)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
 at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:191)
 at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:144)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Comment 1 Philipe Mulet CLA 2003-04-08 12:38:51 EDT
Can you please provide a testcase reproducing it ? 
Comment 2 Olivier Thomann CLA 2003-04-08 12:44:57 EDT
No test case was provided on Eclipse corner. I contacted the original reporter 
to get a test case.
Comment 3 Philipe Mulet CLA 2003-04-11 04:48:21 EDT
No action unless test case is provided
Comment 4 tianxuefeng CLA 2003-04-14 21:14:31 EDT
i build all in eclipse 2.0,and i can run ok in 2.1,but when i rebuild all in 
2.1,now program has error like that,and i can't run it in 2.0 too. and it is ok 
if use 2.0 rebuild all. so i think there have some problerm in 2.1 build. and 
my company's program is big ,8M,so i can't upload it in here,and i new a 
program like that ,but no program exits. i am sorry can't to provide example.
Comment 5 Philipe Mulet CLA 2003-04-15 04:07:24 EDT
Without a testcase, we don't have enough information to investigate. 
The problem is inside CreateDatabase, and it should be all we need to reproduce 
(providing the external references are cut). 
Comment 6 Olivier Thomann CLA 2003-04-15 07:49:25 EDT
I could add that we simply need the source code of the method 
snsoft.sndata.CreateDatabase.modifyDatabase().
Comment 7 tianxuefeng CLA 2003-04-20 21:32:07 EDT
static public void modifyDatabase()
  {
		if( !SndataConfig.sureCurrentConfigOk() )
			return ;

		final JLabel noteLabel = new JLabel("tablename£º");
		final JList tabList = new JList( new DefaultListModel());

 		DialogPanel dialog = new DialogPanel()
		{
			protected boolean onOkExit()
			{
        int selIndexs[] = tabList.getSelectedIndices();
        if( selIndexs != null )
          return true;
    		return false;
			}
	  };

    dialog.nPosOption = DialogPanel.NOGROUPBOX;
    dialog.setLayout(new GridBagLayout());
    dialog.initGBC();
    dialog.gbc.anchor = GridBagConstraints.WEST;
    dialog.gbc.fill = GridBagConstraints.HORIZONTAL;
    dialog.gbc.weightx = 1;
    dialog.add(noteLabel,dialog.gbc);

    dialog.gbc.anchor = GridBagConstraints.WEST;
    dialog.gbc.fill = GridBagConstraints.BOTH;
    dialog.gbc.insets =  new Insets(4,0,0,0);
    dialog.gbc.gridy=1;
    dialog.gbc.weighty = 1;
    JScrollPane scrollPane = new JScrollPane(tabList);
    scrollPane.setPreferredSize( new Dimension(360,240));
    dialog.add(scrollPane,dialog.gbc);

   try
   {
     Object obs[][] = JDBC.sqlSelect3("select tblid,tblexpl from tbldef order 
by tblid");
     DefaultListModel listModel = (DefaultListModel)tabList.getModel();
     DialogPanel.addListBoxItems2(listModel,obs);
     int nCount = listModel.size();
     if( nCount > 0 )
     {
       int nIndexes[] = new int[nCount];
       for( int i=0; i<nCount; i++)
         nIndexes[i] = i;
       tabList.setSelectedIndices(nIndexes);
     }
   }
   catch(Exception e) {}

   if( dialog.showDialog("Êý¾Ý¿â½á¹¹¸üÐÂ") == 0 )
   {
      int selIndexs[] = tabList.getSelectedIndices();
      if( selIndexs != null )
      {
        Object ob[] = tabList.getSelectedValues();
        int nAnswer = 0;
        for( int i=0; i<ob.length; i++)
        {
          if( ob[i] != null )
          {
            int nTblID = 0;
            String szTemp = (String)ob[i];
            String szTableName = null;
            int nFind = szTemp.indexOf(':');
            if(  nFind > 0)
            {
              szTableName = szTemp.substring(nFind+1);
              nTblID = Integer.parseInt(szTemp.substring(0,nFind));
            }
            if( nTblID > 0 )
            {
              if( nAnswer != 2 )
                nAnswer = Message.showMessageDialog("Êý¾Ý¿â½á¹¹¸üÐÂ","\n¸ü
ÐÂ'"+szTableName+"'?",
                   3,new String[] {"ÊÇ","·ñ","È«²¿","È¡Ïû"});
              if( nAnswer == 3 ) break; // cancel
              if( nAnswer == 0 || nAnswer == 2)
				//modifyDatabase(nTblID,nTblID,false,true);
				try {
					modifyTableColumn(nTblID,nTblID,null,0);
				} catch( SQLException ex )
				{
					Message.printException
(ex,MainApp.isDebug);
				}
            }
          }
        }
      }
   }
	}
Comment 8 Olivier Thomann CLA 2003-04-21 10:24:03 EDT
Ok, I tried to compile this code sample and I could not reproduce the problem.
So could you please attach the whole class snsoft.sndata.CreateDatabase and its 
dependant classes?
Please specify also the compiler settings you are using. Thanks for your help 
to track down this issue. You seem to be the only one with this problem. 
Comment 9 George Patterson CLA 2003-04-25 19:50:54 EDT
Me too...

java.lang.VerifyError: (class: NullTest, method: main signature: 
([Ljava/lang/String;)V) Unable to pop operand off an empty stack

Excuse me for jumping in, but I just ran into the same or similar problem with 
Eclipse 2.1 on Windows 2000.  I get the same error with the following test 
case...looks like the disassembled code is quite different.

public class NullTest {
    public static void main(String[] args) {
        boolean result = (null == null);
    }
}

SUN JAVAC compiled disassembled code...
public class NullTest extends java.lang.Object {
    public NullTest();
    public static void main(java.lang.String[]);
}

Method NullTest()
   0 aload_0
   1 invokespecial #1 <Method java.lang.Object()>
   4 return

Method void main(java.lang.String[])
   0 aconst_null
   1 ifnonnull 8
   4 iconst_1
   5 goto 9
   8 iconst_0
   9 istore_1
  10 return


Eclipse 2.1 compiled disassembled code...
public class NullTest extends java.lang.Object {
    public NullTest();
    public static void main(java.lang.String[]);
}

Method NullTest()
   0 aload_0
   1 invokespecial #9 <Method java.lang.Object()>
   4 return

Method void main(java.lang.String[])
   0 istore_1
   1 return
Comment 10 Philipe Mulet CLA 2003-04-28 08:42:29 EDT
null == null was already reported/fixed in bug 36438, and would be a different 
problem. 
Comment 11 Philipe Mulet CLA 2003-04-28 11:50:33 EDT
Cannot reproduce problem in #modifyDatabase() either with provided testcase.
Comment 12 Philipe Mulet CLA 2003-04-28 12:03:07 EDT
Created attachment 4719 [details]
rebuilt source from reporter testcase

tianxuefeng - can you reproduce it with this attached file ? I can compile/run
it okay with 2.1.
Comment 13 Philipe Mulet CLA 2003-04-28 12:03:54 EDT
tianxuefeng - can you reproduce it with this attached file ? I can compile/run
it okay with 2.1.
Comment 14 Olivier Thomann CLA 2003-05-21 16:10:25 EDT
Please reopen if you get it again with latest integration build.