Memory allocation issue still not resolved w 64 bit version

2,086 views
Skip to first unread message

ecs1749

unread,
May 27, 2012, 2:28:09 PM5/27/12
to hugi...@googlegroups.com
I downloaded the 64 bit version for Windows 7 and tried to load photos at full resolutions (width 4948) .  Can only load 4 photos before running into the dreadful "An error happened while loading image : caught exception: bad  allocation".  I have plenty of free memory - according to the Task Manager.

Bart van Andel

unread,
May 28, 2012, 8:41:22 AM5/28/12
to hugi...@googlegroups.com
How much memory is Hugin using when the error occurs? Are you talking about loading images inside Hugin itself or during stitching? In other words which program is failing?

--
Bart

Bart van Andel

unread,
May 28, 2012, 8:41:27 AM5/28/12
to hugi...@googlegroups.com

ecs1749

unread,
May 28, 2012, 9:18:45 AM5/28/12
to hugi...@googlegroups.com
Most I've seen is only 1.5G.  I have 8G memory.  This is during loading.

ecs1749

unread,
May 28, 2012, 9:39:50 AM5/28/12
to hugi...@googlegroups.com
Actually, less than that.  May be only 1.2G, even less then the 32 bit version which uses as high as 1.6G before failing.  Incidentally, if I scale down each picture to 1600bits wide, I can load over a hundred pictures and process them no problem.

RizThon

unread,
May 28, 2012, 8:16:36 PM5/28/12
to hugi...@googlegroups.com
I still have that problem too. I tried it with 4GB of RAM and 8. It
always stops at 6 or 7 images, while if I scale them down I can have
at least 20+. On XP 32 it used to work fine with 2GB of RAM for the
same kind of pictures.

2012/5/28 ecs1749 <ecs...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Hugin and other free panoramic software" group.
> A list of frequently asked questions is available at:
> http://wiki.panotools.org/Hugin_FAQ
> To post to this group, send email to hugi...@googlegroups.com
> To unsubscribe from this group, send email to
> hugin-ptx+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/hugin-ptx

Stefan Peter

unread,
May 29, 2012, 3:09:06 AM5/29/12
to hugi...@googlegroups.com
Have you tried to increase the image cache memory setting in the Hugin
Preferences dialog? Are you sure you have enough free disk space in your
TEMP directory?

With kind regards

Stefan Peter


--
In theory there is no difference between theory and practice. In
practice there is.

ecs1749

unread,
May 29, 2012, 12:02:36 PM5/29/12
to hugi...@googlegroups.com
Yes, I have done both and still fails.  Incidentally, the failure is not when loading the images.  It's when detecting control points.  I've tried changing detectors and they all fail the same fashion (some sooner than others).

Stefan Peter

unread,
May 29, 2012, 5:13:53 PM5/29/12
to hugi...@googlegroups.com
On 29.05.2012 18:02, ecs1749 wrote:
> Yes, I have done both and still fails. Incidentally, the failure is not
> when loading the images. It's when detecting control points. I've
> tried changing detectors and they all fail the same fashion (some sooner
> than others).

You are aware of the fact that you have claimed that the problem arises
upon the loading of the images in your opening mail, don't you?

Do you have an error message or, even better, a log file, in order to
prove your statement this time?


With kind regards

Stefan Peter


--
"In summary, I think you are trying to solve a problem that may not
need to be solved, using a tool that is not meant to solve it, without
understanding what is causing your problems and without knowing how
the tool actually works in the first place :)"
Jeffrey J. Kosowsky on the backuppc mailing list

Bart van Andel

unread,
May 29, 2012, 5:53:12 PM5/29/12
to hugi...@googlegroups.com
It would help if you provide a *detailed* description of when things go wrong instead of just saying "Hugin crashes". Which version, which OS, 32 or 64 bit, amount of RAM, *specific error message*, all of those may matter. Moreover, giving incorrect information (which you did, I guess not purposefully but nonetheless) can steer your fellow group members in the wrong direction. Being precise can save everyone some time - and a little frustration. Please keep that in mind.

Also, I asked which program crashed a couple replies back. Please do read answers carefully when people are offering you a hand. We are all volunteers here.

Could you try to see which image the cp generators are crashing on exactly? If you find it, you may want to post it somewhere so we can have a look at it. Maybe one of your images is broken which may cause all kinds of unexpected behavior.

--
Bart

RizThon

unread,
May 29, 2012, 8:40:23 PM5/29/12
to hugi...@googlegroups.com
I've had the same problem and found other messages about it in the
mailing list. They all concern Win7 64 bits and I feel we all have
enough RAM (4 to 8GB). As soon as I have time I'll retry again with a
new version on a Win7 64 with 4GB RAM, and another one with 8GB. If I
find an XP 64 and 32 I'll try on them too.

