Community
Participate
Working Groups
Eclipse 3.0 M5 Having compiled several plugins by running the PDE created build.xml, I am encountering the following problem trying to use that code: java.lang.VerifyError: (class: net/sourceforge/perforce/ui/views/ PendingChangeListView$ContentProvider, method: hasChildren signature: (Ljava/lang/Object;)Z) Illegal use of nonvirtual function call) Assuming that Eclipse Ant still uses the Eclipse compiler I am entering this as bug in JDT core.
Created attachment 6916 [details] Archive containing class files that resulted from Ant build
Created attachment 6917 [details] Archive containing class files that resulted from Eclipse internal build
Did it work better with internal built files ? Can you attach the sources which correspond to the offending files ?
yes it worked better with files built internally (see second attachment). The sources for that specific class will not compile standalone, so I would have to provide the whole sources. Do you still want them?
Only the source of the offending .class file. Can you narrow down the offending pattern ? This likely is an expression or statement which is misgenerated, and doesn't require other files (if cutting dependencies). But definitely, the offending source is needed.
Created attachment 6918 [details] Offending Source Disassembling PendingChangelistView$ContentProvider (the offending class) showed that the incorrect version has translated the super.* calls to BaseWorkbenchContentProvider.* calls while the correct version compiled them to WorkbenchContentProvider.* calls.
Which setting did you use when using the Ant task ? Which JRE is it running on ? Did you use the Eclipse Ant compiler task ? Also, what are the settings you use for your Eclipse project (internal) ?
> Which setting did you use when using the Ant task ? Defaults. Didn't change anything. > Which JRE is it running on ? 1.4.2_01 > Did you use the Eclipse Ant compiler task ? If it's still the default - yes. > Also, what are the settings you use for your Eclipse project (internal) ? Again, defaults. I just installed Eclipse 3.0 M5, used a fresh workspace. Checked out some sources via CVS from SourceForge (p4eclipse project). Created the build.xml from the plugin.xml and compiled with the resulting build.xml. Nothing else was touched.
Did you set the following property in the Ant javac task you invoked ? <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> If not, then you aren't using the Eclipse compiler.
It looks like the PDE-generated build.xml does this (at least it did on M4). So, JDTCompilerAdapter is used.
Can you attach the generated build xml file ?
Created attachment 6929 [details] The build.xml BTW: I have the problem on Windows and on MacOS ...
Could you please check if the build.xml runs in the same VM as Eclipse or a separate VM? You can find this information here: 1) Open the external tools launch that is launching your build.xml. 2) Go to the JRE tab. See if the runtime JRE is set to: Run in same JRE as the workspace or Alternate JRE. Thanks. I will try to investigate once I have this information.
Could you please also provide the console contents when you run your build.xml file? Attach it to this PR. Thanks.
Created attachment 6944 [details] Build Log JRE is set to same as workspace.
Can you try to change your build.xml replacing: <property name="javacSource" value="1.3"/> <property name="javacTarget" value="1.1"/> with: <property name="javacSource" value="1.3"/> <property name="javacTarget" value="1.2"/> And let me know if this is fixing your problem? Thanks.
I would need the whole test case to test it myself.
Changing javacTarget makes no difference.
Looks like this only happens when compiling against M5 plugins but running the result with a previous (e.g. M4) Eclipse build. Let me know if this issue is still of interest for you and I'll send you the projects.
Then could you please tell me where to get the whole project? I need to investigate compiling all the classes. Thanks.
Ok, this could be related to the RCP changes between M4 and M5. Is it running ok with M5 plugins? If yes, then this is due to the massive refactoring in eclipse ui code.
It is running with M5. But it's also running with M4 if I don't compile with Ant. For me it's okay since I won't be targeting 3.0 versions < M5 for long but it might be a problem anyway. The sources are available via CVS: :pserver:anonymous@cvs.sourceforge.net:/cvsroot/p4eclipse You'll need net.sourceforge.perforce.api, net.sourceforge.perforce.api.win32, net.sourceforge.perforce.core and net.sourceforge.perforce.ui (which is the plugin with the problem)
When you say "it is running with M4", are you sure that you are compiling against M5 plugins inside Eclipse. I would not be surprise if your self-hosting workspace contains M4 plugins. If you compile against M4 plugins, you have to run it with M4 plugins. If you compile with M5 plugins, you have to run it with M5 plugins. Are you sure this is what you are doing inside Eclipse? It should not make any difference between what has been compiled inside Eclipse or with Ant using Eclipse compiler as long as you are compiling using the same plugins on the classpath. Could you please attach your .classpath file for the ui project? I cannot connect to the cvs server. Could be a firewall issue. I will request access to it.
That's a good point. I am quite sure that my workspace contains the M5 plugins but I'll verify that. Nevertheless, I am doing internal build and ant build from the same workspace, doesn't that mean that in both situations I compile against the same plugins? Or does the ant build work against the hosting Eclipse version? (I'll try to send the .classpath or even the projects later)
You problem could be a PDE issue. The plugins used to compile the code are not the one you think. From the compiler point of view, if running on M5 works fine when compiled with M5 plugins and running on M4 works fine when compiled with M4 plugins, then it is ok and we can close this PR. Compiling with M4 plugins and running on M5 can fail due to major reorg in ui plugins.
Close as WORKSFORME. Please reopen if you still believe this is a compiler issue.