Closed lls115 closed 1 year ago
Thanks for your report.
The segfault appears to be in QT. That said maybe we are passing bad stuff to it.
Need more information:
i = QImage(glyph.data, self.w, self.h, QImage.Format_Mono)
self.bitmap = QPixmap.fromImageInPlace(i)
#self.bitmap = QBitmap.fromData(QSize(self.w, self.h), glyph.data, QImage.Format_Mono)
With the above code ,get an error "QPixmap: Must construct a QGuiApplication before a QPixmap"
so add "app = QApplication(sys.argv)" in main(), The problem is resolved. also with
#i = QImage(glyph.data, self.w, self.h, QImage.Format_Mono)
#self.bitmap = QPixmap.fromImageInPlace(i)
self.bitmap = QBitmap.fromData(QSize(self.w, self.h), glyph.data, QImage.Format_Mono)
i = QImage(glyph.data, self.w, self.h, QImage.Format_Mono) self.bitmap = QPixmap.fromImageInPlace(i) #self.bitmap = QBitmap.fromData(QSize(self.w, self.h), glyph.data, QImage.Format_Mono)
With the above code ,get an error "QPixmap: Must construct a QGuiApplication before a QPixmap"
so add "app = QApplication(sys.argv)" in main(), The problem is resolved. also with
#i = QImage(glyph.data, self.w, self.h, QImage.Format_Mono) #self.bitmap = QPixmap.fromImageInPlace(i) self.bitmap = QBitmap.fromData(QSize(self.w, self.h), glyph.data, QImage.Format_Mono)
Thank you
I investigated this a little bit more today and I'm not willing to blindly integrate the suggested fix without context.
Thanks
I think I can finally reproduce this bug here with the replay file provided in #428
Likely fixed with #429. Please re-open if its not the case.