Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

OutOfMemory errors while loading files 9 years 6 months ago #7368

  • jorisk
  • jorisk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 37
  • Thank you received: 0
Hello,

I have few problems to load PDF files (probably heavy ones) the first time. When they finished to be downloaded in the internal memory, I try to load them, but I have OutOfMemoryError which come from the PDFReader.java file. The app is closed, but when I reload it, the (already downloaded) files load normally.
Do you know what kind of problem can cause this?

Many thanks by advance!

P.S. : I am unable to post the Logs as Attachments directly in the post, so here are the links:
- First error: hpics.li/5ba3aac
- Second error: hpics.li/df7d55c

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

Last edit: by manchu. Reason: Logs pictures

OutOfMemory errors while loading files 9 years 6 months ago #7369

  • jorisk
  • jorisk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 37
  • Thank you received: 0
The first error seems to be caused by this part in PDFReader.java:
@Override
protected void onSizeChanged( int w, int h, int oldw, int oldh )
{
super.onSizeChanged(w,h,oldw,oldh);
if( m_view == null ) return;
PDFPos pos = m_view.vGetPos(0, 0);
m_view.vResize(w, h); // THIS LINE
if( m_goto_pageno >= 0 )
{
m_view.vGotoPage(m_goto_pageno);
m_goto_pageno = -1;
}
else if( pos != null )
{
m_view.vSetPos(pos, 0, 0);
}
}
And the second one is caused by this part in PDFThumbView.java:
@Override
protected void onSizeChanged( int w, int h, int oldw, int oldh )
{
if( m_thumb != null )
m_thumb.vResize(w, h); // THIS LINE
}

Any ideas?

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

Last edit: by manchu.

OutOfMemory errors while loading files 9 years 6 months ago #7432

  • jorisk
  • jorisk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 37
  • Thank you received: 0
UP

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

  • Page:
  • 1
Powered by Kunena Forum