Author Topic: System Freezes  (Read 6862 times)

Offline davidpretorius

  • Newcomer
  • Posts: 13
System Freezes
« on: 2008 May 30 04:50:29 »
Hi,

I have tried a couple of times to FFT register the second lot of images ( Blue worked fine ) and the Green stalls

There are roughly 1100 in each run.

Also, i tried to see if my laptop was at fault by installing on my desktop, but I assume the Identifier and Activiation code dont like a second computer?

Dave P
Tasmania, Australia
10" Peltier Cooled Newtonian on a Dob Driver II
Lu075M with RGB Filters

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
System Freezes
« Reply #1 on: 2008 May 30 08:48:18 »
Hi David,

Yes, you can install and use PixInsight on several computers with your trial license. Do the following:

1. On the computer you installed PixInsight first (let's call it "Computer A"), locate your personal folder (I assume you're a Windows user). On Windows XP, it is normally:

C:\Documents and Settings\<your_user_name>

where <your_user_name> is your actual user name on Windows. On Windows Vista, your personal folder is by default:

C:\Users\<your_user_name>

2. On your personal folder, look for a file with this name:

.pixinsight-license

Note that the file name begins with a dot character. This is your PixInsight license file. It's a regular text file, and it's very small, typically just a few kilobytes.

3. Copy your license file to your personal folder on the other computer; let's call it "Computer B". Now you can run PixInsight on B without problems, provided that you have an active Internet connection when you start the PixInsight core application. However, now you can't run PixInsight on Computer A. But of course, you can migrate your license file to Computer A from Computer B, following the same steps.

As you see, a trial license allows you to use PixInsight on only one computer at a given time. Of course, the commercial license doesn't have this limitation.

Let's see the problem with the FFTRegistration algorithm. It should allow you to register thousands of files without problem, unless you have not enough RAM, which is very unlikely. What error message are you getting? Look on the Processing Console window, where you have a complete log of the script activity. It might be an issue with JavaScript's garbage collector, in which case it is very easy to fix.

Of course, the FFTRegistration script, although it works very well, will be replaced with a dedicated tool, which will be much faster.

Thank you for testing.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline davidpretorius

  • Newcomer
  • Posts: 13
System Freezes
« Reply #2 on: 2008 May 30 14:16:05 »
Thankyou Juan,

Step 1 is done, I have the programme working on the desktop which is my main Jupiter processing machine.

I will now try and recreate the freeze.

Basically i could not view any other windows as the entire program stopped and I had to resort to a "process end" from the task manager

Dave P
Tasmania, Australia
10" Peltier Cooled Newtonian on a Dob Driver II
Lu075M with RGB Filters

Offline davidpretorius

  • Newcomer
  • Posts: 13
System Freezes
« Reply #3 on: 2008 May 30 14:51:31 »
Update.

I am taking some screen shots and will produce a document.

I have done the blue channel, worked well

I then chose my target for Green and then the 1100 odd green files for "target images" and then had to wait 10 minutes for the screen to refresh from a blank screen. The first targetting for the blue channel was very quick, but the second was really slow. I have taken screen shots from the task manager for memory information etc.

Anyway, back on track, it is nearly finished the green run
Tasmania, Australia
10" Peltier Cooled Newtonian on a Dob Driver II
Lu075M with RGB Filters

Offline davidpretorius

  • Newcomer
  • Posts: 13
System Freezes
« Reply #4 on: 2008 May 30 15:05:05 »
Looks like a memory issue.

It got to 997 of 1118 images and then had an error................line 148 out of memory reading swap file.

Not sure if it has released the memory from the Blue (1st) run and now is struggling to do the 2nd run of 1100 images??

Here are the screen shots

http://davesplanets.com/Downloads/Pixinsght%20FFT%20registration.doc

Dave
Tasmania, Australia
10" Peltier Cooled Newtonian on a Dob Driver II
Lu075M with RGB Filters

Offline davidpretorius

  • Newcomer
  • Posts: 13
System Freezes
« Reply #5 on: 2008 May 30 15:13:26 »
I will save the blue originals and the the waveletted reference and then shutdown the program and start up again for the green
Tasmania, Australia
10" Peltier Cooled Newtonian on a Dob Driver II
Lu075M with RGB Filters

Offline davidpretorius

  • Newcomer
  • Posts: 13
System Freezes
« Reply #6 on: 2008 May 30 15:14:28 »
It only took 5 seconds to lad the 1100 odd target images when the program has been restarted
Tasmania, Australia
10" Peltier Cooled Newtonian on a Dob Driver II
Lu075M with RGB Filters

Offline davidpretorius

  • Newcomer
  • Posts: 13
System Freezes
« Reply #7 on: 2008 May 30 15:16:48 »
I now have two instances of pixinsight running side by side. one doing the green, one doing the red
Tasmania, Australia
10" Peltier Cooled Newtonian on a Dob Driver II
Lu075M with RGB Filters

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
System Freezes
« Reply #8 on: 2008 June 01 03:46:05 »
Hi David,

This is an issue with JavaScript's garbage collector. Simply put, the JavaScript engine doesn't destroy unused objects until it runs into severe problems trying to allocate a new object. This policy greatly enhances performance, since unnecessary memory deallocations are minimized, but it may lead to out-of-memory errors during very large scripts that allocate many objects dynamically.

You have also discovered another peculiarity of the JavaScript engine: its state persists across script executions. This means that all objects defined by a script are alive when the next script runs. This has a good side and a bad side; you've experienced the bad one.

To fix these problems, you can do two things:

1. Restart the JavaScript engine before running a complex script like FFTRegistration with many images. Do the following:

    - Open the Script Editor window (place the mouse cursor over its autohide selector at the bottom left corner of the main window, or select View > Script Editor (Ctrl+Alt+E) from the main menu).

    - From the Script Editor's menu, select Execute > Reset JavaScript Runtime.


    Alternatively, you can just enter the following command from the Processing Console window:


Code: [Select]
run -reset

2. Tell the JavaScript engine that you really want to garbage collect all unused objects in the FFTRegistration script. This requires a bit of hacking, but it's very easy:

    - Open the FFTRegistration.js file. It is located on your C:\PCL\src\scripts folder. This is the script's JavaScript source code, and it opens with the Script Editor.

    - On the script editor, jump to line 682. To do this, ensure that the script editor has the keyboard focus and press Ctrl+G to open the Go To Line dialog.

    - Line # 682 is a single call to gc():


Code: [Select]
gc();

    You just have to add two further calls to gc(), so the line should look like this:


Code: [Select]
gc(); gc(); gc();

    - Save the modified file, by pressing Ctrl+S.


With this modification, the three calls to gc() should force an immediate commitment of all unused objects in the JavaScript engine. If this works for you, I'll include this change in the next version of PixInsight.

Thank you for your help.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline davidpretorius

  • Newcomer
  • Posts: 13
System Freezes
« Reply #9 on: 2008 June 01 07:53:01 »
Thanks Juan, I will try this out :)
Tasmania, Australia
10" Peltier Cooled Newtonian on a Dob Driver II
Lu075M with RGB Filters