10 Replies Latest reply: Jan 11, 2010 2:52 PM by 796085 RSS

    runnig out of memory

    843798
      we have been trying to remove the following error

      out.of.memory

      we have tried using Xmx & Xms in following way

      java -Xms1024m -Xmx1024m -jar FrameAccess.jar

      error:-> Failed to load Main-Class manifest attribute from
      FrameAccess.jar
      or please suggest suitable way out if any...

      thanks
      neeraj
        • 1. Re: runnig out of memory
          791266
          So does the FrameAccess.jar contain a manifest file, and what does that manifest say?
          • 2. Re: runnig out of memory
            796085
            And what does "Failed to load Main-Class manifest attribute" have to do with running out of memory.

            Either way, I bet you all the money in the world that you've never got an error that reads "out.of.memory" from any Sun code.

            You should post the EXACT text of the error message you're seeing.
            • 3. Re: runnig out of memory
              843798
              thanx for your rep guys...but i paste the exact error here...one of the remedy was to use the jar file so i used it...and then it gave me the error that unable to find menifest attr...finallt we tried again with the Xms and Xmx options and was not able to allocate the memory...can u suggest any idea...???also do i need to use these options everytime when i run that code or only once??please guys help me out...
              i will be very thankful.....
              • 4. Re: runnig out of memory
                791266
                out.of.memory
                That was not the exact error message.

                .. and yes you need to define -Xms and -Xmx each time.

                Kaj
                • 5. Re: runnig out of memory
                  843798
                  hi kaj can you give me your email id????
                  • 6. Re: runnig out of memory
                    791266
                    Neeraj87 wrote:
                    hi kaj can you give me your email id????
                    I will only answer questions that you post here.

                    Kaj
                    • 7. Re: runnig out of memory
                      843798
                      ok no issues...
                      here is the output i am getting...:->

                      C:\java>java FrameAccess file:h:\vid\vid3.avi
                      Image width = 640
                      Image height = 480
                      Video format: RGB, 640x480, FrameRate=12.9, Length=0, 16-bit, Masks=31744:992:3
                      , PixelStride=2, LineStride=1280, Flipped, LittleEndian
                      Post: frame #: 1, time: 0.0, len: 614400
                      Post: frame #: 2, time: 0.07, len: 614400
                      Post: frame #: 3, time: 0.15, len: 614400
                      Post: frame #: 4, time: 0.23, len: 614400
                      Post: frame #: 5, time: 0.3, len: 614400
                      Post: frame #: 6, time: 0.38, len: 614400
                      Post: frame #: 7, time: 0.46, len: 614400
                      Post: frame #: 8, time: 0.54, len: 614400
                      Post: frame #: 9, time: 0.61, len: 0
                      Post: frame #: 10, time: 0.69, len: 0
                      Post: frame #: 11, time: 0.77, len: 0
                      Post: frame #: 12, time: 0.84, len: 614400
                      Post: frame #: 13, time: 0.92, len: 614400
                      Post: frame #: 14, time: 1.0, len: 614400
                      Post: frame #: 15, time: 1.08, len: 0
                      Post: frame #: 16, time: 1.15, len: 0
                      Post: frame #: 17, time: 1.23, len: 614400
                      Post: frame #: 18, time: 1.31, len: 614400
                      Post: frame #: 19, time: 1.39, len: 614400
                      Post: frame #: 20, time: 1.46, len: 614400
                      Post: frame #: 21, time: 1.54, len: 614400
                      Post: frame #: 22, time: 1.62, len: 614400
                      Post: frame #: 23, time: 1.69, len: 614400
                      Post: frame #: 24, time: 1.77, len: 614400
                      Post: frame #: 25, time: 1.85, len: 614400
                      Post: frame #: 26, time: 1.93, len: 614400
                      Post: frame #: 27, time: 2.0, len: 0
                      Post: frame #: 28, time: 2.08, len: 0
                      Post: frame #: 29, time: 2.16, len: 614400
                      Post: frame #: 30, time: 2.23, len: 0
                      Post: frame #: 31, time: 2.31, len: 0
                      Post: frame #: 32, time: 2.39, len: 614400
                      Post: frame #: 33, time: 2.47, len: 614400
                      Post: frame #: 34, time: 2.54, len: 614400
                      Post: frame #: 35, time: 2.62, len: 614400
                      Post: frame #: 36, time: 2.7, len: 614400
                      Post: frame #: 37, time: 2.78, len: 614400
                      Post: frame #: 38, time: 2.85, len: 0
                      Post: frame #: 39, time: 2.93, len: 0
                      Post: frame #: 40, time: 3.01, len: 614400
                      Post: frame #: 41, time: 3.08, len: 614400
                      Post: frame #: 42, time: 3.16, len: 0
                      Post: frame #: 43, time: 3.24, len: 0
                      Post: frame #: 44, time: 3.32, len: 614400
                      Post: frame #: 45, time: 3.39, len: 614400
                      Post: frame #: 46, time: 3.47, len: 614400
                      Post: frame #: 47, time: 3.55, len: 614400

                      java.lang.OutOfMemoryError
                      • 8. Re: runnig out of memory
                        796085
                        So you're trying to do some video processing without telling the JVM how much memory to allocate for the heap. The default is likely to be too small for this kind of application. You just need to run with the an appropriately sized heap (using the -Xmx JVM parameter). Running it as an executable JAR isn't going to make any difference.

                        Do you see how "java.lang.OutOfMemoryError" and "out.of.memory" are two different things? As far as we were concerned, the latter could have been coming from any unknown piece of dodgy code.
                        • 9. Re: runnig out of memory
                          843798
                          yeah.it was my mistake...sorry for that.can you give me exact syntax please???
                          r u concerned with IMAGING API???
                          • 10. Re: runnig out of memory
                            796085
                            I can, but you're not going to learn anything that way. Take a look at the JVM documentation.

                            I don't know anything about image/video processing except that these are things that take a large amount of memory.