Here is some sample code:

> PdfMemDocument doc;
> const PdfMemDocument indoc1("doc1.pdf");
> const PdfMemDocument indoc2("doc2.pdf");
> PdfOutlines * outout = doc.GetOutlines();
> outout->CreateRoot("doc1.pdf");
> PdfOutlineItem* root = doc.GetOutlines()->First();
> doc.InsertPages(indoc1,0,3);
> root->SetDestination(PdfDestination(doc.GetPage(0)));
> auto nextroot = root->Next();
> if (nextroot) root->InsertChild(nextroot);
> auto x = doc.GetOutlines()->First();
> x->Erase();

doc1 has an outline consists of one item and one more inside. Debugger
shows that x is not NULL
and seg fault appears after x->Erase().

The file which causes crashes dropbox.com/s/v6kiu69dqc56ptc/doc1.pdf

Some patch was adviced by Matthew, located on this mailing list.

I've successfully applied patches, but cannot build lib:

Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec2837922413
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec2837922413.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   
CMakeFiles/cmTryCompileExec2837922413.dir/CheckFunctionExists.c.o  -o
cmTryCompileExec2837922413 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [cmTryCompileExec2837922413] Ошибка 1
make[1]: Выход из каталога
`/home/yanpas/Документы/Программирование/pdfbookmarker/svn/podofo/podofo-build/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec2837922413/fast] Ошибка 2

Ошибка=Error in russian.

libpthread is installed and links successfully, something wrong with lib.

Try this patch and this doc please on your machine. Try to remove all
outline items one by one.

Kind regards,
Yan

Previous email was sent from personal email...


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to