[vtkusers] Qt, VTK and Mac OSX 10.6.1

Anja Ende anja.ende at googlemail.com
Thu Dec 17 13:33:13 EST 2009


Hello,

So I rebuild Qt with arch option set to x86_64 and then compiled VTK
with the same option and everything compiled fine.

However, when I run my application (compiled using the same
architecture flag) it crashes with the following error:

009-12-17 18:30:08.105 ConeViewer[13120:903] -[QCocoaView
userSpaceScaleFactor]: unrecognized selector sent to instance
0x101c55c00
2009-12-17 18:30:08.107 ConeViewer[13120:903] An uncaught exception was raised
2009-12-17 18:30:08.108 ConeViewer[13120:903] -[QCocoaView
userSpaceScaleFactor]: unrecognized selector sent to instance
0x101c55c00
2009-12-17 18:30:08.111 ConeViewer[13120:903] *** Terminating app due
to uncaught exception 'NSInvalidArgumentException', reason:
'-[QCocoaView userSpaceScaleFactor]: unrecognized selector sent to
instance 0x101c55c00'
*** Call stack at first throw:
(
	0   CoreFoundation                      0x00007fff825165a4
__exceptionPreprocess + 180
	1   libobjc.A.dylib                     0x00007fff81a05313
objc_exception_throw + 45
	2   CoreFoundation                      0x00007fff8256f2a0
+[NSObject(NSObject) doesNotRecognizeSelector:] + 0
	3   CoreFoundation                      0x00007fff824e930f
___forwarding___ + 751
	4   CoreFoundation                      0x00007fff824e5458
_CF_forwarding_prep_0 + 232
	5   ConeViewer                          0x0000000100120e9a
_ZN20vtkCocoaRenderWindow13CreateAWindowEv + 1172
	6   ConeViewer                          0x000000010011f6a9
_ZN20vtkCocoaRenderWindow10InitializeEv + 303
	7   ConeViewer                          0x000000010011d98a
_ZN20vtkCocoaRenderWindow5StartEv + 34
	8   ConeViewer                          0x000000010009d528
_ZN15vtkRenderWindow14DoStereoRenderEv + 34
	9   ConeViewer                          0x000000010009dba5
_ZN15vtkRenderWindow10DoFDRenderEv + 1267
	10  ConeViewer                          0x000000010009e350
_ZN15vtkRenderWindow10DoAARenderEv + 1960
	11  ConeViewer                          0x000000010009eb5d
_ZN15vtkRenderWindow6RenderEv + 2059
	12  ConeViewer                          0x00000001000a89ba
_ZN25vtkRenderWindowInteractor6RenderEv + 78
	13  ConeViewer                          0x0000000100126304
_ZN10QVTKWidget10paintEventEP11QPaintEvent + 418
	14  QtGui                               0x0000000100bdf50e
_ZN7QWidget5eventEP6QEvent + 2094
	15  ConeViewer                          0x0000000100126b8d
_ZN10QVTKWidget5eventEP6QEvent + 377
	16  QtGui                               0x0000000100b8788d
_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 189
	17  QtGui                               0x0000000100b8e064
_ZN12QApplication6notifyEP7QObjectP6QEvent + 1284
	18  QtCore                              0x00000001017b64cc
_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent + 124
	19  QtGui                               0x0000000100b87a8c
_Z23qt_sendSpontaneousEventP7QObjectP6QEvent + 44
	20  QtGui                               0x0000000100b35f9a
-[QCocoaView drawRect:] + 954
	21  AppKit                              0x00007fff851c938a -[NSView
_drawRect:clip:] + 3390
	22  AppKit                              0x00007fff851c7ffd -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1325
	23  AppKit                              0x00007fff851c8367 -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2199
	24  AppKit                              0x00007fff851c8367 -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2199
	25  AppKit                              0x00007fff851c8367 -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2199
	26  AppKit                              0x00007fff851c66cf -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
+ 767
	27  AppKit                              0x00007fff851c61f3
-[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
+ 254
	28  AppKit                              0x00007fff851c2a97 -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] +
2683
	29  AppKit                              0x00007fff8513c237 -[NSView
displayIfNeeded] + 969
	30  AppKit                              0x00007fff851042c7 -[NSWindow
_reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] +
1050
	31  AppKit                              0x00007fff85103e5c -[NSWindow
orderWindow:relativeTo:] + 94
	32  AppKit                              0x00007fff851017da -[NSWindow
makeKeyAndOrderFront:] + 46
	33  QtGui                               0x0000000100b30243
_ZN14QWidgetPrivate8show_sysEv + 1107
	34  QtGui                               0x0000000100bdde68
_ZN14QWidgetPrivate11show_helperEv + 408
	35  QtGui                               0x0000000100bde19f
_ZN7QWidget10setVisibleEb + 511
	36  QtGui                               0x0000000100bce53a
_ZN7QWidget13showMaximizedEv + 90
	37  ConeViewer                          0x00000001000138ab main + 603
	38  ConeViewer                          0x000000010001363c start + 52
)
terminate called after throwing an instance of 'NSException'
Abort trap

