[PyQt] [Interest] Myanmar-QWERTY crashes OS X application
Timothy W. Grove
tim_grove at sil.org
Mon Aug 22 20:30:59 BST 2016
I don't think you are doing anything wrong; perhaps even doing something
right! My development and testing has been on Mavericks where I am
seeing the problems, but when I try the same things on El Capitan (in a
Parallels Virtual Machine) there don't seem to be any issues. More
testing is needed and I'll see if I have the same 'success' with my full
PyQt application on El Capitan. Thanks for the reply.
Best regards, Tim
On 22/08/2016 09:14, Alexandru Croitor wrote:
> Hi,
>
> I tried reproducing your issue, and wasn't successful, no crash happens.
> I have OSX 10.11.5, Official Qt 5.7.0, only two languages installed,
> British and Myanmar-QWERTY, and I'm using the auto-generated
> Qt-Creator QMainWindow example.
>
> After launching the application, I try to switch the languages around
> with hotkey, with clicking in the top-right language corner, and by
> changing the language directly in System Preferences -> Keyboard ->
> Input Sources.
>
> No crash is happening. What am I doing wrong?
>
> Regards, Alex.
>
>> On 19 Aug 2016, at 20:13, Timothy W. Grove <tim_grove at sil.org
>> <mailto:tim_grove at sil.org>> wrote:
>>
>> Well, my first experiences working with QtCreator directly and I'm
>> seeing the same issues. I guess that points to bugs in Qt itself and
>> lets Phil Thompson at riverbankcomputing off of the hook! If not
>> here, where should I report the problem? Sample program below
>> followed by some error reports. The errors occur when switching back
>> and forth between 'British' and 'Myanmar-QWERTY' in system
>> preferences in OS X.
>>
>> Best regards,
>> Timothy Grove
>>
>>
>> *Test program:*
>>
>> #include "mainwindow.h"
>> #include "ui_mainwindow.h"
>>
>> MainWindow::MainWindow(QWidget *parent) :
>> QMainWindow(parent),
>> ui(new Ui::MainWindow)
>> {
>> ui->setupUi(this);
>> }
>>
>> MainWindow::~MainWindow()
>> {
>> delete ui;
>> }
>>
>>
>>
>> *Errors reported in QtCreator console:*
>>
>> Starting /Users/timothy/QtProjects/build-SooSL-Desktop_Qt_5_7_0_clang_64bit-Debug/SooSL.app/Contents/MacOS/SooSL...
>> 2016-08-19 18:42:39.108 SooSL[1354:507] -[NSHIObject length]: unrecognized selector sent to instance 0x7fe153d1d560
>> 2016-08-19 18:42:39.108 SooSL[1354:507] -[NSHIObject length]: unrecognized selector sent to instance 0x7fe153d1d560
>> 2016-08-19 18:42:39.110 SooSL[1354:507] (
>> 0 CoreFoundation 0x00007fff879d225c __exceptionPreprocess + 172
>> 1 libobjc.A.dylib 0x00007fff8d27de75 objc_exception_throw + 43
>> 2 CoreFoundation 0x00007fff879d512d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
>> 3 CoreFoundation 0x00007fff87930272 ___forwarding___ + 1010
>> 4 CoreFoundation 0x00007fff8792fdf8 _CF_forwarding_prep_0 + 120
>> 5 QtCore 0x000000010a2bb876 _ZN9QCFString9toQStringEPK10__CFString + 54
>> 6 libqcocoa.dylib 0x000000010c741ac7 _ZN18QCocoaInputContext12updateLocaleEv + 87
>> 7 CoreFoundation 0x00007fff879a0e0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
>> 8 CoreFoundation 0x00007fff8789482d _CFXNotificationPost + 2893
>> 9 Foundation 0x00007fff89f62e4a -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
>> 10 CoreFoundation 0x00007fff879a0e0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
>> 11 CoreFoundation 0x00007fff87962f79 ____CFXNotificationPostToken_block_invoke + 137
>> 12 CoreFoundation 0x00007fff8790348c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
>> 13 CoreFoundation 0x00007fff878f4ae5 __CFRunLoopDoBlocks + 341
>> 14 CoreFoundation 0x00007fff878f486e __CFRunLoopRun + 1982
>> 15 CoreFoundation 0x00007fff878f3e75 CFRunLoopRunSpecific + 309
>> 16 HIToolbox 0x00007fff8aff3a0d RunCurrentEventLoopInMode + 226
>> 17 HIToolbox 0x00007fff8aff37b7 ReceiveNextEventCommon + 479
>> 18 HIToolbox 0x00007fff8aff35bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
>> 19 AppKit 0x00007fff9189d24e _DPSNextEvent + 1434
>> 20 AppKit 0x00007fff9189c89b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
>> 21 AppKit 0x00007fff9189099c -[NSApplication run] + 553
>> 22 libqcocoa.dylib 0x000000010c71c53f _ZN21QCocoaEventDispatcher13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 2191
>> 23 QtCore 0x000000010a266eb1 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 401
>> 24 QtCore 0x000000010a26b115 _ZN16QCoreApplication4execEv + 341
>> 25 SooSL 0x00000001093eb12b main + 91
>> 26 libdyld.dylib 0x00007fff8ea2c5fd start + 1
>> )
>> On 19/08/2016 16:48, timur.kristof at gmail.com wrote:
>>> Can you create a simple example app without Python, to see if it really is Qt's fault?
>>>
>>> (Just create an app with Qt Creator and run it. As far as I understand, you use QWidgets, right? If so, create an empty QWitgets project, run and see how it goes.)
>>>
>>> On Fri Aug 19 13:33:58 2016 GMT+0200, Timothy W. Grove wrote:
>>>> Changing the keyboard input source on OS X back and forth between
>>>> 'British' and 'Myanmar-QWERTY' crashes my PyQt v5.7 application after
>>>> about three changes, usually corrupting an attached sqlite database as
>>>> well. 'Myanmar-QWERTY' is the only input source that I'm having trouble
>>>> with; all others that I've tested so far appear okay. The windows
>>>> version of the application also seems okay. My application is fairly
>>>> complex, but I'm seeing this issue even with an absolute minimal app
>>>> containing only one window. I'm not certain if the issue is with PyQt or
>>>> Qt or the input source itself, but it doesn't appear to be with python
>>>> as a Tkinter app worked okay.
>>>>
>>>> Any answers would be great, but if anyone could suggest where to find a
>>>> solution that would also be helpful. This is a pretty obscure bug, but
>>>> finding a solution or work-around is important to the application I'm
>>>> developing. Thank you.
>>>>
>>>> Best regards,
>>>> Timothy Grove
>>>>
>>>>
>>>> Test program:
>>>>
>>>> #!/usr/bin/env python3
>>>> # -*- coding: utf-8 -*-
>>>>
>>>> import sys
>>>> from PyQt5.QtWidgets import QMainWindow
>>>> from PyQt5.QtWidgets import QTextEdit
>>>> from PyQt5.QtWidgets import QApplication
>>>>
>>>> class MainWindow(QMainWindow):
>>>> def __init__(self, parent=None):
>>>> super(MainWindow, self).__init__(parent)
>>>>
>>>> text = QTextEdit()
>>>> self.setCentralWidget(text)
>>>>
>>>> if __name__ == "__main__":
>>>> app = QApplication(sys.argv)
>>>>
>>>> mw = MainWindow()
>>>> mw.show()
>>>>
>>>> sys.exit(app.exec_())
>>>>
>>>> _______________________________________________
>>>> Interest mailing list
>>>> Interest at qt-project.org
>>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>>
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org <mailto:Interest at qt-project.org>
>> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160822/da04c220/attachment.html>
More information about the PyQt
mailing list