Author Topic: Persistent Pixinsight PCL Win32 System Exception Errors  (Read 314 times)

Offline Macstronomy

  • Newcomer
  • Posts: 7
    • View Profile
Hi - I'm getting a lot of these errors when using the writeJpeg script. 

Reading image:
E:/e-eye Data/Iris Nebula/Iris Green/NGC 7023 Iris Nebula-G-0001.xisf
Loading image: w=4096 h=4096 n=1 Gray UInt16
45 FITS keyword(s) extracted.

run --execute-mode=auto "C:/Program Files/PixInsight/src/scripts/WriteJPEG.js"

Processing script file: C:/Program Files/PixInsight/src/scripts/WriteJPEG.js
*** PCL Win32 System Exception: At address 00007FFDD36D45F8 with exception code C0000005 :
Access violation: invalid memory read operation at address 0000000000000008


Reading 1 image(s):
E:/e-eye Data/Iris Nebula/Iris Green/NGC 7023 Iris Nebula-G-0007.fits
** Warning: Deprecated format: FITS
45 FITS keywords extracted.
Reading FITS image: 16-bit integers, 1 channel(s), 4096x4096 pixels: done

run --execute-mode=auto "C:/Program Files/PixInsight/src/scripts/WriteJPEG.js"

Processing script file: C:/Program Files/PixInsight/src/scripts/WriteJPEG.js
*** PCL Win32 System Exception: At address 00007FFDD36D45F8 with exception code C0000005 :
Access violation: invalid memory read operation at address 0000000000000008


Reading image:
E:/e-eye Data/Iris Nebula/Iris Green/NGC 7023 Iris Nebula-G-0001.xisf
Loading image: w=4096 h=4096 n=1 Gray UInt16
45 FITS keyword(s) extracted.

run --execute-mode=auto "C:/Program Files/PixInsight/src/scripts/WriteJPEG.js"

Processing script file: C:/Program Files/PixInsight/src/scripts/WriteJPEG.js
*** PCL Win32 System Exception: At address 00007FFDD36D45F8 with exception code C0000005 :
Access violation: invalid memory read operation at address 0000000000000008

Reading image:
E:/e-eye Data/Iris Nebula/Iris Green/NGC 7023 Iris Nebula-G-0001.xisf
Loading image: w=4096 h=4096 n=1 Gray UInt16
45 FITS keyword(s) extracted.

run --execute-mode=auto "C:/Program Files/PixInsight/src/scripts/WriteJPEG.js"

Processing script file: C:/Program Files/PixInsight/src/scripts/WriteJPEG.js
*** PCL Win32 System Exception: At address 00007FFDD36D45F8 with exception code C0000005 :
Access violation: invalid memory read operation at address 0000000000000008


run --execute-mode=auto "C:/Program Files/PixInsight/src/scripts/WriteJPEG.js"

Processing script file: C:/Program Files/PixInsight/src/scripts/WriteJPEG.js
*** PCL Win32 System Exception: At address 00007FFDD36D45F8 with exception code C0000005 :
Access violation: invalid memory read operation at address 0000000000000008

Sometimes it can be solved with a restart of PI but other times the error persists - as in the above examples - different files, fits, xisf single images, stacked.  This has been a much more persistent problem since the last PI update though I did get it before.  Using Win 10 pro with a new custom high spec PC.

I was working with a friend on some shared PI processing on Monday and saw the same error come up when he changed the identifier on a starmask.

Is there a fix for this please

Many thanks

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6831
    • View Profile
    • http://pixinsight.com/
Re: Persistent Pixinsight PCL Win32 System Exception Errors
« Reply #1 on: 2019 August 14 03:44:09 »
We cannot reproduce this problem on any platform/machine. The WriteJPEG.js script is not part of the official distribution. Can you please provide a link to it (or attach it here compressed as a .zip file)? This way I can try to reproduce the problem.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Macstronomy

  • Newcomer
  • Posts: 7
    • View Profile
Re: Persistent Pixinsight PCL Win32 System Exception Errors
« Reply #2 on: 2019 August 14 04:01:21 »
Hi Juan,
Attached is the Script as requested.  It's not just this script which causes problems.  My friend had them with the PI starmask process but I also got them regularly when I initially setup my new PC to work with a RAMdrive to speed up PI as suggested for swap storage directories.  It got so annoying that I deleted the RAMDrive.

I don't get these errors currently with any other program on this PC - it's just PI.  It might be useful to know that PI is not installed on drive C: on my PC - it's on drive E: in

E:\Program Files\Pixinsight

Offline hvb356

  • Member
  • *
  • Posts: 63
    • View Profile
Re: Persistent Pixinsight PCL Win32 System Exception Errors
« Reply #3 on: 2019 August 14 04:07:04 »
Well, I've seen C0000005 recently, when I experimented with new scripts. WriteJPEG should not produce such an error after years of use. For stretched images use SaveAs instead.

TOA-150, ML8300, CFW2-7 w. Astronomik HaLRGB, PDF, EM-400, guiding FS-60 + ST402, ASCOM bsd. image acquisition

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6831
    • View Profile
    • http://pixinsight.com/
Re: Persistent Pixinsight PCL Win32 System Exception Errors
« Reply #4 on: 2019 August 14 04:16:03 »
I have just made a long series of tests on Windows 10 (about 40 executions of the script with different linear images) without problems. None of these access violation errors can be reproduced on any of our Windows 10 machines.

Quote
E:\Program Files\Pixinsight

This should make no difference at all. However, I would try uninstalling and reinstalling on C:, just in case.

I am sorry to know that you are having these problems, but they are not reproducible. I understand your frustration, but I cannot solve an issue that cannot be reproduced.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6831
    • View Profile
    • http://pixinsight.com/
Re: Persistent Pixinsight PCL Win32 System Exception Errors
« Reply #5 on: 2019 August 14 04:21:06 »
Quote
Well, I've seen C0000005 recently, when I experimented with new scripts.

Please note that you *can* generate access violation errors (segmentation faults, as we know them on Linux/UNIX) with a script in PixInsight. For example, for performance reasons, many native routines that you invoke indirectly from JavaScript make no checks for valid function parameters. As a script author, it is your responsibility to prevent this from happening, just as happens when you write a module in C++/PCL.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline hvb356

  • Member
  • *
  • Posts: 63
    • View Profile
Re: Persistent Pixinsight PCL Win32 System Exception Errors
« Reply #6 on: 2019 August 14 04:36:15 »
Yes, scripting gives us C++ errors but not the benefits of this language. Shoul I despair, I let you know  ;)
TOA-150, ML8300, CFW2-7 w. Astronomik HaLRGB, PDF, EM-400, guiding FS-60 + ST402, ASCOM bsd. image acquisition

Offline Macstronomy

  • Newcomer
  • Posts: 7
    • View Profile
Re: Persistent Pixinsight PCL Win32 System Exception Errors
« Reply #7 on: 2019 August 14 06:16:23 »
I have been reading all the previous posts on all the forums regarding exception errors, access violations and closing PI down and it is clear to me that over the years this has been a persistent issue which the team is unable to reproduce and therefore to resolve.  I have tried all the previous resolutions suggested including closing all other running apps other than PI.  Nothing worked.  I checked my available disk space and Ram - nothing problematic.  But I stumbled on a fix (of sorts perhaps but not ideal) this morning which may give the team a clue as to what causes this issue.   I was checking the instances of PI on the start menu and saw one saying new instance which I thought was worth trying to see what it did.  It opened PI as if it was a new install (makes sense) and when I tried the script - it ran fine.

Tried new instance  a second time and it didn't work - it did not appear to open as if new and then gave the same error with the script.  So I decided to reset PI and have another go - and again it worked fine - but what I then did different was to exit PI via File/Exit rather than using X at the top RHS.  I saw that this had been an issue though I thought this closing PI bug had been resolved in this latest version of PI. 

So I have tried opening PI from the windows start menu 6 times and closing it down with file /exit and so far the script runs without any errors. 

I had done very little customisation to PI only edited the icons on the toolbars - moved and added and have been adding shortcuts to all the open and save menus.  This use of shortcuts is a recent find for me and may actually be at the root of the issue.  Having said that I'm not at all sure of this because as a control I added a new script WriteJPEGConstrained and that worked throughout all my testing today - faultlessly - though I did not actually go ahead and save anything - so not a full test.

Anyway for now I can use the WriteJpeg script which is helpful when wanting to share smaller sized files with friends and not needing to use PS - result as long as it keeps working.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6831
    • View Profile
    • http://pixinsight.com/
Re: Persistent Pixinsight PCL Win32 System Exception Errors
« Reply #8 on: 2019 August 14 08:43:04 »
This was a confirmed bug in the Windows versions of PixInsight 1.8.5. It was completely fixed in version 1.8.6. In fact, it cannot be reproduced on any of our Windows 10 working and testing machines with 1.8.6 (the problem was reproducible with version 1.8.5 on some of our machines), and has not been reported before.

If you still see differences between File > Quit and closing the application's main window, then this is a machine-specific issue, unless we can reproduce the same behavior. Actually, there is no way this can be a problem anymore with 1.8.6, since both operations perform exactly the same sequence of operations to terminate the running application.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Macstronomy

  • Newcomer
  • Posts: 7
    • View Profile
Re: Persistent Pixinsight PCL Win32 System Exception Errors
« Reply #9 on: 2019 August 14 23:55:48 »
Hi Juan I am keen to find the cause of this issue rather than just addressing the symptoms. This morning I have tested PI with both File/Exit and just using X and the script runs fine.  But I never really thought that was causing this issue - I was just dotting all the i's.  Unfortunately I am unable to run the other tests I planned this morning to see if I could work out what customisation I had in PI which caused this fault because I cannot remember what customisations  I had used.  Is there a way to use the PI .conf file it created when I reset PI yesterday?  I'm pretty sure I know what caused it now.  Somehow I had managed to get a file open dialogue working in PI which looked like the Load Project dialogue and allowed you to store shortcuts on the LHS.  I think when you open a file from a shortcut the WriteJpeg script cannot access the true directory structure and generates the exception error.  But I cannot test the theory because I can't find a way of replicating the shortcut dialogue. 
I suspect that this might also have been something to do with the issue I had when I was using a RamDrive - which I plan to try again to see what happens.