Issue 123452

Summary: Crash exporting tagged PDF
Product: Writer Reporter: rony
Component: save-exportAssignee: AOO issues mailing list <issues>
Status: CLOSED DUPLICATE QA Contact:
Severity: Normal    
Priority: P3 CC: hdu, issues, oliver.brinzing
Version: 4.0.1Keywords: crash
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Writer document that crashes AOO 4.0.1 if exporting to PDF
none
Debugger stack trace none

Description rony 2013-10-09 14:42:54 UTC
Created attachment 81734 [details]
Writer document that crashes AOO 4.0.1 if exporting to PDF

When exporting a particular writer document to PDF, using the pdf-export icon, AOO 4.0.1 crashes.
Comment 1 Ariel Constenla-Haile 2013-10-09 15:39:56 UTC
(In reply to rony from comment #0)
> When exporting a particular writer document to PDF, using the pdf-export
> icon, AOO 4.0.1 crashes.

Please try the PDF export dialog from "File" - "Export as PDF..."
Is PDF/A-1a checked?
I can reproduce the crash with a new user profile only if a check that option. With the default options it does not crash.

To test with a new user profile and its default options, run soffice.exe from within cmd.exe and pass -env:UserInstallation=FILE_URL_TO_USER_DIR, for example:

C:\>"C:\Archivos de programa\OpenOffice 4\program\soffice.exe" -env:UserInstallation=file:///C:/tmpaoo

and don't migrate settings from 3.* user profile.
Comment 2 Ariel Constenla-Haile 2013-10-09 18:56:54 UTC
Created attachment 81737 [details]
Debugger stack trace

The crash happens in http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/text/EnhancedPDFExportHelper.cxx?revision=1525917&view=markup#l379
dereferencing an invalid iterator, so the following solves the crash:

const FrmTagIdMap::const_iterator aIter = rFrmTagIdMap.find( pKey );
if ( aIter != rFrmTagIdMap.end() )
    nReopenTag = (*aIter).second;
Comment 3 Ariel Constenla-Haile 2013-10-09 19:01:48 UTC
Not reproducible on Linux.
May be "regression" introduced be stlport removal.
Setting hdu on Cc
Comment 4 Ariel Constenla-Haile 2013-10-09 19:30:51 UTC
Duplicated.

*** This issue has been marked as a duplicate of issue 122928 ***
Comment 5 hdu@apache.org 2013-10-10 07:19:40 UTC
(In reply to Ariel Constenla-Haile from comment #2)
> The crash happens in
> http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/text/
> EnhancedPDFExportHelper.cxx?revision=1525917&view=markup#l379
> dereferencing an invalid iterator, so the following solves the crash:
> 
> const FrmTagIdMap::const_iterator aIter = rFrmTagIdMap.find( pKey );
> if ( aIter != rFrmTagIdMap.end() )
>     nReopenTag = (*aIter).second;

This fix is incidentally the same as the one I suggested in attachment 81699 [details] to fix bug 123409. With both issues having the same root cause I'm adjusting the duplicate number.

*** This issue has been marked as a duplicate of issue 123409 ***
Comment 6 Oliver Brinzing 2013-10-11 05:00:16 UTC
.