Issue 123452 - Crash exporting tagged PDF
Summary: Crash exporting tagged PDF
Status: CLOSED DUPLICATE of issue 123409
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 4.0.1
Hardware: PC Windows XP
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2013-10-09 14:42 UTC by rony
Modified: 2017-05-20 10:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Writer document that crashes AOO 4.0.1 if exporting to PDF (79.00 KB, application/vnd.ms-word)
2013-10-09 14:42 UTC, rony
no flags Details
Debugger stack trace (3.30 KB, text/plain)
2013-10-09 18:56 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
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
.