PixInsight Forum
PixInsight => Bug Reports => Topic started by: Ioannis Ioannou 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 executemode=auto "C:/PCL/src/scripts/FFTRegistration.js"
Processing script file: C:/PCL/src/scripts/FFTRegistration.js
*****************************************
FFT Image Registration Script
Copyright © 20052009 Pleiades Astrophoto
*****************************************
=== Initializing FFT registration engine ===
Reading image:
E:/Images/20100808/moon/_cmoon_01.fit
Reading FITS: 32bit floating point, 1 channel(s), 1360x1024 pixels: 100%
*** Initializing FFT translation:
FFT: 100%
Conversion to 32bit floatingpoint 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: 32bit 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

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.

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 ?

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).

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)

Win32 PI161.
FFT Image Registration Script
Copyright © 20052009 Pleiades Astrophoto
*****************************************
=== Initializing FFT registration engine ===
Reading image:
E:/1111/_5CR3799.fit
Reading FITS: 32bit 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: 32bit 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 :

And other one:
FFT Image Registration Script
Copyright © 20052009 Pleiades Astrophoto
*****************************************
=== Initializing FFT registration engine ===
Reading image:
E:/1111/_5CR3799.fit
Reading FITS: 32bit floating point, 3 channel(s), 5010x3336 pixels: 100%
*** Initializing FFT rotation/scaling:
FFT: 100%
Lowfrequency cutoff: 100%
Rescaling pixel values: 100%
Inplace 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: 32bit floating point, 3 channel(s), 5010x3336 pixels: 100%
*** Evaluating FFT rotation/scaling:
FFT: 100%
Lowfrequency cutoff: 100%
Rescaling pixel values: 100%
Inplace 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

And one more. But now without /3GB in boot.ini
Reading FITS: 32bit 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

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.