Hello,
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).
public void open(Document doc) {
m_pdv = new PDFCustomView(getContext());
m_pdv.vClose();
if (zoomListener != null) {
m_pdv.setZoomListener(zoomListener);
}
m_pdv.vOpen(doc, 4, 0xFFCCCCCC, this);
m_pdv.vResize(getWidth(), getHeight());
invalidate();
}
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!