MantisBT - VTK
View Issue Details
0008338VTK(No Category)public2009-01-02 14:492016-08-12 09:55
Sean McBride 
Dave DeMarle 
normalmajorN/A
closedmoved 
6.0.0 
 
TBD
incorrect functionality
0008338: various vtkRenderWindow subclass implementations of SetWindowInfo are likely not 64 bit clean
vtkRenderWindow has a strange API named SetWindowInfo(). It takes an ASCII string of a decimal number and converts it to a pointer.

The X11 and Win32 implementations don't appear 64bit clean as they use an 'int' which is not guaranteed by the C++ standard to be big enough to hold a pointer. Using 'int' is also weird because it is signed, but addresses are never signed.

Using ptrdiff_t would be safer.

The following have the error: vtkOSOpenGLRenderWindow, vtkWin32OpenGLRenderWindow, vtkWinCEOpenGLRenderWindow, vtkXOpenGLRenderWindow.

For example:

void vtkWin32OpenGLRenderWindow::SetWindowInfo(char *info)
{
  int tmp;
  
  sscanf(info,"%i",&tmp);

  this->WindowId = (HWND)tmp;
  vtkDebugMacro(<< "Setting WindowId to " << this->WindowId << "\n");
}

This is how I did it in Cocoa:

  ptrdiff_t tmp = 0;
  if (info)
    {
    (void)sscanf(info, "%tu", &tmp);
    }

I don't have access to these platforms and so daren't fix it myself.
No tags attached.
Issue History
2009-01-02 14:49Sean McBrideNew Issue
2009-01-02 14:49Sean McBrideStatusbacklog => tabled
2009-01-02 14:49Sean McBrideAssigned To => David Cole
2011-01-19 10:22David ColeAssigned ToDavid Cole => David Partyka
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2013-07-22 20:33Dave DeMarleStatusbacklog => expired
2013-07-22 20:33Dave DeMarleNote Added: 0031292
2013-07-23 10:35Sean McBrideProject => TBD
2013-07-23 10:35Sean McBrideType => incorrect functionality
2013-07-23 10:35Sean McBrideNote Added: 0031319
2013-07-23 10:35Sean McBrideAssigned ToDavid Partyka => Dave DeMarle
2013-07-23 10:35Sean McBrideProduct Version => 6.0.0
2016-08-12 09:55Kitware RobotNote Added: 0037050
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved

Notes
(0031292)
Dave DeMarle   
2013-07-22 20:33   
Dave P no longer works on the project. If these old issues still exist in 6.0.0, reopen them and assign to Dave DeMarle
(0031319)
Sean McBride   
2013-07-23 10:35   
Issue still exists.
(0037050)
Kitware Robot   
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.