Author Topic: Crash in FFTRegistration ?  (Read 4359 times)

Offline Ioannis Ioannou

  • PixInsight Addict
  • ***
  • Posts: 202
Crash in FFTRegistration ?
« on: 2010 August 12 06:07:40 »
I'm trying to use the FFTRegistration script to a few moon images, 1360x1024 in 16bit fits.
The program stops at the very first image with memory access violation.
I tried to debug the script but the line reported says

image.translate( this.dx, this.dy );

and I'm not sure (with a quick look) what class 'image' is and where in the PCL documentation "translate" is, so I'm stacked.
Any help ?


-------- output from FFTRegistration -----------------------------

run -execute-mode=auto "C:/PCL/src/scripts/FFTRegistration.js"

Processing script file: C:/PCL/src/scripts/FFTRegistration.js

*****************************************
FFT Image Registration Script
Copyright © 2005-2009 Pleiades Astrophoto
*****************************************

=== Initializing FFT registration engine ===

Reading image:
E:/Images/20100808/moon/_cmoon_01.fit
Reading FITS: 32-bit floating point, 1 channel(s), 1360x1024 pixels: 100%
*** Initializing FFT translation:
FFT: 100%
Conversion to 32-bit floating-point sample format...
Writing swap files...
57.11 MB/s

=== Registering image 1 of 48 ===

Reading image:
E:/Images/20100808/moon/_cmoon_010.fit
Reading FITS: 32-bit floating point, 1 channel(s), 1360x1024 pixels: 100%
*** Evaluating FFT translation:
FFT: 100%
Inverse FFT: 100%
Rescaling pixel values: 100%
*** Translation corrections:
dx :    -0.31 px
dy :    -1.01 px
*** Applying translation:
Translate dx=-0.308, dy=-1.014, Bicubic Spline Interpolation, c=0.30: 100%
*** Error [000]: C:/PCL/src/scripts/FFTRegistration.js, line 240: At address 0147C4EA with exception code C0000005 :
Access violation: invalid memory read operation at address BFD3B8B5
Reading swap files...
354.00 MB/s
Clear Skies
John (Ioannis)

FSQ106N+Robofocus+QHY-22+SX USB wheel+Baader filters
SX OAG+DSI Pro guiding a NEQ6
PI for the rest :)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Crash in FFTRegistration ?
« Reply #1 on: 2010 August 12 07:27:21 »
Hi John
You should look at the PJSR classes, not the PCL ones. They are described in the Scrip Editor.

BTW, at the PCL, within Image.h a translation is defined by the Shift function.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Ioannis Ioannou

  • PixInsight Addict
  • ***
  • Posts: 202
Re: Crash in FFTRegistration ?
« Reply #2 on: 2010 August 13 00:04:27 »
Thank you for the hints Carlos. Still I'll need a bit more info to debug this, or at least to provide something usefull in order somebody from the dev team to debug it. I can now point the class member but I can not go beyond it, why this specific data made it crash?. Is there a way to get a stack trace or something similar ?
Clear Skies
John (Ioannis)

FSQ106N+Robofocus+QHY-22+SX USB wheel+Baader filters
SX OAG+DSI Pro guiding a NEQ6
PI for the rest :)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Crash in FFTRegistration ?
« Reply #3 on: 2010 August 13 07:13:05 »
I'm not familiar at all with debugging sessions, or PJSR programming, sorry. Anyway, I would check 2 memory related issues: RAM amount, and disk drive space (where PI stores its temporary files).
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Ioannis Ioannou

  • PixInsight Addict
  • ***
  • Posts: 202
Re: Crash in FFTRegistration ?
« Reply #4 on: 2010 August 13 14:08:58 »
I do not think so  - 3 GB RAM, nothing else running, tons of free GBs on both hard disks, but I'll try it.
I think the easiest way is to resize my photos and try again.

