java.lang.OutOfMemoryError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • If you go to a web page with many images, JavaFx WebView uses way too much heap to load the web page. For example, this particular web page has 340 images: https://github.com/d3/d3/wiki/Gallery JavaFx WebView takes around 6.7 GB of heap in order to render the page. Firefox takes around 500 MB. Here are some example heap overflow stacks if you only set you heaps to 2 GB or so: {code} Exception in thread "JavaFX Application Thread" java.lang.OutOfMemoryError: Java heap space at com.sun.javafx.iio.gif.GIFImageLoader2.decodePalette(GIFImageLoader2.java:323) at com.sun.javafx.iio.gif.GIFImageLoader2.load(GIFImageLoader2.java:234) at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:364) at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:274) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:173) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:186) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.addImageData(WCImageDecoderImpl.java:109) at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method) at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(URLLoader.java:838) at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$98(URLLoader.java:829) at com.sun.webkit.network.URLLoader$$Lambda$314/1527838714.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at com.sun.javafx.application.PlatformImpl$$Lambda$179/203274438.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.javafx.application.PlatformImpl$$Lambda$178/1044483803.run(Unknown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at com.sun.glass.ui.win.WinApplication$$Lambda$167/1747735167.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) {code}
    via by Guixin Cheng,
  • OutOfMemoryError
    via GitHub by cyildirim
    ,
  • JavaFX OutOfMemoryError with animated GIFs
    via Stack Overflow by DePhille
    ,
  • If you go to a web page with many images, JavaFx WebView uses way too much heap to load the web page. For example, this particular web page has 340 images: https://github.com/d3/d3/wiki/Gallery JavaFx WebView takes around 2GB of heap in order to render the page. Firefox takes around 500 MB. When using JavaSE8u112 to run attached JavaFX program, we get heap overflow with 1 GB heap. The backtrace of the overflow is shown below. Exception in thread "JavaFX Application Thread" java.lang.OutOfMemoryError: Java heap space at com.sun.javafx.iio.gif.GIFImageLoader2.decodePalette(GIFImageLoader2.java:323) at com.sun.javafx.iio.gif.GIFImageLoader2.load(GIFImageLoader2.java:234) at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:364) at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:274) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:179) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:192) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.getImageFrame(WCImageDecoderImpl.java:292) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.getFrame(WCImageDecoderImpl.java:251) at com.sun.webkit.WebPage.twkUpdateContent(Native Method) at com.sun.webkit.WebPage.updateDirty(WebPage.java:296) at com.sun.webkit.WebPage.updateContent(WebPage.java:615) at com.sun.javafx.sg.prism.web.NGWebView.update(NGWebView.java:74) at javafx.scene.web.WebView.handleStagePulse(WebView.java:999) at javafx.scene.web.WebView.lambda$new$29(WebView.java:280) at javafx.scene.web.WebView$$Lambda$257/31349198.pulse(Unknown Source) at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Toolkit.java:355) at com.sun.javafx.tk.Toolkit$$Lambda$280/1609529788.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:354) at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:378) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490) at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319) at com.sun.javafx.tk.quantum.QuantumToolkit$$Lambda$171/463039962.run(Unknown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at com.sun.glass.ui.win.WinApplication$$Lambda$167/2002871171.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)
    via by Guixin Cheng,
    • java.lang.OutOfMemoryError: Java heap space at com.sun.javafx.iio.gif.GIFImageLoader2.decodePalette(GIFImageLoader2.java:323) at com.sun.javafx.iio.gif.GIFImageLoader2.load(GIFImageLoader2.java:234) at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:364) at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:274) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:173) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:186) at com.sun.javafx.webkit.prism.WCImageDecoderImpl.addImageData(WCImageDecoderImpl.java:109) at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method) at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(URLLoader.java:838) at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$98(URLLoader.java:829)
    No Bugmate found.