<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>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.<br>
    </p>
    <p>Best regards, Tim<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 22/08/2016 09:14, Alexandru Croitor
      wrote:<br>
    </div>
    <blockquote cite="mid:3C83E797-B050-4008-81CD-EE2F8C22DFBF@qt.io"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div class="">Hi,</div>
      <div class=""><br class="">
      </div>
      <div class="">I tried reproducing your issue, and wasn't
        successful, no crash happens.</div>
      <div class="">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.</div>
      <div class=""><br class="">
      </div>
      <div class="">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.</div>
      <div class=""><br class="">
      </div>
      <div class="">No crash is happening. What am I doing wrong?</div>
      <div class=""><br class="">
      </div>
      <div class="">Regards, Alex.</div>
      <br class="">
      <div>
        <blockquote type="cite" class="">
          <div class="">On 19 Aug 2016, at 20:13, Timothy W. Grove <<a
              moz-do-not-send="true" href="mailto:tim_grove@sil.org"
              class="">tim_grove@sil.org</a>> wrote:</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <div bgcolor="#FFFFFF" text="#000000" class="">
              <p class="">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.<br
                  class="">
              </p>
              <p class="">Best regards,<br class="">
                Timothy Grove</p>
              <p class=""><br class="">
              </p>
              <p class=""><b class="">Test program:</b><br class="">
              </p>
              <pre class="" wrap="">#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}



<font class="" size="+1"><b class="">Errors reported in QtCreator console:</b></font>

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
)
</pre>
              <div class="moz-cite-prefix">On 19/08/2016 16:48, <a
                  moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="mailto:timur.kristof@gmail.com">
                  timur.kristof@gmail.com</a> wrote:<br class="">
              </div>
              <blockquote
                cite="mid:n64tt2.oc5ylp.rtj4f1-qmf@smtp.gmail.com"
                type="cite" class="">
                <pre class="" wrap="">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:
</pre>
                <blockquote type="cite" class="">
                  <pre class="" wrap="">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
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Interest@qt-project.org">Interest@qt-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/interest">http://lists.qt-project.org/mailman/listinfo/interest</a>

</pre>
                </blockquote>
              </blockquote>
              <br class="">
            </div>
            _______________________________________________<br class="">
            Interest mailing list<br class="">
            <a moz-do-not-send="true"
              href="mailto:Interest@qt-project.org" class="">Interest@qt-project.org</a><br
              class="">
            <a class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/interest">http://lists.qt-project.org/mailman/listinfo/interest</a><br
              class="">
          </div>
        </blockquote>
      </div>
      <br class="">
    </blockquote>
    <br>
  </body>
</html>