Crash on PDFVPage Render - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: Crash on PDFVPage Render

Crash on PDFVPage Render 4 years 5 months ago #6381

  • davidengler
  • davidengler's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
We have submitted the iOS version, and we are getting crash reports on daily basis for this code in PDFVPage.m

-(void)Render
{
if( m_status == 2 ) return;
if( !m_page )
m_page = [m_doc page:m_pageno]; // this is line 79 . most crashes in this line <
if( m_dib == 0 )
{
PDFDIB *dib = [[PDFDIB alloc] init:m_dibw: m_dibh];
[m_page renderPrepare:dib];
m_dib = dib;
}
else
[m_page renderPrepare:m_dib];
if( m_status == 2 ) return;
PDFMatrix *mat = [[PDFMatrix alloc] init:m_scale: -m_scale: 0: m_dibh];
[m_page render:m_dib :mat :renderQuality]; // this is line 90 . some crashes on this line <
[self RenderFinish];
}

Here are example crash reports:

14
Crashed: com.apple.root.default-overcommit-priority
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x80000004
raw
0
KReader
CPDFPageTree::pro_get_page(int&, CRDLocker&)
1
KReader
CPDFPageTree::pro_get_page(int&, CRDLocker&)
2
KReader
CPDFPageTree::pro_get_page(int&, CRDLocker&)
3
KReader
CPDFPageTree::pro_get_page(int&, CRDLocker&)
4
KReader
CPDFDoc::DocGetPage(int)
5
KReader
Document_getPage
6
KReader
PDFObjc.m line 1053
-[PDFDoc page:]
7
KReader
PDFVPage.m line 79
-[PDFVCache Render]
8
KReader
PDFVThread.m line 26
thread_route
9
libsystem_pthread.dylib
_pthread_body + 140
10
libsystem_pthread.dylib
_pthread_start + 102

2nd example:

Crashed: com.apple.root.default-overcommit-priority
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0xe5d08384
raw
0
KReader
CPDFGProcessor::process(PDF_GPROCESS_PARA const*)
1
KReader
CPDFGProcessor::process(PDF_GPROCESS_PARA const*)
2
KReader
CPDFPage::render_page(CPDFGRender*, _RDMATRIX const&, int, CPDFPageSession&)
3
KReader
CPDFDoc::Page_Render(void*, CPDFGRender*, _RDMATRIX const&, int, CPDFPageSession&)
4
KReader
Page_render
5
KReader
PDFVPage.m line 90
-[PDFVCache Render]
6
KReader
PDFVThread.m line 26
thread_route
7
libsystem_pthread.dylib
_pthread_body + 140
8
libsystem_pthread.dylib
_pthread_start + 102

Thank you

Please Log in or Create an account to join the conversation.

Crash on PDFVPage Render 4 years 5 months ago #6382

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
it seems you closed document first and close PDFView later.
you shall close PDFView first by invoke [PDFVThumb vClose], [PDFView vClose];
and then close Document object.
The following user(s) said Thank You: oneenam

Please Log in or Create an account to join the conversation.

Crash on PDFVPage Render 4 years 5 months ago #6384

  • davidengler
  • davidengler's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Works now

Please Log in or Create an account to join the conversation.

Crash on PDFVPage Render 4 years 5 months ago #6410

  • davidengler
  • davidengler's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Is it a problem to process 2 PDFView objects with the same document simultaneously?
Or do I have to create a new PDFDoc object for each?

Please Log in or Create an account to join the conversation.

Crash on PDFVPage Render 4 years 5 months ago #6413

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
1 document object is OK.
and close all view before document object destroyed.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum