[vtkusers] Is VTK 5.10.1 compatible with MacOS 10.8.3 and Java?

Simeon Fitch fitch at datamininglab.com
Mon May 13 09:28:37 EDT 2013


Seb,

Thanks so much for your help and giving it a try.  Very much appreciated.

When it comes to Java 6 I think you've identified a significant part of the
problem. I learned that to ensure consistent use of Java 6 throughout the
build->execution cycle it is critical that JAVA_HOME be set to
"/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home" *before*
calling cmake. Otherwise it uses what /usr/libexec/java_home returns.

Once I set that and fixed a bug where  I was using vtkPolyDataMapper when I
should have been using vtkDataSetMapper (which also causes a crash) I was
able to get a simple test to run.

Getting Java 7 working is still an issue for us, but one I can defer for a
week or two. That said, know that I'm interested in helping out if others
have already started tackling the VTK + Java 7 on MacOS X issues, including
the port to use CALayer instead of NSView (as discussed here:
http://www.vtk.org/pipermail/vtkusers/2012-November/126603.html). I just
don't know enough of the landscape yet to be able to take that on by myself.

Cheers,

Simeon




On Fri, May 10, 2013 at 10:57 PM, Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:

> Hi Simeon,
>
> I've just tried your code and everything worked as expected, no crash on
> my end.
> => OS X 10.8.3
> => Java 1.6.0_45
>
> I suspect your VTK build may link to a different version of Java than the
> one you run your application with.
>
> Seb
>
>
> On Fri, May 10, 2013 at 3:11 PM, Simeon Fitch <fitch at datamininglab.com>wrote:
>
>> Hi VTK fans,
>>
>> After prototyping some cool prototype visualizations with the help of
>> ParaView I'm attempting to implement them in an existing Java-based
>> engineering application. I have burned several couple days trying to get
>> some combination of VTK and Java to play nicely together on MacOS X,
>> running into issues ranging from detached rendering windows to core dumps
>> when trying to use vtkXMLUnstructuredGridReader.
>>
>> Since I have my client excited about using VTK after seeing the ParaView
>> results, I'm anxious to make a final determination as to whether we can
>> reliably make use of VTK in our engineering app or if I need to look for
>> other options. :-( I'm interesting in hearing from other's who've
>> successfully deployed Java-based VTK apps on MacOS X.
>>
>> I've attempted to use Java 6 and 7 (our app requires 7), as well as VTK
>> version 5.6, 5.8, 5.10.1, and the GitHub master. With Java 6, rendering
>> windows appear where they should, but appear as separate window entities
>> with Java 7. Putting that aside, all the combinations I've tried crash when
>> attempting to use vtkXMLUnstructuredGridReader and render the result. I've
>> tested with my own .vtu files as well as
>> the VTKData5.10.1/Data/quadraticTetra01.vtu
>>
>> The test code I'm using is here:
>> https://gist.github.com/metasim/5556435
>>
>>  The crash report is here:
>> https://gist.github.com/metasim/5556553
>>
>> I'd appreciate any advice on how to get a basic app working with modern
>> versions of Java and MacOS X, or at least how to help debug and fix the C++
>> code. I've attempted attaching Xcode to the running process and had cases
>> when it crashes in either vtkDataSet::GetBounds() or
>> vtkXMLReaderJava::Java_vtk_vtkXMLReader_SetFileName_12() (the latter in the
>> call to op->SetFileName()). Given the seeming benign nature of the crash
>> sites, I suspect memory corruption has occurred before then. I tried
>> running with the following environment variables set, but that didn't
>> render any additional useful info:
>>
>> * DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib
>> * MallocGuardEdges=1
>> * MallocScribble=1
>>
>> Thanks,
>>
>> Simeon
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>


-- 
Simeon H.K. Fitch
Director of Software Engineering
Elder Research, Inc.
http://datamininglab.com
o: 434.973.7673
m: 434.202.IDEA (4332)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130513/3f7186b6/attachment.htm>


More information about the vtkusers mailing list