Results 1 to 9 of 9

Thread: "Out of memory" error on _IS3ReadJPG call

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Posts
    14

    Default "Out of memory" error on _IS3ReadJPG call

    We are using SmallerAnimals library for a while already, but recently some of our clients began to receive "Out of memory" errors on _IS3ReadJPG calls.

    From the data we collected I can see that the files they were uploading were not too big (300k - 1.5Mb), but they all had "Content Type: image/pjpeg" (not sure if it is important).

    Is there anything anybody can suggest to handle or find cause of this error?

    Thanks,
    Seva

  2. #2
    Join Date
    Mar 2006
    Posts
    805

    Default Re: "Out of memory" error on _IS3ReadJPG call

    what are the dimensions of the images in those files ?

    can you reproduce the problem with a specific file? if so, can you send us that file, or make it downloadable for us, so we can test ?

  3. #3
    Join Date
    Jun 2006
    Posts
    14

    Default Re: "Out of memory" error on _IS3ReadJPG call

    I am attempting to get my hands on the image(s), but unfortunately no success there (our clients are not easy people to work with - files get lost, replaced, or they just don't remember which one was causing them a problem).

    They are however report that after multiple failures, they sometimes do able to process the file as it is, while sometime they have to resize it to something smaller and then processing functionality will work again.

  4. #4
    Join Date
    Mar 2006
    Posts
    805

    Default Re: "Out of memory" error on _IS3ReadJPG call

    ok.

    looking at the change logs, i don't see that we've fixed anything in any v3 (or v4) release that sounds like it would fix an out of memory error in JPG reading.

    and looking at the source, there are only three places where that error code could be set: one is allocating the output buffer itself (the size of which depends on the dimensions and bitdepth of the image, obviously), one is allocating a two-line temp buffer for reading scanlines, and the other is allocating a small data structure.

    so, the first thing to check is the dimensions of the input image(s) which cause the problem (assuming there's no bug in the JPG reading...).
    Last edited by Admin; 05-09-2008 at 05:54 PM.

  5. #5
    Join Date
    Jun 2006
    Posts
    14

    Default Re: "Out of memory" error on _IS3ReadJPG call

    Thanks for the info.

    Hopefully we would be able to get our hands on a "bad" image and then be able to see what exactly is happening.

  6. #6
    Join Date
    Jun 2006
    Posts
    14

    Default Re: "Out of memory" error on _IS3ReadJPG call

    OK, we got a few images from our clients, which caused them multiple problems in the past. Now, however, they work with no problems what’s so ever.

    We are using ImgSource library in the same COM+ process on the server as our other multiple applications. Sometimes servers become quite loaded. Is there anything you can think of, which may case reported error, but be cased by some generic server problems (memory, CPU, network ... issues).
    Last edited by Seva; 05-16-2008 at 06:46 PM.

  7. #7
    Join Date
    Mar 2006
    Posts
    805

    Default Re: "Out of memory" error on _IS3ReadJPG call

    the out of memory errors happen when ImgSource can't allocate the memory it needs to read or hold the image. unfortunately, that's really all the info i have -if the OS says "no" when ImgSource asks for a block of memory, ImgSource will set that error.

    it's impossible for me to know why your systems would deny requests for memory, though. but, if it happens when the systems are heavily loaded, it's possible that there simply isn't enough memory available...

  8. #8
    Join Date
    Jun 2006
    Posts
    14

    Default Re: "Out of memory" error on _IS3ReadJPG call

    How do you allocate memory (standard C Lib or do you have something of your own)?

    Files which I got from out clients are small: 640x420x24, so I don't really see how these dimensions can affect overall server memory situation, but something certainly does.

  9. #9
    Join Date
    Mar 2006
    Posts
    805

    Default Re: "Out of memory" error on _IS3ReadJPG call

    images are allocated with GlobalAlloc (GPTR, ...). the 2-line temp buffer is allocated with VC6's C++ "new". the small structure is allocated with GlobalAlloc(GPTR, ...).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •