Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 829
    • Issues 829
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 240
    • Merge requests 240
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #1045
Closed
Open
Issue created Aug 09, 2004 by Kitware Robot@kwrobotOwner

Bug in vtkMultiThreader.cxx

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


There is a mistake in vtkMultiThreader.cxx when testing Win32 CreateThread result :

#ifdef VTK_USE_WIN32_THREADS DWORD threadId; HANDLE process_id[VTK_MAX_THREADS]; #endif

//...

process_id[thread_loop] =
  CreateThread(NULL, 0, this->MultipleMethod[thread_loop],
         ((void *)(&this->ThreadInfoArray[thread_loop])), 0, &threadId);
if (process_id == NULL)
{
  vtkErrorMacro("Error in thread creation !!!");
} 

The test if (process_id == NULL) is wrong (process_id can't be NULL), the right test is : if (process_id[thread_loop] == NULL)

This error is present twice : line 259 line 449

One can also note that threadId is passed to CreateThread but is never used. According to the documentation of CreateThread, threadId can be omitted and removed of the source.

Greets, Aurelien REGAT-BARREL

Assignee
Assign to
Time tracking