[Development] QMacCocoaViewContainer changes?

Timur Pocheptsov timur.pocheptsov at qt.io
Fri Feb 17 06:39:44 CET 2017


Hello,


could you, please, create a JIRA ticket for this (if not done yet)?

I remember some changes - but it was 5.6, so 5.7.1 would be also broken then ...


Best regards,

    Timur.

________________________________
From: Development <development-bounces+timur.pocheptsov=qt.io at qt-project.org> on behalf of René J.V. Bertin <rjvbertin at gmail.com>
Sent: Thursday, February 16, 2017 11:21:52 PM
To: development at qt-project.org
Cc: Harald Sitter
Subject: [Development] QMacCocoaViewContainer changes?

Hello,

Has anything changed in Qt 5.8.0 with the way the QMacCocoaViewContainer class has to be used? I observe the following after updating from 5.7.1 to 5.8.0 :

- Qt Designer crashes when I have Phonon 4.9.x installed with the phonon-backend-vlc git/master backend (https://cgit.kde.org/phonon-vlc.git/).
- the QMacCocoaViewContainer ctor now also calls QMacCocoaViewContainer::setCocoaView() when a NULL NSView pointer is given.
- the QMacCocoaViewContainer example no longer releases the native view after passing it to setCocoaView(), despite what the documentation says, and despite the fact that setCocoaView indeed does a retain. Not releasing the VideoView instance in phonon-vlc's VlcMacWidget ctor also prevents the Designer crash but theoretically means the instance is being leaked.

The Designer crash is preceded by the terminal output below and occurs in ~QMacCocoaViewContainer(), when doing [nsview release]. This means it's doing one release too many, as confirmed by the malloc error.
qt.qpa.cocoa.window: NSView is not QNSView, consider checking for Qt::ForeignWindow
qt.qpa.cocoa.window: NSView is not QNSView, consider checking for Qt::ForeignWindow
Designer(97879,0x7fff721fd310) malloc: *** error for object 0x7fc7cf2a3300: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug


Thanks,
R.
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170217/458d9e5e/attachment.html>


More information about the Development mailing list