Finding the cause of a preverify error
I could use some help trying to figure out the source of this error so I can fix it and move on.
I'm compiling my j2me code using NB RCv. 5.2. I get the following preverify error ONLY when I have "compile with optimization" and "obfuscation high" set:
Preverifying 29 file(s) into F:\Netbeans 5.0 projects\MM_midp1_0\build\screen128_128_fromEsToEn\preverified directory.
Error preverifying class h
VERIFIER ERROR h.a(Ljava/lang/String;)Ljava/lang/String;:
Wrong return type in function
F:\Netbeans 5.0 projects\MM_midp1_0\nbproject\build-impl.xml:269: Preverification failed with error code 1.
BUILD FAILED (total time: 10 seconds)
Thus, since I can't tell what class is giving the error with the obfuscated code, I only changed these 2 settings: compilation level is now debug and Obfuscation is OFF. I hoped to then be able to see the class and method that was giving the error. However, after I clean and build, the build is successful:
preverify:
Created dir: F:\Netbeans 5.0 projects\MM_midp1_0\build\fromEsToEnNotObfuscated\preverified
Preverifying 29 file(s) into F:\Netbeans 5.0 projects\MM_midp1_0\build\fromEsToEnNotObfuscated\preverified directory.
post-preverify:
create-jad:
add-configuration:
add-profile:
set-keystore-password:
set-alias-password:
pre-jar:
jar:
Building jar: F:\Netbeans 5.0 projects\MM_midp1_0\dist\fromEsToEnNotObfuscated\MMES1.jar
Updating application descriptor: F:\Netbeans 5.0 projects\MM_midp1_0\dist\fromEsToEnNotObfuscated\MMES1.jad
Generated "F:\Netbeans 5.0 projects\MM_midp1_0\dist\fromEsToEnNotObfuscated\MMES1.jar" is 89689 bytes.
What could be causing this error only in the optimized obfuscated version and how can I track it down?
JL
www.edufone.com

