This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 73045 - preverifying error class
Summary: preverifying error class
Status: RESOLVED WONTFIX
Alias: None
Product: javame
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Adam Sotona
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-27 12:22 UTC by ade_esan
Modified: 2006-10-23 16:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
compile single output (2.76 KB, text/plain)
2006-02-28 10:11 UTC, Lukas Hasik
Details
midlet with 2 big 2 dimensional arrays (58.14 KB, text/plain)
2006-02-28 10:13 UTC, Lukas Hasik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ade_esan 2006-02-27 12:22:54 UTC
I was building a j2me midlet application and it had been building and compiling 
fine. I had two multi-dimentional arrays in a class called GameCore. They were 
defined as public static final int variables and they were defined.
public static final int[][] iaWorldTileMap  = {......};
public static final int[][] iaWorldActionMap  = {......};
There were both 35x35 in size, but when i made them 72x72 in size the midlet 
would no longer compile. It came out with the error:

Error preverifying class GameCore
    VERIFIER ERROR GameCore.<clinit>()V:
Illegal target of jump or branch
C:\Documents and Settings\Nice Guy Eddie\My Documents\Code\Free 
Run\nbproject\build-impl.xml:269: Preverification failed with error code 1.
BUILD FAILED (total time: 6 seconds)

The error takes me to the build-impl.xml file and points at this line:

<nb-preverify srcdir="${obfuscated.classes.dir}" destdir="${preverify.classes.
dir}" classpath="${platform.bootclasspath}" configuration="${platform.
configuration}" platformhome="${platform.home}" platformtype="${platform.type}" 
commandline="${platform.preverifycommandline}"/>

After so i removed one of the arrays and again it compiles and builds. But when 
i put both back in it fails again. It seems like it could only support one of 
the arrays at a time. 

I took the definations out of the declarations and defined the arrays in the 
constructor, removing the final attribute on the arrays. Doing this worked and 
the midlet again compiles and builds.

It seems to be a bug that revents the midlet building when the two arrays where 
increased in size and defined at declaration.
Comment 1 Peter Pis 2006-02-28 09:32:16 UTC
Reassigning to "j2me" for evaluation.
Comment 2 Lukas Hasik 2006-02-28 09:59:15 UTC
well, it looks like bug(or feature) of preverifier.
Reassigning...
Adame, do you know more about preverifier? Is it bug or feature?

I tried to compile the helloMidlet.java in attachment but I ended on compilation 
File to be compiled:
F:\netbeans\projects50\fcs\MobileApplication11\src\hello\HelloMidlet.java
F:\netbeans\projects50\fcs\MobileApplication11\src\hello\HelloMidlet.java:17:
code too large
   public static final int[][] iaWorldTileMap  = 
1 error

Comment 3 Lukas Hasik 2006-02-28 10:11:38 UTC
Created attachment 29045 [details]
compile single output
Comment 4 Lukas Hasik 2006-02-28 10:13:02 UTC
Created attachment 29046 [details]
midlet with 2 big 2 dimensional arrays
Comment 5 Lukas Hasik 2006-02-28 10:15:56 UTC
some interesting links
http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=b028e62dd91fdffffffffb1bdf357ec28f9c:YfiG?bug_id=4309152
http://lists.bluej.org/pipermail/bluej-discuss/2003-August/002778.html

according to this explanations. I'm closing as WONTFIX. You cannot use so big
arrays.