  | 
    
 
  
    
    
      
        
          
         Author | 
        
         Topic: Out of Memory errors  (Read 2732 times) | 
       
     
     | 
   
 
  
    
    
      
        
        
          
            
            metaphorz 
 
     
      
             | 
            
            
            
              
                
                Out of Memory errors 
                «  on: Sep 13th, 2004, 4:51pm » | 
                
                
 
                 | 
               
             
             
            
               System: Windows XP, Version 0068   Browser: Internet Explorer 6.0 (latest)      I have noticed, when running applets produced by   Processing, with additional libraries that I   use, that occasionally, I get      java.lang.OutOfMemory   errors in the Java console      This happens when I move back and forth beteeen   applets, linked via a central web page.      I will admit right now that this may not be a   Processing issue, but rather one of Java, but    don't know, and am   seeking ideas on how to avoid this error -- is it   solely a matter of reducing the allocated sizes of   arrays?       The out of memory error occurs within Processing   programs that have been linked to SimPackJ (our   Java library) and Jsyn. No doubt, this overloads   the running of applets in some way.      Any hints would be appreciated on trying to    address this problem -- it is intermittent and   seems to occur when trying 4 or 5 applets in a row   (with the "Back" button in IE to go to the next   applet). 
            
             | 
           
            | 
            
            
            
             | 
           
         
         | 
       
     
     | 
   
 
  
    
    
      
        
        
          
            
            fry 
 
 
        
      
             | 
            
            
            
              
                
                Re: Out of Memory errors 
                « Reply #1 on: Sep 13th, 2004, 5:05pm » | 
                
                
 
                 | 
               
             
             
            
            i'd lean towardst thinking this is an IE problem, since it's not disposing of the applets properly.. although it's possibel there's some work we could do in making applet disposal behave a little better, i just haven't had a chance to look into it. maybe it's a mini-project someone could work on once the code is opened up. 
            
             | 
           
            | 
            
            
            
             | 
           
         
         | 
       
     
     | 
   
 
  
    
    
      
        
        
          
            
            metaphorz 
 
     
      
             | 
            
            
            
              
                
                Re: Out of Memory errors 
                « Reply #2 on: Sep 13th, 2004, 6:24pm » | 
                
                
 
                 | 
               
             
             
            
               Yeah. I think you may be right. I just tried an   experiment where I did my usual flipping back   and forth between Processing applets (esp. the   ones with Jsyn incorporated), and found that I   could not break Netscape 7.1, whereas IE 6 gives   me the following typical things ater a few   applet invocations (BTW, check out   the "obsolete interface" error, which seems   to emanate from Processing):         java.lang.OutOfMemoryError   java.lang.OutOfMemoryError   java.lang.InternalError: obsolete interface used       at sun.java2d.NullSurfaceData.getRaster(Unknown Source)       at sun.java2d.loops.OpaqueCopyAnyToArgb.Blit(Unknown Source)       at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown Source)       at sun.java2d.loops.MaskBlit$General.MaskBlit(Unknown Source)       at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Unknown Source)       at sun.java2d.pipe.DrawImage.blitSurfaceData(Unknown Source)       at sun.java2d.pipe.DrawImage.renderSurfaceData(Unknown Source)       at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)       at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)       at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)       at sun.java2d.SunGraphics2D.drawImage(Unknown Source)       at sun.java2d.SunGraphics2D.drawImage(Unknown Source)       at sun.plugin.AppletViewer.paintForegrnd(Unknown Source)       at sun.plugin.AppletViewer.paint(Unknown Source)       at sun.awt.RepaintArea.paint(Unknown Source)       at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)       at java.awt.Component.dispatchEventImpl(Unknown Source)       at java.awt.Container.dispatchEventImpl(Unknown Source)       at java.awt.Component.dispatchEvent(Unknown Source)       at java.awt.EventQueue.dispatchEvent(Unknown Source)       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)       at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)       at java.awt.EventDispatchThread.run(Unknown Source)      java.lang.OutOfMemoryError      
            
             | 
           
            | 
            
            
            
             | 
           
         
         | 
       
     
     | 
   
 
  
    
    
      
        
        
          
            
            metaphorz 
 
     
      
             | 
            
            
            
              
                
                Re: Out of Memory errors 
                « Reply #3 on: Sep 30th, 2004, 10:55pm » | 
                
                
 
                 | 
               
             
             
            
               Just to close out this thread, this was my   coding problem and not a browser issue- the   code, indeed, was in a loop eating memory.      -pf 
            
             | 
           
            | 
            
            
            
             | 
           
         
         | 
       
     
     | 
   
 
 
 |