Unrecoverable java exception when deleting grid view column

User 2d015c38e4

11-03-2009 21:24:02

I'm seeing a java exception thrown when I attempt to delete a column in the grid view tab of Instant JChem.  I'm seeing this with both Instant JChem 2.4 and 2.4.2.  I'm only seeing this when running Instant JChem on Ubuntu, however, as it doesn't seem to recreate on Windows.  This is really annoying for me as I'm developing on Ubuntu and am forced to restart Instant JChem after almost everytime I try and delete a column:(

















Steps to reproduce bug:





1. Start up instantjchem on Ubuntu








2. Open up the the "Pubchem grid view" panel for the Pubchem demo so that you are viewing the list of molecules in the database.





3. Click the "New Standard Field" and create a new column (I used the Standard Integer Field type but I don't think it matters).





4. Select the newly created column, right-click on it, and choose the "Delete Fields" menu option also choosing to delete the related column





5.  Most times when I do this I this (> 75% of the time) I get the following java exception.  When I try and close the java exception it pops right back up again forcing me to have to kill instantjchem.  I only see this wirth Ubuntu and not Windows.

















java.lang.ArrayIndexOutOfBoundsException: -1


    at java.util.Vector.elementData(Vector.java:707)


    at java.util.Vector.elementAt(Vector.java:450)


    at javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:294)


    at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderRenderer(BasicTableHeaderUI.java:671)


    at javax.swing.plaf.basic.BasicTableHeaderUI.paintCell(BasicTableHeaderUI.java:687)


    at javax.swing.plaf.basic.BasicTableHeaderUI.paint(BasicTableHeaderUI.java:663)


    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)


    at javax.swing.JComponent.paintComponent(JComponent.java:774)


    at javax.swing.JComponent.paint(JComponent.java:1038)


    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5147)


    at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:302)


    at javax.swing.RepaintManager.paint(RepaintManager.java:1145)


    at javax.swing.JComponent._paintImmediately(JComponent.java:5095)


    at javax.swing.JComponent.paintImmediately(JComponent.java:4905)


    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:740)


    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:696)


    at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:676)


    at javax.swing.RepaintManager.access$700(RepaintManager.java:57)


[catch] at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1550)


    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)


    at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)


    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)


    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)


    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)


    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)


    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)


    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

ChemAxon fa971619eb

11-03-2009 21:30:08

Can you tell us which version of java you are using and other details of your Ubuntu installation.


Use Help -> About Instant JChem and copy and paste the contents to this forum topic.





Thanks


Tim

User 2d015c38e4

11-03-2009 21:47:59

Here's the info from Instant JChem.  Let me know if you have any more questions.

















Instant JChem Version: 2.4.2 (build: 090213)


JChem Version: 5.1.5


JChem Table Version: 50103


Marvin Version: 5.1.5 (build date: 2009-02-13)


Java: 1.6.0_0; OpenJDK Server VM 1.6.0_0-b12


System: Linux version 2.6.27-11-generic running on i386; UTF-8; en_US (instantjchem)


NetBeans build: 200711261600


Userdir: /home/patmac/.instantjchem/ijc_2_4


Java Web Start: No


