View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007674VTK(No Category)public2008-09-15 05:322016-08-12 09:55
ReporterKristian Sons 
Assigned ToKitware Robot 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0007674: [VTK Java] Crashes if setting null - Object
DescriptionFollowing code leads to a crash in jvm.dll:

vtkActor myActor = new vtkActor();
myActor.SetTexture(null);

Thus it is not possible to unset the texture of an actor. Same is true for all other functions with objects as parameter.

Additional InformationReason:
This is because JNI:GetObjectClass will be called with null object. This is not allowed (s.http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/functions.html#wp16334 [^]).

Fix suggestion:
In vtkJavaUtil.cxx change function vtkJavaGetPointerFromObject to:

JNIEXPORT void *vtkJavaGetPointerFromObject(JNIEnv *env, jobject obj)
{
    return obj == NULL ? NULL : (void*)(size_t)vtkJavaGetId(env, obj);
}
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0013892)
dbarbier (reporter)
2008-10-16 06:45

IMHO this check could be moved into vtkJavaGetId to protect both methods
(0013920)
dbarbier (reporter)
2008-10-23 04:29

In fact this bug had been fixed in CVS 1.63 few days before being reported, and has now been push into 5.2 branch, it can be closed.
(0037016)
Kitware Robot (administrator)
2016-08-12 09:55

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-09-15 05:32 Kristian Sons New Issue
2008-10-16 06:45 dbarbier Note Added: 0013892
2008-10-23 04:29 dbarbier Note Added: 0013920
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:55 Kitware Robot Note Added: 0037016
2016-08-12 09:55 Kitware Robot Status expired => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved
2016-08-12 09:55 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team