Hello;
My app loading in mylist all pictures.
I trying big sized pictures from lan. (1-2mb). When I loaded 3 pcs , I read some error like under below.
How can fix it.
it s broken line on "initialize."
I've tried uploading a lot of pictures. (size 300Kb) but it s not broken.
I've tried uploading 2 PNG pictures. (size 1640Kb) After app broked when I added 3. PNG picture.
all png pictures are same file.
My app loading in mylist all pictures.
I trying big sized pictures from lan. (1-2mb). When I loaded 3 pcs , I read some error like under below.
How can fix it.
it s broken line on "initialize."
B4X:
Dim bmp As Image
bmp.Initialize2(File.OpenInput(xDir,xName))
I've tried uploading a lot of pictures. (size 300Kb) but it s not broken.
I've tried uploading 2 PNG pictures. (size 1640Kb) After app broked when I added 3. PNG picture.
all png pictures are same file.
Waiting for debugger to connect...
Program started.
burası kıralabilir
resize gerisi
16:05:34
java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
at com.sun.javafx.iio.png.PNGImageLoader2.load(PNGImageLoader2.java:652)
at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:364)
at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:274)
at com.sun.javafx.tk.quantum.PrismImageLoader2.loadAll(PrismImageLoader2.java:142)
at com.sun.javafx.tk.quantum.PrismImageLoader2.<init>(PrismImageLoader2.java:77)
at com.sun.javafx.tk.quantum.QuantumToolkit.loadImage(QuantumToolkit.java:732)
at javafx.scene.image.Image.loadImage(Image.java:1073)
at javafx.scene.image.Image.initialize(Image.java:804)
at javafx.scene.image.Image.<init>(Image.java:707)
at anywheresoftware.b4j.objects.ImageViewWrapper$ImageWrapper.Initialize2(ImageViewWrapper.java:129)
at b4j.example.resim._addpicture(resim.java:193)
at b4j.example.main._button1_click(main.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:628)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at com.sun.javafx.application.PlatformImpl$$Lambda$49/341111117.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:119)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
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$147(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
at com.sun.javafx.iio.png.PNGImageLoader2.load(PNGImageLoader2.java:652)
at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:364)
at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:274)
at com.sun.javafx.tk.quantum.PrismImageLoader2.loadAll(PrismImageLoader2.java:142)
at com.sun.javafx.tk.quantum.PrismImageLoader2.<init>(PrismImageLoader2.java:77)
at com.sun.javafx.tk.quantum.QuantumToolkit.loadImage(QuantumToolkit.java:732)
at javafx.scene.image.Image.loadImage(Image.java:1073)
at javafx.scene.image.Image.initialize(Image.java:804)
at javafx.scene.image.Image.<init>(Image.java:707)
at anywheresoftware.b4j.objects.ImageViewWrapper$ImageWrapper.Initialize2(ImageViewWrapper.java:129)
at b4j.example.resim._addpicture(resim.java:193)
at b4j.example.main._button1_click(main.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:628)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at com.sun.javafx.application.PlatformImpl$$Lambda$49/341111117.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
Last edited: