[jsword-devel] VerifyError

DM Smith jsword-devel@crosswire.org
Mon, 19 Apr 2004 08:38:18 -0400


I have been playing around with finding VerifyError.
I started by commenting out all the asserts and the code ran just fine.
I have been gradually adding them in file by file and then testing.
When I encounter a problem for a file, I comment out all of them in that 
file (again) and add them in one at a time until I get the problem.
When I get the problem, I again comment out the offending assert and add:
System.err.println("DMS: Should not get here") and run the test again.
The error message never prints.
So the assert was not being exercised but its mere presence was causing 
VerifyErrors when the class was used.

I had thought I found it, seeing patterns where there were not any.
For a while, the problem was only in static methods.
Then I saw it also in constructors. Then in regular public methods.
So no pattern as to where it occurs.

My best guess at this point is that the java compiler that Eclipse 3M7 is 
using is flaky.

DM Smith wrote:
>
>Has anyone gotten this (VerifyError on startup) and gotten past it? If so 
>how?
>
>I have gotten the latest code from CVS.
>I am running Eclipse 3M7.
>I have set source compatibility and class files to 1.4.
>I have done a clean build.
>I cannot run the program without the following error.
>
>java.lang.VerifyError: (class: org/crosswire/jsword/passage/PassageFactory, 
>method: getWholeBiblePassage signature: 
>()Lorg/crosswire/jsword/passage/Passage;) Expecting to find float on stack
>	at 
>org.crosswire.jsword.book.search.ser.SerSearchEngine.<clinit>(SerSearchEngine.java:425)
>	at java.lang.Class.forName0(Native Method)
>	at java.lang.Class.forName(Class.java:141)
>	at 
>org.crosswire.common.util.ResourceUtil.getImplementor(ResourceUtil.java:330)
>	at 
>org.crosswire.jsword.book.search.SearchEngineFactory.createSearchEngine(SearchEngineFactory.java:49)
>	at 
>org.crosswire.jsword.book.basic.AbstractBook.initSearchEngine(AbstractBook.java:98)
>	at 
>org.crosswire.jsword.book.readings.ReadingsBook.<init>(ReadingsBook.java:66)
>	at 
>org.crosswire.jsword.book.readings.ReadingsBookDriver.<init>(ReadingsBookDriver.java:42)
>	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>	at 
>sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>	at 
>sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>	at java.lang.Class.newInstance0(Class.java:308)
>	at java.lang.Class.newInstance(Class.java:261)
>	at org.crosswire.jsword.book.Books.autoRegister(Books.java:377)
>	at org.crosswire.jsword.book.Books.initialize(Books.java:352)
>	at org.crosswire.jsword.book.Books.<init>(Books.java:59)
>	at org.crosswire.jsword.book.Books.<clinit>(Books.java:429)
>	at 
>org.crosswire.jsword.view.swing.desktop.Desktop.getFullNameArray(Desktop.java:892)
>	at 
>org.crosswire.jsword.view.swing.desktop.Desktop.refreshBooks(Desktop.java:875)
>	at 
>org.crosswire.jsword.view.swing.desktop.Desktop.fillChoiceFactory(Desktop.java:847)
>	at 
>org.crosswire.jsword.view.swing.desktop.Desktop.generateConfig(Desktop.java:831)
>	at 
>org.crosswire.jsword.view.swing.desktop.Desktop.<init>(Desktop.java:179)
>	at org.crosswire.jsword.view.swing.desktop.Desktop.main(Desktop.java:136)
>

_________________________________________________________________
Watch LIVE baseball games on your computer with MLB.TV, included with MSN 
Premium! 
http://join.msn.com/?page=features/mlb&pgmarket=en-us/go/onm00200439ave/direct/01/