Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfMemory error pri veľkom PDF #19

Open
celuchmarek opened this issue Jun 21, 2024 · 0 comments
Open

OutOfMemory error pri veľkom PDF #19

celuchmarek opened this issue Jun 21, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@celuchmarek
Copy link
Member

celuchmarek commented Jun 21, 2024

Pri zobrazovaní veľkých PDF appka padne s errorom, že došla pamäť. Ide o to, že z Flutter-a sa posielajú data "dole" na Android čast a tam sa to reálne serializuje ako data.

konkretne:

java.lang.OutOfMemoryError: Failed to allocate a 158188304 byte allocation with 25165824 free bytes and 92MB until OOM, target footprint 197056640, growth limit 268435456
       at java.util.Arrays.copyOf(Arrays.java:3578)
       at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:120)
       at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:95)
       at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:137)
       at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:243)
       at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:284)
       at io.flutter.plugin.common.StandardMethodCodec.encodeMethodCall(StandardMethodCodec.java:38)
       at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:119)
       at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:102)
       at net.nfet.flutter.printing.PrintingHandler.onPageRasterized(PrintingHandler.java:194)
       at net.nfet.flutter.printing.PrintingJob.lambda$rasterPdf$3(PrintingJob.java:471)

a

java.lang.OutOfMemoryError: Failed to allocate a 154606032 byte allocation with 25165824 free bytes and 38MB until OOM, target footprint 186367704, growth limit 201326592
       at java.util.Arrays.copyOf(Arrays.java:3161)
       at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
       at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
       at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
       at io.flutter.plugin.common.StandardMessageCodec.writeBytes(StandardMessageCodec.java:196)
       at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:247)
       at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:285)
       at io.flutter.plugin.common.StandardMethodCodec.encodeMethodCall(StandardMethodCodec.java:38)
       at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:119)
       at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:102)
       at net.nfet.flutter.printing.PrintingHandler.onPageRasterized(PrintingHandler.java:194)
       at net.nfet.flutter.printing.PrintingJob.lambda$rasterPdf$3(PrintingJob.java:471)

Lepšie bude asi uložiť a zobrazovať nejaký temporary file://

@Matej-Hlatky Matej-Hlatky added the bug Something isn't working label Jun 23, 2024
@Matej-Hlatky Matej-Hlatky self-assigned this Jun 24, 2024
@Matej-Hlatky Matej-Hlatky pinned this issue Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants