Good to hear that the segmentation violations are not there for principle reasons. I had started to believe that one has to accept this for efficiently wrapping a C++ library.
That particular situation was quite complicated; the problem occurred in the run() method of a QThread. I will look if I can reduce this to something simple. An easy way to see a segmentation violation on the Mac is going fullscreen with unifiedTitleAndToolbarOnMac(True). I am attaching an example. Left button crashes, right button shows a workaround. There are even more problems with fullscreen on the Mac, which believe to be not related to PySide though: When your mainWindow has got a Qt.Drawer subwindow, there will be artefacts on the left hand side of the screen after returning from fullscreen. If someone with the problem comes across this mail, I have got a workaround. I am looking into this for my App because after Steve Job's latest announcements and ideas it might well be that in a few months everybody will ask for a fullscreen option. - Another question: I usually compile the head version from the git repository on (virtual) Ubuntu myself. When I tried on the Mac a few weeks ago I did not succeed. Does this work meanwhile, or are there reliable instructions somewhere? Thomas On Dec 4, 2010, at 3:32 AM, Thomas Perl wrote: > Hi Thomas, > > 2010/12/3 Thomas Sturm <st...@redlog.eu>: >> Major problem, i.e. the segmentation violation, resolved! That was my fault. >> I had missed calling a constructor of a superclass in some __init__() plus >> accessed a non-existent attribute of a corresponding instance. > > Can you create a minimalistic example of these omissions you did that > reliably reproduces the segfault? IMHO even if you write wrong Python > code or access something that is not there, the result should be a > Python-level exception or at least some helpful abort message, but > never a segfault. It would be good if you could come up with a > minimalistic example to reproduce the crash and then file a bug report > about it (attaching the example code) at http://bugs.openbossa.org/ - > thanks :) > > Thomas -- Dr. habil. Thomas Sturm Departamento de Matematicas, Estadistica y Computacion Universidad de Cantabria, Santander, Spain Avda. Los Castros s/n, Room 1072, +34 693 251058 http://personales.unican.es/sturmt/
#!/usr/bin/env python import sys from PySide.QtGui import QAction from PySide.QtGui import QApplication from PySide.QtGui import QStatusBar from PySide.QtGui import QToolBar from PySide.QtGui import QMainWindow class Window(QMainWindow): def __init__(self): super(Window,self).__init__() self.toolBar = QToolBar() self.fullScreenAct = QAction(self.tr("Toggle Full Screen"), self, triggered=self.toggleFullScreen) self.saferFullScreenAct = QAction(self.tr("Safer Toggle Full Screen"), self, triggered=self.saferToggleFullScreen) self.toolBar.addAction(self.fullScreenAct) self.toolBar.addAction(self.saferFullScreenAct) self.addToolBar(self.toolBar) self.setUnifiedTitleAndToolBarOnMac(True) self.isFullScreen = False self.setStatusBar(QStatusBar(self)) self.raise_() self.show() def toggleFullScreen(self): if self.isFullScreen: self.showNormal() self.isFullScreen = False else: self.showFullScreen() self.isFullScreen = True def saferToggleFullScreen(self): self.setUnifiedTitleAndToolBarOnMac(False) if self.isFullScreen: self.showNormal() self.isFullScreen = False else: self.showFullScreen() self.isFullScreen = True self.setUnifiedTitleAndToolBarOnMac(True) app = QApplication(sys.argv) mainwindow = Window() sys.exit(app.exec_())
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ PySide mailing list PySide@lists.openbossa.org http://lists.openbossa.org/listinfo/pyside