MantisBT - VTK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0008942 | VTK | (No Category) | public | 2009-04-29 04:14 | 2016-08-12 09:55 |
Reporter | dbarbier | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Project | |||||
Type | |||||
Summary | 0008942: [Java] vtkObjectBase.Delete() corrupts vtkGlobalJavaHash | ||||
Description | The 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) | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | BugWeakRef.java (724) 2009-04-29 04:14 https://www.vtk.org/Bug/file/7199/BugWeakRef.java BugWeakRef.patch (1,673) 2009-04-29 04:16 https://www.vtk.org/Bug/file/7200/BugWeakRef.patch | ||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|