Author Topic: Using BatchPreprocessing script on 32bit Win and having memory issues?  (Read 7996 times)

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
If you're having trouble on Win32 platform with memory and ImageIntegration (II), I believe the workaround is to change the Buffer Size from 16MB to 1MB, and Stack Size from 1024MB to 100MB.  This is pretty easy to do if you're manually using II, but if you're using the BPP script these variables are hard coded in the script.

The solution is to roll up your sleeves and manually edit the file.  It's easy to do, it's just a plain text file.  Using either Notepad or the inbuilt PI script editor, you want to edit the file BatchPreprocessing-engine.js.  Around lines 1010 and 1011 you'll see this:

Code: [Select]
   var II = new ImageIntegration;

   II.inputHints             = this.inputHints();
   II.bufferSizeMB           = 16;                                     
   II.stackSizeMB            = 1024;
   II.images                 = frameSet.enableTargetFrames( 2 );

You just need to change the 16 to 1, and 1024 to 100, then save the file and close, and restart PI.

Code: [Select]
   var II = new ImageIntegration;

   II.inputHints             = this.inputHints();
   II.bufferSizeMB           = 1;                                           
   II.stackSizeMB            = 100;
   II.images                 = frameSet.enableTargetFrames( 2 );

This is untested by me as I work on a 64bit Mac, but have a friend having trouble with BPP on his Win32 and am confident the above will help.  Let me know if not or other solutions are available.

Offline peter_4059

  • Newcomer
  • Posts: 5
Hi Troy - it works!

Thanks.

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Awesome!  Thanks for confirming.  Hopefully this makes BPP more accessible/usable for Win32 users.   8)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Since Juan is going to stop releasing 32bit versions, it is a bit late, but it would very easy to make that the processes had different default values between 32 and 64 bit versions. Also, if the Javascript interface had an GetArchitecture() method the scripts could also adapt to the differences between both architectures.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
I'll add new options to define ImageIntegration buffer parameters to the next version of the BatchPreprocessing script. I'll also try to add new architecture information properties and predefined constants to the JavaScript runtime---thanks for the idea, Andrés!
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Excellent!  Thanks Juan!

BTW, I've been contacted by another WinXP user who is having troubles as posted here: http://pixinsight.com/forum/index.php?topic=4362.msg30573#msg30573
He only has 2GB RAM, and reckons that even with 1MB Buffer and 100MB stack, it still crashes as reported in the above thread.  I asked if he's downloaded latest updates as I think there has been an II update since his above post, but didn't get a concise response.  Do you think that error is Buffer/Stack related or something else?

Offline Solidarity

  • Member
  • *
  • Posts: 58
Hello Juan,

I am using also 32bit windows and tried the values of 1 MB for Buffer Size and 100 MB for Stack Size - and it works  ;) I had some problems with memory before.

Thanks!!!