- 
    Bug 
- 
    Resolution: Done
- 
    P1: Critical 
- 
    5.0.0
- 
    None
- 
    OS X 10.7 - Ubuntu 12.04
 Ubuntu 11.10
- 
        
- 
        1bd710cbc77f71451527b9436c2d8935d8526bd5
QWidget::showFullScreen() crashes if widget has 0 margins layout.
Doesn't crash on qt4 or when margin != 0.
The minimal example to reproduce the crash:
#include <QApplication> #include <QWidget> #include <QBoxLayout> int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget w; QBoxLayout *layout = new QVBoxLayout; layout->setMargin(0); w.setLayout(layout); w.showFullScreen(); return a.exec(); }
Backtrace:
	0   CoreFoundation                      0x00007fff97fcdfc6 __exceptionPreprocess + 198
	1   libobjc.A.dylib                     0x00007fff9444fd5e objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff97fcddfa +[NSException raise:format:arguments:] + 106
	3   Foundation                          0x00007fff982e4743 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
	4   AppKit                              0x00007fff8fb37162 -[_NSFullScreenTransition makeAndSetupOverlayWindow] + 269
	5   AppKit                              0x00007fff8fb39517 -[_NSWindowFullScreenTransition enterFullScreenTransitionForWindow:animated:activatingIt:] + 505
	6   AppKit                              0x00007fff8f4b0223 -[NSWindow _enterFullScreenMode:animating:activating:] + 275
	7   libqcocoa.dylib                     0x000000010170a5ef _ZN12QCocoaWindow15syncWindowStateEN2Qt11WindowStateE + 143
	8   libqcocoa.dylib                     0x000000010170a341 _ZN12QCocoaWindow10setVisibleEb + 321
	9   QtGui                               0x0000000100688e23 _ZN7QWindow10setVisibleEb + 211
	10  QtWidgets                           0x0000000100083b7d _ZN14QWidgetPrivate8show_sysEv + 957
	11  QtWidgets                           0x000000010006766e _ZN14QWidgetPrivate11show_helperEv + 398
	12  QtWidgets                           0x0000000100067f9c _ZN7QWidget10setVisibleEb + 684
	13  QtWidgets                           0x000000010005e5a4 _ZN7QWidget14showFullScreenEv + 52
	14  fullscreen_test                     0x00000001000034e3 main + 195
- resulted in
- 
                    QTBUG-27602 Problem with showFullScreen on Ubuntu -         
- Closed
 
-