View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008942VTK(No Category)public2009-04-29 04:142016-08-12 09:55
Reporterdbarbier 
Assigned ToKitware Robot 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0008942: [Java] vtkObjectBase.Delete() corrupts vtkGlobalJavaHash
DescriptionThe Java garbage collector (called GC in this bugreport) removes weak references from vtkGlobalJavaHash.PointerToReference when it deletes unused objects.
This is all good. Buf if vtkObjectBase.Delete() is called explicitly (which is recommended in Java to avoid threading issues), vtkGlobalJavaHash.PointerToReference is not updated and contains an invalid entry, old vtkId points to an object which has been deleted from native code but not yet GC'ed.
If native code reuses the same address before object is GC'ed, vtkGlobalJavaHash.PointerToReference.get(vtkId) will return this object instead of null.
Here is a test case to reproduce this bug, output is:
Exception in thread "main" java.lang.ClassCastException: vtk.vtkQuadric cannot be cast to vtk.vtkDataArray
        at vtk.vtkDataArray.CreateDataArray(vtkDataArray.java:267)
        at BugWeakRef.main(BugWeakRef.java:21)
TagsNo tags attached.
Project
Type
Attached Files? file icon BugWeakRef.java [^] (724 bytes) 2009-04-29 04:14
patch file icon BugWeakRef.patch [^] (1,673 bytes) 2009-04-29 04:16 [Show Content]

 Relationships

  Notes
(0016238)
dbarbier (reporter)
2009-04-29 04:17

Patch applies against VTK 5.4 and current CVS HEAD.
(0037072)
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
2009-04-29 04:14 dbarbier New Issue
2009-04-29 04:14 dbarbier File Added: BugWeakRef.java
2009-04-29 04:16 dbarbier File Added: BugWeakRef.patch
2009-04-29 04:17 dbarbier Note Added: 0016238
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:55 Kitware Robot Note Added: 0037072
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