Message "[hugin-ptx] Hugin - No control points" by George Mahoney on 6/17/11

While attempting to align images I get a long list of the following
error messages...

Analysing i1:
An error occurred while loading image: Caught exception: Bad
allocation

Analysing i2:
An error occurred while loading image: Caught exception: Bad
allocation

It happens to each photo and the end result is that no control points
are found between any images, no matter how seemingly obvious the
images are overlapped. I'm running 64 bit windows 7. I've reinstalled
hugin to no avail, and tried several different control point settings.
Am I missing something?

Message "RE:[hugin-ptx] Hugin - No control points" by me on 10/31/11

I have the same issue here (except there's no error with the 1st
images, only after 7 or 8). I'm also running Win7 64 (i3 2100, 4GB
RAM). I've tried several hugin installers (latest one being 2011.02 64
bits). I always use the default settings (and ask the settings to be
reset while installing a new version).

> I'll ask some questions, maybe we can find a solution:
> - What kind of images are you trying to align?

My images are all 3872x2592 (taken with FF fisheye). Usually if I have
7 or 8 images all works fine (I load the images, choose FF fisheye
then click "Align..." and get a good pano). If I have more I get
Analysing ix:
An error occurred while loading image: Caught exception: Bad allocation
for the next pictures.

If I resize my pics to be 1000x669 then I can correctly stitch 24
images (8 towards the horizon, 8 30° up, 8 30° down).
By the way, is there a way to reuse the pto that I created with the
smaller resolution images? It looks like when I choose "Apply
Template" with the big resolution images, I lose all the control
points.


> - Could you provide us with a sample set of your images, so we can
> test ourselves?

I can send you the pics if necessary.

> - I remember seeing recent posts on the mailing list where users
> seemed to have troubles with windows 7, are you using a beta or an
> official release version?

I've been using Hugin before with XP and didn't encounter that issue
(I was using a different computer).

Message "[hugin-ptx] autopano-sift-c" by Adam Weld on 11/30/11 (he's
running Win7 64 with 8GB of RAM)

In total the panorama has 75 images, when I load only a couple CPFind
seems to work, otherwise I get this output:

Finding control points...
"C:/Program Files (x86)/Hugin/bin/icpfind" -o
"C:/Users/Adam/AppData/Local/Temp/ha60F7.tmp"
"C:/Users/Adam/AppData/Local/Temp/ha60F7.tmp"
Hugins cpfind 2011.2.0.3d9649aa241a built by Matthew Petroff
based on Pan-o-matic by Anael Orlinski

Project contains the following images:
Image 0
Imagefile: C:\Users\Adam\Desktop\pan2\IMG_5245.jpg
Remapped : yes
Image 1
Imagefile: C:\Users\Adam\Desktop\pan2\IMG_5246.jpg
Remapped : yes

[...]

Image 75
Imagefile: C:\Users\Adam\Desktop\pan2\IMG_5320.jpg
Remapped : yes

--- Analyze Images ---
i0 : Analyzing image...
i1 : Analyzing image...
i2 : Analyzing image...
i3 : Analyzing image...
i4 : Analyzing image...
i5 : Analyzing image...
i6 : Analyzing image...
i7 : Analyzing image...
An error happened while loading image : caught exception: bad allocation
i8 : Analyzing image...

[...]

An error happened while loading image : caught exception: bad allocation
i75 : Analyzing image...

ecs1749

unread,
May 29, 2012, 11:50:47 PM5/29/12
to hugi...@googlegroups.com
At the time of my first post, I didn't realize that the default setting was set to create control points at loading time.   That's why I thought the error occurs at loading time.  Upon further investigation, the error occurs at control points detection time.  So I reported it with a clarification.  See Riz Thon's message below.  I am getting the exact same messages reported by Riz.

ecs1749

unread,
May 30, 2012, 12:01:51 AM5/30/12
to hugi...@googlegroups.com
For my case, this is the newly available 64 bit version of Hugin (w new GUI), running under Windows 7, 8G of real memory, plenty of disk space for temp, and the max amount of memory used by Hugin appears to be less than 1.5G.  The failure occurs with ramdon set of photos at widths of 4948 bits each.  Most cases I tried, the failure occurs after a handful of pictures - around 4 to 5.  The error message simply says " "An error happened while loading image : 
 caught exception: bad  allocation".   If I scale the pictures down to 1087 bits, there is no issue.  I can process over a hundred files no problem.  What else info can I provide to help?

ecs1749

