Author Topic: Crash in Image.translate()  (Read 6889 times)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Crash in Image.translate()
« on: 2011 January 27 08:46:50 »
Testing the FFTregistration script I found a crash in a call to the function Image.translate. I have written a short script that calls to that function and it also fails.
The tests have been done in Windows Vista 32 and Windows 7 64.
Code: [Select]
#include <pjsr/UndoFlag.jsh>

var w = ImageWindow.activeWindow;
var v = w.mainView;
v.beginProcess( UndoFlag_NoSwapFile );
v.image.translate(5,5);
v.endProcess();

Sometimes the application crashes too.

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Crash in Image.translate()
« Reply #1 on: 2011 January 27 08:57:18 »
Hi Andres
For translations use the module I wrote. By Juan's suggestion, it includes a wavelets filtering, that may aid the registration process. I use the same algorithm every day for microscopic images, and it works quite well.
Regards,

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

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Crash in Image.translate()
« Reply #2 on: 2011 January 27 09:20:27 »
Hi Andres
For translations use the module I wrote. By Juan's suggestion, it includes a wavelets filtering, that may aid the registration process. I use the same algorithm every day for microscopic images, and it works quite well.
Your module doesn't work with my images  :'( :'( so I was trying the new script from Juan.
Anyway, the JS engine is crashing in my machines. Could anybody try the simplified script in Windows to confirm the bug?

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Crash in Image.translate()
« Reply #3 on: 2011 January 28 02:19:24 »
Juan has asked in another thread for an image in which this script fails. I have attached a crop from a Canon 400D shot converted to TIFF.


Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Crash in Image.translate()
« Reply #4 on: 2011 January 28 02:22:16 »
Hi Andres
For translations use the module I wrote. By Juan's suggestion, it includes a wavelets filtering, that may aid the registration process. I use the same algorithm every day for microscopic images, and it works quite well.
Your module doesn't work with my images  :'( :'( so I was trying the new script from Juan.
I have tried again with your module an the results are much better than the last time I used it (last august, I think). I have been able to register my images from the July total eclipse  :D :D :D :D

Thanks Carlos for your good work!!

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Crash in Image.translate()
« Reply #5 on: 2011 January 28 05:25:15 »
;)
Regards,

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

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Crash in Image.translate()
« Reply #6 on: 2011 January 28 06:17:55 »
Andrés,

I have confirmed this bug on Windows (32-bit and 64-bit versions). I'm working to fix it ASAP and will publish an update as soon as I get it fixed.

Thanks for reporting.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Crash in Image.translate()
« Reply #7 on: 2011 January 28 10:30:16 »
Fixed! :)

Actually, the same problem occurs with most interpolating geometric transformations in the PJSR (translation, resample, rotation, etc.). The cause of this problem is NOT in my code, but in M$'s particular interpretation of the C++ language... better stop writing at this point  >:( Suffice it to say that the same code works perfectly when compiled with g++ (FreeBSD, Linux and Mac OS X), just because g++ is a good standards-compliant compiler.

Anyway, the problem is now fixed. I'll publish an update to the Windows versions of PixInsight Core ASAP.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Crash in Image.translate()
« Reply #8 on: 2011 May 31 02:21:48 »
The script that I posted in the first message still fails. Worse, it now crashes PixInsight.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Crash in Image.translate()
« Reply #9 on: 2011 May 31 02:51:50 »
Andrés,

Este bug en su 'encarnación' actual es el mismo que éste.

Estoy trabajando en ello...
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Crash in Image.translate()
« Reply #10 on: 2011 May 31 02:52:48 »
Andrés,

Este bug en su 'encarnación' actual es el mismo que éste.

Estoy trabajando en ello...


Gracias Juan!!

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Crash in Image.translate()
« Reply #11 on: 2011 May 31 02:54:24 »
De nada, es mi trabajo :)

Una pregunta, estás con la versión de 32 bits o con la de 64? No debería ocurrir con la de 32...
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Crash in Image.translate()
« Reply #12 on: 2011 May 31 02:55:53 »
Pues me ha fallado en 32bits...

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
(FIXED) Crash in Image.translate()
« Reply #13 on: 2011 June 01 00:24:49 »
Hi,

This bug has been fixed in PixInsight Core 1.7.0.696. The new version is now available as a regular update for Windows x86 and x64.

Thanks for your patience!
Juan Conejero
PixInsight Development Team
http://pixinsight.com/