Original Post
Hi everyone! I am writing a ray tracer in C plus plus with wxWidgets and I have a class with 2 virtual functions and 2 classes deriving from that class implementing those virtual functions. The top class is CObject and the lower classes are CSphere and CPlane. Now I wanted to use a thread (maybe 2 later [wink]) to render my scene. I have an array of (CObject *)s which contains CSphere and CPlane objects. When I call the virtual function to execute (you know via polymorphism) from my running thread then the program bombs out with a segmentation fault. I can access the other functions in the CObject class except the virtual functions. I think that threads have a problem with the virtual table or something. I am using the wxThread class for my thread. EDIT: I have done this without threads and it worked 100%, I just want to move over to threads sothat I can implement a progress bar and maybe try to let 2 threads render my scene (maybe it'll be faster, I'll see). Also, I tried this on wxWidgets 2.6.2 & 2.6.3 Anyone know what could be the problem? Thanks [Edited by - Last Attacker on August 5, 2006 2:35:25 AM]