Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. macOS Sierra + Qt 5.6.2 = ApplePersistenceIgnoreState issue?
QtWS25 Last Chance

macOS Sierra + Qt 5.6.2 = ApplePersistenceIgnoreState issue?

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 2 Posters 2.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    agarny
    wrote on last edited by
    #1

    Hi,

    I have recently upgraded to Qt 5.6.2 and I don't know whether it is directly to it, but on macOS, my application now shows a message like this one:

    2016-10-13 16:14:32.843 OpenCOR[3340:929508] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/bp/8jz3rpfx5c91z2qgx7jfv9180000gn/T/ws.opencor.2016-10-13.savedState
    

    I initially thought that it might have something to do with macOS Sierra, so I decided to try the previous version of my application (which was compiled using Qt 5.6.1) and everything is fine, i.e. I am not geting that ApplePersistenceIgnoreState related message.

    If I then go back to my Qt 5.6.2 based application, the message is back...

    Any ideas anyone?

    Cheers, Alan.

    P.S.: FWIW, I have googled for a solution and came across this, but even if their 'fix' could be applied to my situation, this is clearly not something that I am willing to ask my users to do...

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agarny
      wrote on last edited by
      #2

      Hmm, I have just realised that a possible culprit could be Xcode 8, to which I have also upgraded lately...

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        You can find here the use of ApplePersistenceIgnoreState.

        And here how to shut off the message here.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • A Offline
          A Offline
          agarny
          wrote on last edited by
          #4

          I must be missing something because I cannot find anything using your first link.

          As for your second link, it is the one I mentioned in my P.S., and it corresponds to what I don't want to have to do that to shut off that message. It's just not a neat solution. I mean that an end-user shouldn't have to enter that kind of a command at the terminal.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            agarny
            wrote on last edited by
            #5

            Oops, my bad regarding your first link. I had originally done a search for ApplePersistenceIgnoreState on that page, but it hadn't returned anything, but it does now. Not sure what happened!

            Anyway, in the end, I think I might be able to apply the solution in the second link, this directly from my application. Will check that tomorrow...

            1 Reply Last reply
            0
            • A Offline
              A Offline
              agarny
              wrote on last edited by
              #6

              It looks like ApplePersistenceIgnoreState might (only?) be for debugging purposes. Hmm, I am pretty certain that I was running the debug version of my application when I got that message. I am therefore wondering whether I will still get it with the release version of my application... (Sorry, thinking aloud here... :))

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Not a bad idea to share your thinking, it's a valid check.

                Can you also test whether you have the same happening with 5.6.1 ?

                There might be something that changed with Sierra or Qt 5.6.2.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  agarny
                  wrote on last edited by
                  #8

                  With regards to Qt 5.6.1, I did try with the previous (release, not debug) version of my application (which was indeed built using Qt 5.6.1), and it didn't generate the aforementioned ApplePersistenceIgnoreState message.

                  All I think I know at this stage is that (on macOS Sierra):

                  • Release w/ Qt 5.6.1 = fine.
                  • Debug w/ Qt 5.6.2 = not fine.

                  I can definitely try Release w/ Qt 5.6.2, but it would be a bit tedious to try Debug w/ Qt 5.6.1 since I upgraded to Xcode 8 and Qt 5.6.1 is known not to work with Xcode 8 out of the box.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    agarny
                    wrote on last edited by
                    #9

                    Hmm... not sure how and/or why, but (after having restarted my MBP) everything is now fine... In other words, I am not (for now at least) getting that ApplePersistenceIgnoreState message anymore...

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      agarny
                      wrote on last edited by
                      #10

                      FWIW, I now simply have this at the beginning of my main() method, thus 'fixing' my original problem:

                      #ifdef Q_OS_MAC
                          QProcess::execute("defaults",
                                            QStringList() << "write"
                                                          << "ws.opencor"
                                                          << "ApplePersistenceIgnoreState"
                                                          << "NO");
                      #endif
                      
                      
                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved