Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P poppler
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 656
    • Issues 656
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Issues
  • #912

Closed
Open
Created May 04, 2020 by Игорь Буянов@aarmaageedoon1

Can't catch the error of page creation

Hello.

I faced with catching an error problem. I try to create a page, but the program prints me

poppler/error: Failed to parse XRef entry [733].poppler/error: Top-level pages object is wrong type (null)

My code for catching such a problems looks like this

poppler::page* p;

if((p = pDoc_pdf->create_page(i)) == NULL)
{
    corrupted_pages[filepath].push_back(i);
    continue;
}
pdf_text = p->text();

According to the documentation here the function create_page should return exactly NULL if something goes wrong. Unfortunately, it doesn't work and when I try to get the text, the program crashes. Digging into the code of poppler, I realized, that it actually would return the nullptr, so I tried to replace the NULL to nullptr. However, it doesn't work and the condition is passed anyway.

I attached the file, that causes an error.

Thank for the help.

Edited May 04, 2020 by Игорь Буянов
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking