×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    33

    OutOfMemoryError

    Dear all,
    I made two proxies to exchange recorded voice using sip and udp. But at continuous conversation, at the receiving end, I am shown the following error in NetBeans emulator:
    "Uncaught exception java/lang/OutOfMemoryError."
    I increased the emulator heap size but same error happens again. I wanna know what is perfect heap size and other configurations like Storage size and Storage root directory - if they are necessary.
    My code is here:
    Code:
    while(!receiving_finished)
              {
                    Datagram dg = dc_server.newDatagram(dc_server.getMaximumLength());
                    dc_server.receive(dg);
                    byte[] temp = dg.getData();
                    byte[] decompressed = Compressor.decompress(temp);
               
                    ByteArrayInputStream bais = new ByteArrayInputStream(decompressed);
                    Player p2 = Manager.createPlayer(bais,"audio/x-wav");
                    p2.start();
                    dg.reset();
                    bais.reset();
                    
                    dg = null;
                    bais = null;
                    temp = null;
                    decompressed = null;
              }
    What exsactly should I do? Is there any fault in my code, if so, plz tell me. It is an emergency case for me.
    Thanks in advance.

    Regards,
    Prithwi.

  2. #2
    Super Contributor
    Join Date
    Feb 2006
    Posts
    689

    Re: OutOfMemoryError

    Hi,
    try by deallocating,closing and making the player to null.

    Thanks
    Soku

Similar Threads

  1. Midlet OutOfMemoryError
    By Stony1978 in forum Mobile Java General
    Replies: 18
    Last Post: 2009-10-21, 14:02
  2. OutOfMemoryError on Nokia 6210 Navigator when opening multiple connections
    By arbitronicus in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2009-02-21, 04:07
  3. [moved] outofmemoryerror in nokia 3120 classic
    By unread_chapter in forum Mobile Java General
    Replies: 4
    Last Post: 2008-07-25, 19:38
  4. OutOfMemoryError while reading remote file
    By a_nemoff in forum Mobile Java General
    Replies: 1
    Last Post: 2006-04-27, 17:04
  5. OutOfMemoryError in Nokia 6680
    By jesgue in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 0
    Last Post: 2005-11-28, 09:39

Posting Permissions

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