But in general, if I want to make a "proper" bug report that may help pinpoint problems like this, is there a way to produce something like a stack trace ? (I have in my mind something like strace or gdb output - Linux people know what I mean)
Clear Skies
John (Ioannis)

FSQ106N+Robofocus+QHY-22+SX USB wheel+Baader filters
SX OAG+DSI Pro guiding a NEQ6
PI for the rest :)

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Crash in FFTRegistration ?
« Reply #5 on: 2010 September 14 21:52:10 »
Win32 PI161.
Code: [Select]
FFT Image Registration Script
Copyright © 2005-2009 Pleiades Astrophoto
*****************************************

=== Initializing FFT registration engine ===

Reading image:
E:/1111/_5CR3799.fit
Reading FITS: 32-bit floating point, 3 channel(s), 5010x3336 pixels: 100%
*** Initializing FFT translation:
FFT: 100%

=== Registering image 1 of 2 ===

Reading image:
E:/1111/_5CR3800.fit
Reading FITS: 32-bit floating point, 3 channel(s), 5010x3336 pixels: 100%
*** Evaluating FFT translation:
FFT: 100%
Inverse FFT: 100%
Rescaling pixel values: 100%
*** Translation corrections:
dx :    -0.01 px
dy :    +0.04 px
*** Applying translation:
Translate dx=-0.006, dy=0.036, Bicubic Spline Interpolation, c=0.30: 100%
*** Error [000]: C:/PCL/src/scripts/FFTRegistration.js, line 241: At address 008EC4EA with exception code C0000005 :

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Crash in FFTRegistration ?
« Reply #6 on: 2010 September 14 21:55:47 »
And other one:
Code: [Select]
FFT Image Registration Script
Copyright © 2005-2009 Pleiades Astrophoto
*****************************************

=== Initializing FFT registration engine ===

Reading image:
E:/1111/_5CR3799.fit
Reading FITS: 32-bit floating point, 3 channel(s), 5010x3336 pixels: 100%
*** Initializing FFT rotation/scaling:
FFT: 100%
Low-frequency cutoff: 100%
Rescaling pixel values: 100%
In-place polar coordinate transform, Bilinear Interpolation: 100%
Applying image, op=Mov: 100%
FFT: 100%
*** Initializing FFT translation:
FFT: 100%

=== Registering image 1 of 3 ===

Reading image:
E:/1111/_5CR3799.fit
Reading FITS: 32-bit floating point, 3 channel(s), 5010x3336 pixels: 100%
*** Evaluating FFT rotation/scaling:
FFT: 100%
Low-frequency cutoff: 100%
Rescaling pixel values: 100%
In-place polar coordinate transform, Bilinear Interpolation: 100%
Applying image, op=Mov: 100%
FFT: 100%
Inverse FFT: 100%
Rescaling pixel values: 100%
*** Rotation and scaling corrections:
Rotation angle :  +31.36 deg
Scaling ratio  :    1.00
*** Applying rotation/scaling:
Rotate 31.364 deg, Bicubic Spline Interpolation, c=0.30: 100%
*** Error [000]: C:/PCL/src/scripts/FFTRegistration.js, line 521: Access violation: invalid memory read operation at address BFE0A7AE

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Crash in FFTRegistration ?
« Reply #7 on: 2010 September 14 22:26:00 »
And one more. But now without /3GB in boot.ini
Code: [Select]
Reading FITS: 32-bit floating point, 3 channel(s), 5010x3336 pixels: 100%
*** Evaluating FFT translation:
FFT: 100%
*** Error [000]: C:/PCL/src/scripts/FFTRegistration.js, line 156: out of memory

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Crash in FFTRegistration ?
« Reply #8 on: 2010 September 14 22:32:12 »
I think the best option is to use the process module I wrote (only translations... rotations and scalations do not work well with the implemented algorithms, so I disabled them). Also it has a wavelets filtering that helps a lot with noisy images. I'll compile the 32bits versions ASAP.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com