I saw one post reporting a similar error and a post from Clinton
saying the error is in the CVS. Has this not been ported to VTK 5.4?
Can someone tell me what I need to change to get this working??

Cheers,

Anja


2009/12/17 Anja Ende <anja.ende at googlemail.com>:
> Hello,
>
> Thanks for the replies. I tried both i386 and x86_64 and the same
> errors happened both times :(
>
> I will try a different version of Qt and see if I can sort it out.
>
> Cheers,
> Anja
>
> 2009/12/16 Clinton Stimpson <clinton at elemtech.com>:
>>
>> On Wednesday 16 December 2009 03:32:58 pm Anja Ende wrote:
>>> Thanks for that. I saw the posts as well.
>>>
>>> http://www.qtcentre.org/forum/f-installation-and-deployment-5/t-snow-leopar
>>>d-broke-my-qt-23679.html#post114892
>>>
>>> However, I have a quick question. So, I have Qt installed and I am
>>> trying to build VTK, which does not use a PRO file. Do you know which
>>> VTK CMAKE variable should be changed to have this effect. I tried
>>> changing CMAKE_OSX_ARCHITECTURE to x86 and that did not help.
>>
>> Oh, so you were doing a 64 bit build before?
>> Just set CMAKE_OSX_ARCHITECTURES to i386.
>>
>> Clint
>>
>>>
>>> Many thanks,
>>>
>>> Anja
>>>
>>> 2009/12/16 Clinton Stimpson <clinton at elemtech.com>:
>>> > Qt 4.5 isn't officially supported on Mac 10.6, but there are workarounds.
>>> > The Qt blogs and forums talk about that specific compile error.
>>> >
>>> > Clint
>>> >
>>> > On Wednesday 16 December 2009 04:56:19 am Anja Ende wrote:
>>> >> Hello,
>>> >>
>>> >> I am trying to get Qt version 4.5.2 working on a Macbook running OSX
>>> >> version 10.6.1.
>>> >>
>>> >> I am using the latest VTK version and actually tried various Qt 4
>>> >> versions but they all fail with the following error:
>>> >>
>>> >> /Library/Frameworks/QtGui.framework/Headers/qregion.h: In member
>>> >> function ‘OpaqueRgnHandle* QRegion::handle(bool) const’:
>>> >> /Library/Frameworks/QtGui.framework/Headers/qregion.h:158: error:
>>> >> ‘toQDRgn’ was not declared in this scope
>>> >>
>>> >> I guess this error is really coming from Qt rather than VTK but I was
>>> >> wondering if someone has experienced this here and have found some way
>>> >> to work around it. Maybe I need to configure Qt in a special way to
>>> >> get this working?
>>> >>
>>> >> Any ideas what I could try? Would be very grateful for your help.
>>> >>
>>> >> Cheers,
>>> >>
>>> >> Anja
>>> >> _______________________________________________
>>> >> Powered by www.kitware.com
>>> >>
>>> >> Visit other Kitware open-source projects at
>>> >> http://www.kitware.com/opensource/opensource.html
>>> >>
>>> >> Please keep messages on-topic and check the VTK FAQ at:
>>> >> http://www.vtk.org/Wiki/VTK_FAQ
>>> >>
>>> >> Follow this link to subscribe/unsubscribe:
>>> >> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
>
>
> --
> Cheers,
>
> Anja
>



-- 
Cheers,

Anja



More information about the vtkusers mailing list