- Posts: 28
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Fatal Crashes when open & close PDF multiple times
IP: 192.168.0.71
11 years 8 months ago #8189
by oemilk
Fatal Crashes when open & close PDF multiple times was created by oemilk
Hi.
This is not "Document close" crash..
1. heap corruption detected by dlfree (Fatal signal 6 (SIGABRT))
2. signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr
3. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00002308
- /data/app-lib/com.access_company.android.docdrive-2/librdpdf.so (Java_com_radaee_pdf_Page_renderToBmp+278)
This is not "Document close" crash..
1. heap corruption detected by dlfree (Fatal signal 6 (SIGABRT))
2. signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr
3. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00002308
- /data/app-lib/com.access_company.android.docdrive-2/librdpdf.so (Java_com_radaee_pdf_Page_renderToBmp+278)
IP: 192.168.0.71
11 years 8 months ago #8191
by radaee
Replied by radaee on topic Fatal Crashes when open & close PDF multiple times
yes, i think it is render page after Document closed:
correct:
incorrect:
you can write log in Document.Close() and Page.RenderXXX() and Page.Close(), and PageObjsStart().
and so on.
got sequence of logs.
correct:
Code:
Page page = Document.GetPage(pageno);
page.RenderToBmp();
page.Close();
Document.Close();
Code:
Page page = Document.GetPage(pageno);
Document.Close();
page.RenderToBmp();
page.Close();
and so on.
got sequence of logs.
IP: 192.168.0.71
11 years 8 months ago #8200
by oemilk
Replied by oemilk on topic Fatal Crashes when open & close PDF multiple times
I understand third crash.
(3. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00002308
- /data/app-lib/com.access_company.android.docdrive-2/librdpdf.so (Java_com_radaee_pdf_Page_renderToBmp+278))
So I fixed it like below codes.
But I do not understand others.
I think "heap corruption detected by dlfree" is not "Document close" problem...
(3. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00002308
- /data/app-lib/com.access_company.android.docdrive-2/librdpdf.so (Java_com_radaee_pdf_Page_renderToBmp+278))
So I fixed it like below codes.
Code:
if(doc.IsOpen){
Page page = doc.GetPage(pageno);
page.ObjsStart();
.....
}
But I do not understand others.
I think "heap corruption detected by dlfree" is not "Document close" problem...
Time to create page: 0.399 seconds