- Posts: 7
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
How to avoid OutOfMemoryError
- douglasmedia
- Topic Author
- Offline
- New Member
-
I am developing an android app which uses the pdf sdk (latest version) in a viewpager. Before I open the document, I called vClose() to avoid memory leaks (I got an OutOfMemoryError without that).
But now, I sometimes got another error which seems to be deeper in the library:
09-16 10:36:53.593 17291-17291/de.***.meinort W/Adreno-GSL﹕ <sharedmem_gpumem_alloc_id:1489>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
09-16 10:36:53.593 17291-17291/de.***.meinort E/Adreno-GSL﹕ <ioctl_kgsl_sharedmem_alloc:1590>: ioctl_kgsl_sharedmem_alloc: FATAL ERROR : (null)
09-16 10:36:53.593 17291-18889/de.***.meinort A/libc﹕ bionic/libstdc++/src/pure_virtual.cpp:6: void __cxa_pure_virtual(): assertion "!"Pure virtual function called. Are you calling virtual methods from a destructor?"" failed
09-16 10:36:53.603 17291-18889/de.***.meinort A/libc﹕ Fatal signal 6 (SIGABRT) at 0x0000438b (code=-6), thread 18889 (Thread-16118)
How can I avoid this crash?
Thanks for your help!
m_pdv = new PDFCustomView(getContext());
m_pdv.vClose();
???
as i tink, it should be:
if( m_pdv != null ) m_pdv.vClose();
m_pdv = new PDFCustomView(getContext());
- douglasmedia
- Topic Author
- Offline
- New Member
-
- Posts: 7
- Thank you received: 0
09-19 10:25:12.336 16618-16618/de.geigerverlag.meinort W/Adreno-GSL﹕ <sharedmem_gpumem_alloc_id:1489>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
09-19 10:25:12.336 16618-16618/de.geigerverlag.meinort E/Adreno-GSL﹕ <ioctl_kgsl_sharedmem_alloc:1590>: ioctl_kgsl_sharedmem_alloc: FATAL ERROR : (null)
09-19 10:25:12.346 16618-17519/de.geigerverlag.meinort A/libc﹕ bionic/libstdc++/src/pure_virtual.cpp:6: void __cxa_pure_virtual(): assertion "!"Pure virtual function called. Are you calling virtual methods from a destructor?"" failed
09-19 10:25:12.356 16618-17519/de.geigerverlag.meinort A/libc﹕ Fatal signal 6 (SIGABRT) at 0x000040ea (code=-6), thread 17519 (Thread-27888)
// Edit:
PS: Now, the OOM occurs when I try to resize the view with m_pdv.vResize(getWidth(), getHeight());
How to solve this issue?
or any large bitmaps out of PDFView?
using Bitmap.recycle() to free memory, if you has many Bitmap objects or a large Bitmap object allocated.