• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
VTK and Cocoa on Mac OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VTK and Cocoa on Mac OS X


  • Subject: VTK and Cocoa on Mac OS X
  • From: Albion Baucom <email@hidden>
  • Date: Sun, 11 Jul 2004 12:57:23 -0700 (PDT)

(I sent this to the VTK-Users forum, but thought I would try here too
incase someone else was using VTK and Cocoa. VTK is the Visualization
Toolkit, www.vtk.org).

So ...

I have a VTK view that instantiates and draws objects just fine if I add
it as a custom view in the Interface Builder.

My application launches, I use the menu option "New" and it opens a window
with a scene that works great. This is all working via the NIB file.

When I try to just include the header of that custom view (a subclass of
vtkCocoaGLView) to a document based application object that subclasses
NSDocument, my program segfaults (signal 10 (SIGBUS), BAD_EXC_ACCESS)

I don't even have try to call anything in the class. Just adding the
header file makes it fault.

This is a mixed Objective-C/C++ project on 10.3 using Xcode.

If I run the application in the debugger the fault occurs at the following
call

vtkInstantiatorHashTable::Hash(char const*)

which follows

vtkInstantiatorHashTable:Insert(char const*, vtkObject* (*)())

It is the same call that faults every time.

Can anyone shed some light on what is going on here, or point me to an
example of a call to a vtkCocoaGLView subclass from any Objective-C code
(infact, any number of Cocoa and VTK examples would be great)? There is an
example on MacDevCenter, but that example never has the Objective-C code
directly calling the custom view code; it only accesses the view via the
NIB.

I ultimately need to pass a file name to an object that uses data to
instantiate a new view, but including any headers of anything that
includes VTK in my Objective-C causes the fault. There are no warnings
during complilation that indicate this might happen.

Thanks

Albion

Albion E. Baucom
http://rna.ucsc.edu/albion
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: VTK and Cocoa on Mac OS X
      • From: p3consulting <email@hidden>
    • Re: VTK and Cocoa on Mac OS X
      • From: Drew McCormack <email@hidden>
  • Prev by Date: Re: Applescript error - NSCannotCreateScriptCommandError
  • Next by Date: Re: XCode 1.2 via Software Update?
  • Previous by thread: [ANN] Custom window code
  • Next by thread: Re: VTK and Cocoa on Mac OS X
  • Index(es):
    • Date
    • Thread