unread,
May 30, 2012, 12:27:25 AM5/30/12
to hugi...@googlegroups.com
As I indicated, I tried everyone of the detectors, and for the ones that runs, they all fails - some quicker than others (meaning some fails after 2 to 4 photos, others fails after loading 4 to 5 pictures.  Some detectors don't run at all (not found) but that's a different issue.  I am uploading some test pictures for others to try.  Will post the link once they become available.


On Tuesday, May 29, 2012 2:53:12 PM UTC-7, Bart van Andel wrote:

Steeve

unread,
May 30, 2012, 2:16:27 AM5/30/12
to hugin and other free panoramic software
>>"An error happened while loading image : caught exception: bad allocation"
Hasn't this problem already been discussed on this newsgroups?

In summary on computers with multiple cores/processors images are
being loaded in parallel which consumes too much memory.. The error is
not coming from the memory which is currently being used, but from the
additional memory it wants to allocate.. You can find a better
explanation by search the newsgroup for "bad allocation"

The workaround was to reduce the number of CPUs Hugin uses..

In Hugin look at file->preferences-> number of CPUs. On my machine
this was set to 4 I had to reduce it to 1.

With 4 I'd typically get this error after 10 images (I've got a
smaller camera sensor)
With 2 I'd still occassionally got this error
So I end up having to reduce this to 1.

Regards
Steve

Stefan Peter

unread,
May 30, 2012, 3:34:26 AM5/30/12
to hugi...@googlegroups.com
Dear ecs1749

On 30.05.2012 06:27, ecs1749 wrote:
> As I indicated, I tried everyone of the detectors, and for the ones that
> runs, they all fails - some quicker than others (meaning some fails
> after 2 to 4 photos, others fails after loading 4 to 5 pictures. Some
> detectors don't run at all (not found) but that's a different issue. I
> am uploading some test pictures for others to try. Will post the link
> once they become available.

If your problem is with the CP detecors, there seems to be a solution at
least for CPFind. Can you please give this a try:

o Open the Preferences dialog of Hugin
o Select the "Control Point Detectors" tab
o Press the "Load defaults" button in the lower left corner.
o Select the entry named "Hugins CPFind (Default)" from the list of CP
detectors available.
o Press the "Edit ..." button on the right. You will be presented
with the "Parameters for Control Point Detectors" dialog.
o Add "--ncores 1" to the "Arguments" entry. It should read now
"--ncores 1 --multirow -o %o %s"
o Leave this screen by pressing "OK"
o Use the "Apply" button to apply your changes.
o Redo your panorama
o Let us know how it went.

Regards

Gnome Nomad

unread,
May 30, 2012, 5:06:07 AM5/30/12
to hugi...@googlegroups.com
On 05/29/2012 09:34 PM, Stefan Peter wrote:

> On 30.05.2012 06:27, ecs1749 wrote:
>> As I indicated, I tried everyone of the detectors, and for the ones that
>> runs, they all fails - some quicker than others (meaning some fails
>> after 2 to 4 photos, others fails after loading 4 to 5 pictures. Some
>> detectors don't run at all (not found) but that's a different issue. I
>> am uploading some test pictures for others to try. Will post the link
>> once they become available.

FWIW, ages ago, for some reason I decided to run cpfind using the full
resolution option on some of my camera's 6MP images. On my laptop with
2GB of memory. Always ran out of real memory, started swapping, and
basically would swap swap swap for long hours before finally completing
one image. Apparently my one little image required 1.9GB of memory!

So I killed the X graphics session, logged in to a text screen, and ran
the CP-finding process one at a time. That completed in a practical
timeframe.

Apparently finding control points takes a lot of memory.

--
Gnome Nomad
gnome...@gmail.com
wandering the landscape of god
http://www.clanjones.org/david/
http://dancing-treefrog.deviantart.com/
http://www.cafepress.com/otherend/

ecs1749

unread,
May 30, 2012, 10:48:29 AM5/30/12
to hugi...@googlegroups.com
I set the number of CPU down to 1, still fails after 6 photos (4948 bit wide each).  If I reduce the resolution of each photo to 1600 (268kb file size each), I can load 140+ pictures no sweat.  At a resolution of  3200 bits wide and I was able to load close to 100 photos before it fails.

ecs1749

unread,
May 30, 2012, 10:58:55 AM5/30/12
to hugi...@googlegroups.com
I am able to go a lot further with this setting.  I am pushing to see how many photos I can process - right now it's processing 32 no problem.

Jan Martin

unread,
May 30, 2012, 11:00:04 AM5/30/12
to hugi...@googlegroups.com
Is it just me, or is there really no way to get the original images with EXIF intact?
Also I do not want to download 100 images one by one.

Jan

--

ecs1749

unread,
May 30, 2012, 11:31:03 AM5/30/12
to hugi...@googlegroups.com
I have the raw file but when Picasa sync with web site, it automatically converts them to jpg and strips the EXIF.  I'll see if there's a way to include the EXIF.
To unsubscribe from this group, send email to hugin-ptx+unsubscribe@googlegroups.com

ecs1749

unread,
May 30, 2012, 11:35:11 AM5/30/12
to hugi...@googlegroups.com
Yes, this procedure solves the problem.  I loaded 128 photos with this setting and it went through.

Jörg Rosenkranz

unread,
May 30, 2012, 11:41:28 AM5/30/12
to hugi...@googlegroups.com
2012/5/30 ecs1749 <ecs...@gmail.com>

For my case, this is the newly available 64 bit version of Hugin (w new GUI), running under Windows 7, 8G of real memory, plenty of disk space for temp, and the max amount of memory used by Hugin appears to be less than 1.5G.  The failure occurs with ramdon set of photos at widths of 4948 bits each.  Most cases I tried, the failure occurs after a handful of pictures - around 4 to 5.  The error message simply says " "An error happened while loading image : 
 caught exception: bad  allocation".   If I scale the pictures down to 1087 bits, there is no issue.  I can process over a hundred files no problem.  What else info can I provide to help?

I suffered the same problem on Mac OSX 64 Bit with 16GB RAM. Strangely the error didn't occur on the same machine and the same Hugin installation before upgrading the RAM. With only 4GB it worked fine. Maybe some number overflow in the memory computation?

Joerg.
 

Stefan Peter

unread,
May 30, 2012, 3:18:02 PM5/30/12
to hugi...@googlegroups.com
Dear ecs1749

On 30.05.2012 16:58, ecs1749 wrote:
> I am able to go a lot further with this setting. I am pushing to see
> how many photos I can process - right now it's processing 32 no problem.

What setting are you talking about? Please bear in mind that all these
emails will be preserved for eternity and a gazillion Hugin users may
search for a solution to the the exact same problem you had. Wouldn't it
be nice for them to get a solution? Something in the way of "I did this
and this, and now it works"? Not to mention the fact that in order to
solve these problems in Hugin, the developers and contributors to the
project are eager to know what to do to fix the problems found by their
users.
So, please, what did you do _exactly_ in order to be able to create your
pano?

WKR

ecs1749

unread,
May 30, 2012, 3:59:50 PM5/30/12
to hugi...@googlegroups.com
I followed the steps you posted and was able to process 100 or so photos.   Here's a repost of your procedure:

If your problem is with the CP detecors, there seems to be a solution at 
least for CPFind. Can you please give this a try: 

o Open the Preferences dialog of Hugin 
o Select the "Control Point Detectors" tab 
o Press the "Load defaults" button in the lower left corner. 
o Select the entry named "Hugins CPFind (Default)" from the list of CP 
  detectors available. 
o Press the "Edit ..." button on the right. You will be presented 
  with the "Parameters for Control Point Detectors" dialog. 
o Add "--ncores 1" to the "Arguments" entry. It should read now 
  "--ncores 1 --multirow -o %o %s" 
o Leave this screen by pressing "OK" 
o Use the "Apply" button to apply your changes. 
o Redo your panorama 
o Let us know how it went.  

Stefan Peter

unread,
May 30, 2012, 4:57:24 PM5/30/12
to hugi...@googlegroups.com
Dear ecs1749

On 30.05.2012 21:59, ecs1749 wrote:
> I followed the steps you posted and was able to process 100 or so
> photos. Here's a repost of your procedure:

Thank you very much for confirming that this has helped wit CPFind. If I
recall correctly, this issue has been fixed already in the current
development version, so it should not resurface in any Hugin version >
2011.04. However, the situation for CP detectors other than CPFind has
to be reevaluated because you mentioned that these have failed you. too.
Can you, by any chance, remember what other CPDs you tried without success?


With kind regards

Stefan Peter


>
> --
> You received this message because you are subscribed to the Google
> Groups "Hugin and other free panoramic software" group.
> A list of frequently asked questions is available at:
> http://wiki.panotools.org/Hugin_FAQ
> To post to this group, send email to hugi...@googlegroups.com
> To unsubscribe from this group, send email to
> hugin-ptx+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/hugin-ptx


Bart van Andel

unread,
May 30, 2012, 5:13:05 PM5/30/12
to hugi...@googlegroups.com
Dear ecs1749,

Please reply to the message your response is referring to, or learn to quote. In your messages (which I'm replying to right now) you say "this setting" and "this procedure" but it's unclear what you are referring to. This makes it hard for anyone to understand what you're talking about.

--
Bart

ecs1749

unread,
May 31, 2012, 1:43:25 AM5/31/12
to hugi...@googlegroups.com
Hugin;s CPFind + Celeste
Autopano-SIFT-C
Autopano
Panomatic
Align Image stack
CPFind (multirow/stacked)
Autopano-SIFT-C (multirow/stack)
Vertical lines

I tried them all.  Some I get a .exe file not found.  Others fail the same way.  I will provide more information once I finish with the pano I've been working on.
Reply all
Reply to author
Forward
0 new messages