View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007043VTK(No Category)public2008-05-17 13:012016-08-12 09:54
ReporterJerome Robert 
Assigned ToKitware Robot 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0007043: [Wrapping JAVA of VTK] Bug with methods containing character '_'
DescriptionThe JNI library replace all "_" substrings in function names by "_1" and the parser of VTK doesn't do this so this error occurs :

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: vtk.vtkSelection.PROCESS_ID_36()J
        at vtk.vtkSelection.PROCESS_ID_36(Native Method)
        at vtk.vtkSelection.PROCESS_ID(vtkSelection.java:471)
        at testvtk.CascadeActorManager.selectOnSurface(CascadeActorManager.java:142)
        at testvtk.TestRubberBand$RubberBandHelper.doSelectionVisible(TestRubberBand.java:71)
        at testvtk.TestRubberBand$RubberBandHelper.mouseReleased(TestRubberBand.java:64)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
        at java.awt.Component.processMouseEvent(Component.java:6038)
        at java.awt.Component.processEvent(Component.java:5803)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
BUILD STOPPED (total time: 12 seconds)

Because the real name expected by the JNI is vtk.vtkSelection.PROCESS_1ID_36 and not vtk.vtkSelection.PROCESS_ID_36. This is a program that can cause this :

import vtk.vtkSelection;

public class BugPROPID
{
      static
  {
    System.out.println(System.getProperty("java.library.path"));
    System.loadLibrary("vtkCommonJava");
    System.loadLibrary("vtkFilteringJava");
    System.loadLibrary("vtkIOJava");
    System.loadLibrary("vtkImagingJava");
    System.loadLibrary("vtkGraphicsJava");
    System.loadLibrary("vtkRenderingJava");
  }
  public static void main(String[] args)
  {
            vtkSelection selection = new vtkSelection();
            System.out.println("TEST : " + selection.PROP_ID());
  }
}

I have made a patch to fix it (it add '1' after all '_' in name methods and name classes).
Additional InformationThis bug has been posted as 6723 with wrong severity. I repost it with the good one to ensure it won't be forgotten.

I also fix the patch so it build with visual studio.
TagsNo tags attached.
Project
Type
Attached Filespatch file icon vtkWrapJava.patch [^] (5,480 bytes) 2008-05-17 13:01 [Show Content]

 Relationships

  Notes
(0036973)
Kitware Robot (administrator)
2016-08-12 09:54

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2008-05-17 13:01 Jerome Robert New Issue
2008-05-17 13:01 Jerome Robert File Added: vtkWrapJava.patch
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:54 Kitware Robot Note Added: 0036973
2016-08-12 09:54 Kitware Robot Status expired => closed
2016-08-12 09:54 Kitware Robot Resolution open => moved
2016-08-12 09:54 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team