OUT OF MEMORY - during loading images (JPEG's)

Hallo,
We use the OHJ (version 4.1.12) inside a Java/Swing application with JDK 1.3.1.
Our online help contains a lot of larger JPEG images. When the user navigates through the online help - an out of memory occurs while loading the images.
I tried to split the help pages in a lot of small HTML pages, but this doesn't help. It seems that the OHJ does not clear the memory
when loading the next HTML page.
Can the OHJ deal with larger images ?
Any other possibilities ?
Thanks
Markus Pohle

>
It seems that the OHJ does not clear the memory when loading the next HTML page.
Can the OHJ deal with larger images ?
We have never seen such a problem with large images and OHJ. Could you send us a ZIP containing your help content by e-mail to [email protected] so that we can try to reproduce it?
Thanks,
-brian

Similar Messages

  • Displaying images - out of memory  (was Loading imagens - out of memory")

    Well guys,
    this is REALLY an intriguing issue. Ok, the subject of the post was not precise; I do not want to load the images. I just want to display them, in batches, one batch at a time. My applet loads the last batch of images available and displays them like a "mosaic". After a cycle (a batch of images) I set the image descriptors (an array of them) to null and explicitly call the garbage collector.
    I made some tests varying the number of times I call System.gc() with no effective results: "Out of memory" in java console always happens, sooner or later.
    I've also tried to limit cache size in control panel "java plug-in". This seems to be a nonsense recommendation I�ve seen in the Internet. The memory growing process is IE, not JVM.
    Also tried to disable caching with <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> clause in the page that contains the applet. No results at all.
    Despite of all my efforts trying to limit my "memory voracious" applet, task manager reports an unlimited growing memory for IE and, after some time, the applet locks, with java console reporting "out of memory".
    I have found no effective recommendations/solutions in the Internet.. Only speculations.
    The question is simple (I do not expect a simple answer :-)) : how do I limit IE memory consumption?
    Any help will be appreciated.
    l.a.

    Actually, i have the same problem...
    Im using an applet that generates me a Chart.
    Each time i generate a Chart, IE's memory goes up like 10mb and the applets fails running when it reaches about 130MB
    the odd thing is, is that even when i RELOAD the page, the memory does not go down... its as if the applet was never unloading no matter what you do, except reseting IE...

  • Error: out of memory during render

    Hi,
    I am attempting to write a non-self contained quicktime movie from a sequence in FCP 6.03. The sequence was originally edited in AIC 720p, then onlined to 8 bit uncompressed via the .m2v files.
    When rendering I receive an "error: out of memory" message.
    I am wondering what might have caused this, as I have not experienced it before. I have done a search within mac forums, but none of the threads I found seemed to address my specific issue.
    Any thoughts??
    Thanks,
    -Tom

    Onlined to 8 bit uncompressed SD? or HD?
    You likely have a corrupted media file involved. It's usually the same percentage in from the head of the sequence, as the failure is reported... i.e, the failure is reported after 50% complete? then look half way into your sequence, and re create or re capture that area of the sequence.
    Jerry

  • Out of Memory during recon

    I am running a initial recon on a DB (oracle 10g) which has over 150000 users, the server is going out of memory, so how do I solve this problem?
    Thanks

    Hi ,
    Running job in batch is really good idea ,but you need to evaluate if your resource/connector allow any kind of filter and if not then customization you want to do.
    If you have large memory and can;t use above option then you should use below option.(btw specifying 1gb of memory is not sufficient seeing no. of records.As one recon event invokes a series of calls ,your memory grow and gc will try to collect memory based on your algorithm ,but as you reach a point <1.2 gb> JVM fails ).
    You can check when your recon failed for memory usage and set your initial size to some higher value i.e. 1.5x and max to 2.1x.
    -Ankit

  • Named running out of memory during internet sharing

    From the logs on the system providing the connection;
    Nov 5 12:03:03 Macintosh named[59]: internal_send: 192.168.2.6#49197: Cannot allocate memory
    Nov 5 12:03:03 Macintosh named[59]: client 192.168.2.6#49197: error sending response: out of memory
    Nov 5 12:03:08 Macintosh natd[76]: failed to write packet back (Network is unreachable)
    Nov 5 12:03:18: --- last message repeated 1 time ---
    Nov 5 12:03:18 Macintosh named[59]: /SourceCache/bind9/bind9-24/bind9/lib/isc/unix/socket.c:1173: unexpected error:
    Nov 5 12:03:18 Macintosh named[59]: internal_send: 192.168.2.6#49197: Cannot allocate memory
    Nov 5 12:03:18 Macintosh named[59]: client 192.168.2.6#49197: error sending response: out of memory
    Nov 5 12:03:23 Macintosh natd[76]: failed to write packet back (Network is unreachable)
    This is a Leopard Macbook sharing it's Airport connection to a G5 desktop plugged in via ethernet running 10.4.10. This arrangement worked just fine before upgrading the laptop to Leopard. All updates have been run on both systems. Needless to say, the desktop is unable to connect. No errors on the 10.4.10 side.

    Still happens after upgrading the desktop to Leopard.

  • Problem : Application run out of memory while processing image I/O.

    Hi,
    I have coded an application (utility) for creating scaled (JPEG) images (thumb nails) and writing (saving) them to files. I tried this with both imageio package of jdk1.4 and com.sun.image.codec.jpeg.* classes of earlier version. Application works with both versions but when I execute it for more (say more than 10 images) images, system becomes very slow and application starts throwing a memory related (OutOfMemoryError) error. Is it that objects of java image related classes consume too much memory ? How to solve this problem ? (My system run P4 processor with 256 MB RAM).
    Awaiting solution,
    Thanx and regards,
    IB

    So I am not alone in this...
    I wrote the jpeg thumbnail generating code over a year ago and now when I am ready to use it in the finished app. I noticed that each process (as monitored using Forte 3's execution window) that instantiates a new ImageIcon object is never killed by the JVM. As more and more processes are started for distinct tasks they build up endlessly. Here's the method which is almost identical to the test code provided in sun's tutorial for generating thumbnails from jpeg and gif image files (http://developer.java.sun.com/developer/TechTips/1999/tt1021.html) :
    public boolean createThumbImage(int maxDim) throws EntegraEntityException {
         * Reads an image in a file and creates
         * a thumbnail in another file.
         * @param this.getImagePath() The name of image file.
         * @param thumb The name of thumbnail file. 
         * Will be created if necessary.
         * @param maxDim The width and height of
         * the thumbnail must
         * be maxDim pixels or less.
           String thumbsource =  this.path + this.filename;
           String thumbdest = this.path + "thumbs_" + maxDim + File.separator/*"\\"*/ + Utilities.replaceString(Utilities.replaceString(this.filename," ","_","ALL").trim(),"[.][a-zA-Z]*",".jpg","ALL");
       //  System.out.println("thumbsource in createthumbimage(): " + thumbsource + "\n");
       //  System.out.println("thumbdest in createthumbimage(): " + thumbdest + "\n");
            try {
                // Get the image from a file.
                java.awt.Image inImage = new ImageIcon (thumbsource).getImage();
                // Determine the scale.
             double scale = (double)maxDim/(double)inImage.getHeight(null);
                if (inImage.getWidth(null) > inImage.getHeight(null)) {
                    scale = (double)maxDim/(double)inImage.getWidth(null);
                // Determine size of new image.
                //One of them
                // should equal maxDim.
                int scaledW = (int)(scale*inImage.getWidth(null));
                int scaledH = (int)(scale*inImage.getHeight(null));
                // Create an image buffer in
                //which to paint on.
                BufferedImage outImage =
                  new BufferedImage(scaledW, scaledH,
                    BufferedImage.TYPE_INT_RGB);
                // Set the scale.
                AffineTransform tx =
                  new AffineTransform();
                // If the image is smaller than
                //the desired image size,
                // don't bother scaling.
                if (scale < 1.0d) {
                    tx.scale(scale, scale);
                // Paint image.
                Graphics2D g2d =
                 outImage.createGraphics();
                g2d.drawImage(inImage, tx, null);
                g2d.dispose();
                // JPEG-encode the image
                //and write to file.
                Utilities.fileMakeDirs(this.path + "thumbs_" + maxDim + File.separator/*"\\"*/);
                Utilities.fileMakeFile(thumbdest);
                OutputStream os =
                 new FileOutputStream(thumbdest);
                JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
                encoder.encode(outImage);
                os.close();
                return true;
            } catch (IOException e) {
                throw new EntegraEntityException("IO exception creating thumbnail for Image object ID: " + this.getId() + " ::",e);
            } catch (EntegraFileIOException fi) {
                throw new EntegraEntityException("File IO exception creating thumbnail for Image object ID: " + this.getId() + " ::",fi);
        //    return false; //Never reached. Since it doesn't live in the "try" block but must be here to ensure method body gets a return value.
    }:During my troubleshooting of the method execution yesterday I discovered that the stuck process only occurs as a consequence of the line shown in bold below :
    java.awt.Image inImage = new ImageIcon (thumbsource).getImage();
    :this indicates to me that there is something wrong with how either the Image object or the ImageIcon file resources are allocated. At first I tried using the "flush()" method of the java.awt.Image class to release the resources to no avail, later I was able to confirm that the error does not occur for the default constructor of ImageIcon only for the one that specifies the source path (as shown in the line above) this indicates that a fileIO stream is being created and probably not being released inside ImageIcon or Image, but since that stream is probably private to those core classes we can't access it to close() it properly. I sure hope I am wrong on this or there is an alternative to using these classes..
    Please let me know if any of you have other ideas on how to quash this bug or can otherwise find flaws in my logic for it's occurance.
    Regards,
    Sent2null

  • Xi runing out of memory during Mapping runtime..

    Hi I have a a scenario where the a certian field in the source can result in multiple line items in the target... I saw that when the the line items increases to over 50,000 lines in the target I get thsi mapping exception -
    During the application mapping com/sap/xi/tf/_MM_Map1_2_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~
    When I reduce the number of potential line items that can be generated then the mapping runs fine... this mapping has a lot of queue java functions. This leads me to believe that that the issue is related to a memory issue...
    How can i overcome this? Are there parameters that can be set to provide more system resources during mapping runtime.

    Hi Aravind,
    your input file is too large thats why you are getting that error.
    Asks your BASIS team to increase the java heap memory.
    Check this link
    Start java engine failure: how to increase space for object heap
    Regards
    Ramesh

  • Loading images JPEG  URGENT!!!!

    Hi every body,
    I have a problem and I need your help.
    I have to calculate images, in fact I have to load several jpg imageswhich own each one a different name.after I have to calculate for each pixel of each image number of colour,green blue red(RGB) and thanks to a math formula I give for each image a reference.
    The problem is that I have to load 300 images.I thought to use a board object(" [] ") but I don't know how can I load each image with a loop for exemple.
    So do you knows the solution for my matter.It is very urgent.
    Thank you very much.
    jerebella

    Do you mean you want to know how to load 300 images into a structure? Or you have X images and dont know what type of structure can dyanamically hold them?
    String Image = "Image"
    String EXT = ".JPG"
    Vector images = new Vector(300);
    For (int i=0; i == 300; i++)
    // Determine the type of object to store them in a vector maybe?
    // Ive not got the book handy to remember how to load the image but
    // once loaded you can add them like this
    Thats something to go on but its been awhile and I dont have my refernce book handy
    sorry i cant be off more help.

  • System out of memory during deployment

    Hello everybody,
    I have a J2EE project and a respective EAR-project to deploy my application on the WebAS 6.40 (SP13).
    Since yesterday I have the problem that when I add a new entity bean to my J2EE project I got the following error during deployment.
    If I remove the entity bean there is no problem to deploy the project.
    I tried a lot of things, e.g. changing the heap size of the developing workspace or of the sdm, but no results. Has someone an idea?
    Is there probably a limit for beans in a J2EE project?
    ===========================================================================
    Deployment started Wed Aug 17 11:58:00 CEST 2005
    ===========================================================================
    Starting Deployment of HPMisEAR
    Aborted: development component 'HPMisEAR'/'com.hp'/'localhost'/'2005.08.17.11.51.27':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application com.hp/HPMisEAR.. Reason: Errors while compiling:
    The system is out of resources.
    Consult the following stack trace for details.
    java.lang.OutOfMemoryError
    ; nested exception is:      com.sap.engine.services.ejb.exceptions.deployment.EJBFileGenerationException: Errors while compiling:
    The system is out of resources.
    Consult the following stack trace for details.
    java.lang.OutOfMemoryError
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment of HPMisEAR finished with Error (Duration 51252 ms)
    Thanks for help,
    Paulo
    Message was edited by: Paulo Calado

    Hi,
    thank you very much, it works now.
    Best regards,
    Paulo

  • Not enough memory loading image

    I have a problem loading an Image in a Motorola 720. Using Image.createImage("name.png") throws an IoException, Not enough memory to load Image. The image decoding method takes a lot of memory.. or at least it looks like that.
    The image is an png 12k and 466x561. I am wondering if it will depend on the program used to save the image, I tried with photoshop and fireworks, without transparencies.
    Any help? any ideas how could I solve the problem loading the image?
    Thanks in advance

    After loading, the image will be 466*561*4 bytes in
    size, 1,045,704 bytes. This formula is incorrect. I have loaded images of size which multiple cross 135000 whereas T720 heap size is 540k

  • Loading JPEG/Gif images causes Out Of Memory Error

    Hello Java gurus, please shed some light on this.....
    I am not a java newbie, but I am a java newbie in the area of dealing with graphics. I am using JDK 1.4.2_01 on Win XP with 2.4ghz and 512 RAM. When I try to read in a (or a few) JPEG image into a JLabel using ImageIcon, I get an out of memory error everytime. This happens whether I am reading the image out of a jar file or out of a local directory. The JPEG's are 8.5" x 11", and range between 150kb to 900kb. I am trying to load approximately 10 images in a JTabbedPane using new JLabel(ImageIcon) on individual JPanels (one JPanel for each JPEG). Now I get the java.lang.outofmemory error whether I try to load 1 image or 10 images. Anyone got a clue as to what I am doing wrong? I actually do get one image loaded before the error gets thrown. So I do know that it is trying to load the right image. What is going on here? Is it an ImageIcon problem, or are there others who have run into this. It has brought this project to a grinding halt, and I had thought this would be the easier part!!!! Please help me out gurus! Thanks!

    What options/values are you suggesting that I set? Or do you mean something else? Thank you for any ideas that can help me solve this problem. I never had any issues dealing with using ImageIcon for toolbar button graphics (file sizes of 1-3kb), but now with dealing with full page graphics I have run into a brick wall with this out of memory error.

  • Getting out of memory exception while loading images in web browser control one by one in windows phone 8 silverlight application?

    Hi, 
    I am developing a windows phone 8 silver light application . 
    In my app I am displaying images in web browser control one by one , those images are the web links , the problem is after displaying 2 to 3 images I am getting out of memory exception .
    I searched for this exception how to over come , everybody are saying memory profiling ,..etc but really I dont know how to release the memory and how to clear the memory .
    In some sites they are adding this
    <FunctionalCapabilities>
    <FunctionalCapability Name="ID_FUNCCAP_EXTEND_MEM"/>
    </FunctionalCapabilities>
    by doing this am I free from out of memory exception?
    Any help ,
    Thanks...
    Suresh.M

    string HtmlString = "<!DOCTYPE html><html><head><meta name='viewport' content='width=device-width,initial-scale=1.0, user-scalable=yes' /></head>";
    HtmlString = HtmlString + "<body>";
    HtmlString = HtmlString + "<img src=" + source +" />";
    HtmlString = HtmlString + "</body></html>";
    innerpagebrowser.NavigateToString(HtmlString);
    that image source is the web link for example www.sss.com/files/xxx/123.jpg .
    Note this link is not real this is sample and image is of size 2071X3097
    Suresh.M

  • Server goes out of memory when annotating TIFF File. Help with Tiled Images

    I am new to JAI and have a problem with the system going out of memory
    Objective:
    1)Load up a TIFF file (each approx 5- 8 MB when compressed with CCITT.6 compression)
    2)Annotate image (consider it as a simple drawString with the Graphics2D object of the RenderedImage)
    3)Send it to the servlet outputStream
    Problem:
    Server goes out of memory when 5 threads try to access it concurrently
    Runtime conditions:
    VM param set to -Xmx1024m
    Observation
    Writing the files takes a lot of time when compared to reading the files
    Some more information
    1)I need to do the annotating at a pre-defined specific positions on the images(ex: in the first quadrant, or may be in the second quadrant).
    2)I know that using the TiledImage class its possible to load up a portion of the image and process it.
    Things I need help with:
    I do not know how to send the whole file back to servlet output stream after annotating a tile of the image.
    If write the tiled image back to a file, or to the outputstream, it gives me only the portion of the tile I read in and watermarked, not the whole image file
    I have attached the code I use when I load up the whole image
    Could somebody please help with the TiledImage solution?
    Thx
    public void annotateFile(File file, String wText, OutputStream out, AnnotationParameter param) throws Throwable {
    ImageReader imgReader = null;
    ImageWriter imgWriter = null;
    TiledImage in_image = null, out_image = null;
    IIOMetadata metadata = null;
    ImageOutputStream ios = null;
    try {
    Iterator readIter = ImageIO.getImageReadersBySuffix("tif");
    imgReader = (ImageReader) readIter.next();
    imgReader.setInput(ImageIO.createImageInputStream(file));
    metadata = imgReader.getImageMetadata(0);
    in_image = new TiledImage(JAI.create("fileload", file.getPath()), true);
    System.out.println("Image Read!");
    Annotater annotater = new Annotater(in_image);
    out_image = annotater.annotate(wText, param);
    Iterator writeIter = ImageIO.getImageWritersBySuffix("tif");
    if (writeIter.hasNext()) {
    imgWriter = (ImageWriter) writeIter.next();
    ios = ImageIO.createImageOutputStream(out);
    imgWriter.setOutput(ios);
    ImageWriteParam iwparam = imgWriter.getDefaultWriteParam();
    if (iwparam instanceof TIFFImageWriteParam) {
    iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
    TIFFDirectory dir = (TIFFDirectory) out_image.getProperty("tiff_directory");
    double compressionParam = dir.getFieldAsDouble(BaselineTIFFTagSet.TAG_COMPRESSION);
    setTIFFCompression(iwparam, (int) compressionParam);
    else {
    iwparam.setCompressionMode(ImageWriteParam.MODE_COPY_FROM_METADATA);
    System.out.println("Trying to write Image ....");
    imgWriter.write(null, new IIOImage(out_image, null, metadata), iwparam);
    System.out.println("Image written....");
    finally {
    if (imgWriter != null)
    imgWriter.dispose();
    if (imgReader != null)
    imgReader.dispose();
    if (ios != null) {
    ios.flush();
    ios.close();
    }

    user8684061 wrote:
    U are right, SGA is too large for my server.
    I guess oracle set SGA automaticlly while i choose default installion , but ,why SGA would be so big? Is oracle not smart enough ?Default database configuration is going to reserve 40% of physical memory for SGA for an instance, which you as a user can always change. I don't see anything wrong with that to say Oracle is not smart.
    If i don't disincrease SGA, but increase max-shm-memory, would it work?This needs support from the CPU architecture (32 bit or 64 bit) and the kernel as well. Read more about the huge pages.

  • Memory limitation to load a Jpeg

    Hi all,
    I want to use the loader component to load an image within my
    Flash lite movie, when I try to do it with a Jpeg (612pix X 792 pix
    / 96dpi X 96dpi), the device emulator says me in runtime:
    Problem with content: 11 - Not enough memory available to
    decompress
    if I do the same with another Jpeg (533pix X 526 pix / 96dpi
    X 96dpi) there is no problem.
    My question is: what are the memory limitations to load and
    to display an Image (Jpeg or bitmap)?

    Hi Thamis,
    Take a look at the flash.net.FileReference class here:
    http://livedocs.macromedia.com/flex/2/langref/index.html
    This is the built in Flash support for file upload. You'd
    handle the upload with a servlet/jsp/etc. server-side component to
    save it to disk or as binary data in a database.
    Best,
    Seth

  • ERROR [B3108]: Unrecoverable out of memory error during a cluster operation

    We are using Sun Java(tm) System Message Queue Version: 3.5 SP1 (Build 48-G). We are using two JMS servers as a cluster.
    But we frequently getting the out of memory issue during the cluster operation.
    Messages also got queued up in the Topics. Eventhough listeners have the capability to reconnect with the Server after the broker restarting, usually we are restarting consumer instances to get work this.
    Here is detailed log :
    Jan 5 13:45:40 polar1-18.eastern.com imqbrokerd_cns-jms-18[8980]: [ID 478930 daemon.error] ERROR [B3108]: Unrecoverable out of memory error during a cluster operation. Shutting down the broker.
    Jan 5 13:45:57 polar1-18.eastern18.chntva1-dc1.cscehub.com imqbrokerd: [ID 702911 daemon.notice] Message Queue broker terminated abnormally -- restarting.
    Expecting your attention on this.
    Thanks

    Hi,
    If you do not use any special cmdline options, how do you configure your servers/
    brokers to 1 Gb or 2 Gb JVM heap ?
    Regarding your question on why the consumers appear to be connecting to just
    one of the brokers -
    How are the connection factories that the consumers use configured ?
    Is the connection factory configured using the imqAddressList and
    imqAddressListBehavior attributes ? Documentation for this is at:
    http://docs.sun.com/source/819-2571/ref_adminobj_props.html#wp62463
    imqAddressList should contain a list of brokers (i.e. 2 for you) in the cluster
    e.g.
    mq://server1:7676/jms,mq://server2:7676/jms
    imqAddressListBehavior defines how the 2 brokers in the above list are picked.
    The default is in the order of the list - so mq://server1:7676/jms will always be
    picked by default. If you want random behavior (which will hopefully even out the
    load), set imqAddressListBehavior to RANDOM.
    regards,
    -i
    http://www.sun.com/software/products/message_queue/index.xml

Maybe you are looking for