Author Topic: PI Hang Saving Files  (Read 1755 times)

Offline M44DSW

  • Newcomer
  • Posts: 14
PI Hang Saving Files
« on: 2017 February 05 23:47:49 »
Hi, I keep having PI hang when saving a files, any type and if I am slightly too quick in trying to do something else in the UI such as access another menu or minimise an image. I have Mac OSX El Capitan 10.11.6 and PI ver 01.08.04.1195. It is a real problem for me. Any ideas? I can send a screenshot and recreate.
Thanks
Dave

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PI Hang Saving Files
« Reply #1 on: 2017 February 06 11:13:17 »
Please post how to reproduce. I have observed this Mac hang and lost work multiple times but have not been able to reproduce it reliably.

Thanks,
Mike

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: PI Hang Saving Files
« Reply #2 on: 2017 February 06 11:17:50 »
just fyi i have seen this as well and others have reported it. i think juan acknowledged that it is likely some Qt problem and was hoping it would go away with the next upgrade of Qt.

hopefully juan can remind us...

rob

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PI Hang Saving Files
« Reply #3 on: 2017 February 07 00:44:39 »
I am working on a new version 1.8.5 of PixInsight based on the latest Qt 5.8.0. I'll release it ASAP as a transitional version without most of the new features I have planned, just trying to solve these recurring problems on macOS, along with other issues on Windows. I already have it built on Linux and it works extremely well, so fingers crossed!

As for these freezes when saving files, Mike has been reporting some of them, as well as other users. I cannot reproduce this problem, as you are describing it, on any of our working macOS machines. I was able to reproduce a hang when saving a file, just once, after trying *very* hard clicking and hitting keys very quickly. It looked like an event synchronization problem. So the bug exists, but I can't reproduce it consistently. Hopefully the new version will fix all of these issues.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PI Hang Saving Files
« Reply #4 on: 2017 February 08 11:47:24 »
Thanks Juan,

The problem seems consistent in that the process console window is always open when the UI hang occurs.

I previously disabled Global Preferences > Special GUI effects > Animate Autohide windows. The hang still occurs.

So is it possible to avoid opening the process console window completely during the save as process?

In the interim, I wrote a script, which does the save as with the console hidden.

So far it avoids the UI hang, but more trial is needed to see if the problem is really resolved.

Thanks,
Mike

Code: [Select]
// An approximate emulation of File > Save as...

// A proposed workaround for the Pixinsight 1195, Mac OS X El Capitan process
// console UI hang.

#include <pjsr/DataType.jsh>

#define VERSION "1.03"

function main() {
   if (Parameters.isViewTarget) {
      var targetWindow = Parameters.targetView.window;
   }
   else {
      var targetWindow = ImageWindow.activeWindow;
   }

   if (targetWindow == null || !targetWindow.isWindow) {
      return;
   }

   var directory = Settings.read("directory", DataType_String);
   if (directory == null || !File.directoryExists(directory)) {
      directory = File.currentWorkingDirectory;
   }

   console.hide();

   var saveFileDialog = new SaveFileDialog;

   saveFileDialog.initialPath =
      targetWindow.filePath != "" ?
         targetWindow.filePath :
         directory + "/" +
            targetWindow.mainView.fullId +
            Settings.readGlobal(
               "ImageWindow/DefaultFileExtension", DataType_UCString
            );

   saveFileDialog.loadImageFilters();
   saveFileDialog.selectedFileExtension =
      targetWindow.filePath != "" ?
         File.extractExtension(targetWindow.filePath) :
         Settings.readGlobal(
            "ImageWindow/DefaultFileExtension", DataType_UCString
         );

   if (!saveFileDialog.execute()) {
      return;
   }

   targetWindow.saveAs(
      saveFileDialog.fileName, true, true, false, false
   );

   Settings.write(
      "directory",
      DataType_String,
      File.extractDrive(saveFileDialog.fileName) +
         File.extractDirectory(saveFileDialog.fileName)
   );
}

main();

gc();
« Last Edit: 2017 February 08 17:13:58 by mschuster »