Plugins:


    chemaxon.ijc.updatecenter [2.4.1 090213]


    chemaxon.jchem/1 [5.1.5 090213]


    com.im.commons/1 [2.4 081118]


    com.im.df.api/1 [2.4.2 090213]


    com.im.df.core.derby/1 [2.4.2 090213]


    com.im.df.core.oracle/1 [2.4.2 090213]


    com.im.df.db.mysql/1 [2.4.2 090213]


    com.im.df.localdb/1 [2.4 081118]


    com.im.df.server.local/1 [2.4 081118]


    com.im.df/1 [2.4.2 090213]


    com.im.ijc.autoupdate/1 [2.4 081118]


    com.im.ijc.branding/1 [2.4.2 090213]


    com.im.ijc.chem.overlap/1 [2.4 081118]


    com.im.ijc.core/1 [2.4.2 090213]


    com.im.ijc.examples.addfield [2.4 081118]


    com.im.ijc.examples.ijcrenderers [2.4 081118]


    com.im.ijc.examples.mathcomputationactions [2.4 081118]


    com.im.ijc.extraloaders [2.4 081118]


    com.im.ijc.formview/1 [2.4.2 090213]


    com.im.ijc.gridview/1 [2.4.1 090213]


    com.im.ijc.io [2.4.2 090213]


    com.im.ijc.jrprinting/1 [2.4.1 090213]


    com.im.ijc.project/1 [2.4.2 090213]


    com.im.ijc.querytextpanel [2.4 081118]


    com.im.ijc.renderers/1 [2.4.2 090213]


    com.im.ijc.security/1 [2.4 081118]


    com.im.ijc.server.api/1 [2.4 081118]


    com.im.ijc.server.impl/1 [2.4 081118]


    com.im.ijc.sfs [2.4.2 090213]


    com.im.ijc.standardizer/1 [2.4 081118]


    com.im.ijc.structurefiles/1 [2.4 081118]


    com.im.ijc.update.pack [2.4.2 090213]


    com.im.ijc.versionprovider [2.4.2 090213]


    com.im.ijc.welcome/1 [2.4.2 090213]


    com.im.ijc.widgets/1 [2.4.2 090213]


    com.jacob.com [1.0 081118]


    com.lowagie.iia/1 [2.0.8 081118]


    com.michaelbaranov.microba/1 [0.4.4 081118]


    com.mysql.jdbc/1 [5.0.8 081118]


    net.sf.cglib/1 [2.1.3 081118]


    net.sf.jasperreports/1 [3.0.1 081118]


    oracle.jdbc/1 [11.1.0.6.0 081118]


    org.acegisecurity/1 [1.0.5 081118]


    org.apache.batik/1 [1.1 081118]


    org.apache.commons.beanutils/1 [1.7.0 081118]


    org.apache.commons.collections/1 [3.2 081118]


    org.apache.commons.dbcp/1 [1.2.2 081118]


    org.apache.commons.digester/1 [1.8 081118]


    org.apache.commons.pool/1 [1.3 081118]


    org.apache.derby/1 [10.4.2 081118]


    org.apache.poi [3.0.1 081118]


    org.apache.xml.resolver [1.2.1 1.2 200711261600]


    org.dom4j/1 [1.6.1 090213]


    org.eclipse.jdt.core.compiler/1 [3.1.1 081118]


    org.freehep/1 [2.1.1 081118]


    org.jdesktop.layout/1 [1.4.1 1.0.3 200711261600]


    org.netbeans.api.progress/1 [1.10.1.1 1 200711261600]


    org.netbeans.api.visual [2.9.1 200711261600]


    org.netbeans.api.xml/1 [1.14.1 200711261600]


    org.netbeans.bootstrap/1 [2.7.1 200711261600]


    org.netbeans.core.execution/1 [1.10.1.1 200711261600]


    org.netbeans.core.ide/1 [1.10.1 200711261600]


    org.netbeans.core.output2/1 [1.8.2.1 1 200711261600]


    org.netbeans.core.startup/1 [1.10.1.1 200711261600]


    org.netbeans.core.ui/1 [1.10.1 200711261600]


    org.netbeans.core.windows/2 [2.8.1.1 200711261600]


    org.netbeans.core/2 [3.6.1.0.1.1 081105]


    org.netbeans.libs.commons_logging/1 [1.4.1 1.0.4 200711261600]


    org.netbeans.libs.xerces/1 [1.10.1 2.8.0 200711261600]


    org.netbeans.modules.applemenu/1 [1.7.1 200711261600]


    org.netbeans.modules.autoupdate.services [1.3.1.0.1 080214]


    org.netbeans.modules.autoupdate.ui [1.2.1 200711261600]


    org.netbeans.modules.classfile/1 [1.19.1 200711261600]


    org.netbeans.modules.db.core [1.5.1 200711261600]


    org.netbeans.modules.db.sql.editor [1.5.1.5 200711261600]


    org.netbeans.modules.db.sql.visualeditor/1 [2.1.1.5 200711261600]


    org.netbeans.modules.db/1 [1.24.1.5 5 200711261600]


    org.netbeans.modules.dbapi [1.5.1.5 200711261600]


    org.netbeans.modules.defaults/1 [1.3.1 200711261600]


    org.netbeans.modules.editor.bookmarks/1 [1.4.1 200711261600]


    org.netbeans.modules.editor.bracesmatching/0 [1.3.1 200711261600]


    org.netbeans.modules.editor.codetemplates/1 [1.5.1.1.5 1 200711261600]


    org.netbeans.modules.editor.completion/1 [1.9.1 200711261600]


    org.netbeans.modules.editor.errorstripe.api/1 [2.3.1.1 1 200711261600]


    org.netbeans.modules.editor.errorstripe/2 [2.3.1.1.1 1 200711261600]


    org.netbeans.modules.editor.fold/1 [1.6.1 200711261600]


    org.netbeans.modules.editor.guards/1 [1.0.1 200711261600]


    org.netbeans.modules.editor.highlights/0 [1.2.1.1 1 200711261600]


    org.netbeans.modules.editor.indent/2 [1.6.1.4 200711261600]


    org.netbeans.modules.editor.lib/1 [1.20.1.4.2 4 200711261600]


    org.netbeans.modules.editor.lib2/1 [1.5.1.2 2 200711261600]


    org.netbeans.modules.editor.mimelookup.impl/1 [1.1.1 200711261600]


    org.netbeans.modules.editor.mimelookup/1 [1.8.1 200711261600]


    org.netbeans.modules.editor.plain.lib/1 [1.4.1 200711261600]


    org.netbeans.modules.editor.plain/1 [1.4.1 200711261600]


    org.netbeans.modules.editor.settings.storage/1 [1.10.1 200711261600]


    org.netbeans.modules.editor.settings/1 [1.12.1 200711261600]


    org.netbeans.modules.editor.structure/1 [1.15.1.1 1 200711261600]


    org.netbeans.modules.editor.util/1 [1.21.1 200711261600]


    org.netbeans.modules.editor/3 [1.35.1.4.2 200711261600]


    org.netbeans.modules.extbrowser/1 [1.11.1 200711261600]


    org.netbeans.modules.favorites/1 [1.12.1 200711261600]


    org.netbeans.modules.gototest/1 [1.0.1 200711261600]


    org.netbeans.modules.javahelp/1 [2.9.1 200711261600]


    org.netbeans.modules.jumpto/1 [1.3.1 200711261600]


    org.netbeans.modules.lexer.editorbridge/1 [1.4.1 200711261600]


    org.netbeans.modules.lexer.nbbridge/1 [1.2.1.1 200711261600]


    org.netbeans.modules.lexer/2 [1.25.1.1 1 200711261600]


    org.netbeans.modules.masterfs/1 [1.11.1 200711261600]


    org.netbeans.modules.options.api/1 [1.5.1 200711261600]


    org.netbeans.modules.options.editor/1 [1.4.1 200711261600]


    org.netbeans.modules.options.keymap [1.1.1 200711261600]


    org.netbeans.modules.progress.ui [1.0.1.0.0.1 080409]


    org.netbeans.modules.project.ant/1 [1.17.1 200711261600]


    org.netbeans.modules.project.libraries/1 [1.15.1 200711261600]


    org.netbeans.modules.projectapi/1 [1.13.1 200711261600]


    org.netbeans.modules.projectui [1.12.1.1.6 1 200711261600]


    org.netbeans.modules.projectuiapi/1 [1.24.1.6 6 200711261600]


    org.netbeans.modules.properties.syntax/1 [1.18.1 200711261600]


    org.netbeans.modules.properties/1 [1.21.1 200711261600]


    org.netbeans.modules.queries/1 [1.10.1 200711261600]


    org.netbeans.modules.schema2beans/1 [1.16.1 200711261600]


    org.netbeans.modules.sendopts/2 [2.1.1 200711261600]


    org.netbeans.modules.settings/1 [1.13.1 200711261600]


    org.netbeans.modules.utilities/1 [1.25.1 200711261600]


    org.netbeans.modules.web.flyingsaucer/1 [1.0.1 1 200711261600]


    org.netbeans.modules.xml.axi [1.2.1 200711261600]


    org.netbeans.modules.xml.catalog/2 [1.12.1.4.4 4 200711261600]


    org.netbeans.modules.xml.core/2 [1.13.1.4 4 200711261600]


    org.netbeans.modules.xml.lexer [1.1.1 200711261600]


    org.netbeans.modules.xml.retriever/1 [1.1.1 200711261600]


    org.netbeans.modules.xml.schema.completion [1.0.1 200711261600]


    org.netbeans.modules.xml.schema.model/1 [1.2.1 1 200711261600]


    org.netbeans.modules.xml.text/2 [1.13.1.4.4 4 200711261600]


    org.netbeans.modules.xml.xam/1 [1.2.1 1 200711261600]


    org.netbeans.spi.editor.hints/0 [1.2.1.5 5 200711261600]


    org.netbeans.spi.navigator/1 [1.5.1 200711261600]


    org.netbeans.swing.dirchooser [1.0.1 200711261600]


    org.netbeans.swing.plaf [1.6.1 200711261600]


    org.netbeans.swing.tabcontrol [1.9.1 200711261600]


    org.openide.actions [6.6.1.1 200711261600]


    org.openide.awt [6.11.1.1 200711261600]


    org.openide.compat [6.5.1 200711261600]


    org.openide.dialogs [7.5.1 200711261600]


    org.openide.execution [1.10.1 200711261600]


    org.openide.explorer [6.12.1 1 200711261600]


    org.openide.filesystems [7.3.1 200711261600]


    org.openide.io [1.11.1 200711261600]


    org.openide.loaders [6.7.1 200711261600]


    org.openide.modules [7.3.1 200711261600]


    org.openide.nodes [7.2.1.1 200711261600]


    org.openide.options [6.7.1 200711261600]


    org.openide.text [6.16.1 200711261600]


    org.openide.util [7.10.1.1 1 200711261600]


    org.openide.windows [6.18.1 200711261600]


    org.openidex.util/3 [3.13.1 200711261600]


    org.springframework/1 [2.5 081118]

ChemAxon fa971619eb

11-03-2009 22:13:23

I think the java version could be the problem (that's why I asked for that info), and the error is very reminsiscent of some bugs we saw with earlier versions of Java 1.6.


You are using: "1.6.0_0; OpenJDK Server VM 1.6.0_0-b12".


Non-Sun JDKs are typically problematical, and we have not tested the OpenJDK distributions.


Can you try runing against a standard Sun JRE that you can download from here:


http://java.sun.com/javase/downloads/?intcmp=1281





To change the Java version edit the following file:


<ijc_install_dir>/etc/instantjchem.conf


and edit the jdkhome property (and uncomment it if necessary).





Let us know if this helps.





Thanks





Tim

User 2d015c38e4

11-03-2009 23:14:34

I'm afarid switching out the JDK didn't work.  I'm still getting the same exception (but with different line numbers of course) which I've included below.  Also here is the updated relevent information from Instant JChem.








Instant JChem Version: 2.4.2 (build: 090213)


JChem Version: 5.1.5


JChem Table Version: 50103


Marvin Version: 5.1.5 (build date: 2009-02-13)


Java: 1.6.0_12; Java HotSpot(TM) Server VM 11.2-b01


System: Linux version 2.6.27-11-generic running on i386; UTF-8; en_US (instantjchem)


NetBeans build: 200711261600


Userdir: /home/patmac/.instantjchem/ijc_2_4


Java Web Start: No








java.lang.ArrayIndexOutOfBoundsException: -1


    at java.util.Vector.elementAt(Vector.java:430)


    at javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:277)


    at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderRenderer(BasicTableHeaderUI.java:654)


    at javax.swing.plaf.basic.BasicTableHeaderUI.paintCell(BasicTableHeaderUI.java:670)


    at javax.swing.plaf.basic.BasicTableHeaderUI.paint(BasicTableHeaderUI.java:646)


    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)


    at javax.swing.JComponent.paintComponent(JComponent.java:763)


    at javax.swing.JComponent.paint(JComponent.java:1027)


    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)


    at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:277)


    at javax.swing.RepaintManager.paint(RepaintManager.java:1217)


    at javax.swing.JComponent._paintImmediately(JComponent.java:5070)


    at javax.swing.JComponent.paintImmediately(JComponent.java:4880)


    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:803)


    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)


    at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)


[catch] at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)


    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)


    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)


    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)


    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)


    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)


    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)


    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)


    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

ChemAxon fa971619eb

12-03-2009 07:35:57

OK, thanks.


We will investigate and try to work out what the problem is.





Tim

ChemAxon 3b366b17e5

12-03-2009 10:11:58

We are able to reproduce this bug on jdk 1.6. Quick workaround is to use jdk 1.5. (http://java.sun.com/javase/downloads/index_jdk5.jsp). The bug will be fixed in IJC 2.4.4. It's to late to integrate it to IJC 2.4.3.





Petr

ChemAxon fa971619eb

12-03-2009 14:44:27

One more comment.


The bug only applies if you are deleting the last column in the grid view table.


So another workaround it just to move the column to an earlier position and then delete it.





Tim

ChemAxon fa971619eb

19-03-2009 14:53:41

This problem should now be fixed in the recent 2.4.3.1 update.





Thanks


Tim