Bug 84261 - libreoffice crash when open a xlsx file saved by openpyxl
Summary: libreoffice crash when open a xlsx file saved by openpyxl
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.3.1.2 release
Hardware: x86-64 (AMD64) macOS (All)
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.4.0 target:4.3.3
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2014-09-24 03:08 UTC by Ken Chou
Modified: 2014-09-26 11:22 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
xlsx file generated by openpyxl (5.61 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-09-25 12:16 UTC, Ken Chou
Details
console bt (14.83 KB, text/plain)
2014-09-25 20:44 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Chou 2014-09-24 03:08:35 UTC
Python Code
-----------
openpyxl 2.1.0 (latest)

~~~python

from openpyxl.workbook import Workbook
from openpyxl.cell import get_column_letter, Cell, column_index_from_string, coordinate_from_string

data_filename = 'empty_book.xlsx'

wb = Workbook()
ws = wb.active
ws.title = "range names"

# inserting sample data
for col_idx in xrange(1, 10):
    col = get_column_letter(col_idx)
    for row in xrange(1, 10):
        ws.cell('%s%s' % (col, row)).value = '%s%s' % (col, row)

wb.save(filename=data_filename)

~~~


above py create a file "empty_book.xlsx".
open empty_book.xlsx cause libreoffice crash, everytime.
both libreoffice 4.3.1.2 and 4.2.6 are crash.
4.1.6 is OK.
Comment 1 Ken Chou 2014-09-24 03:13:41 UTC
PS: ms-office on windows is OK.
Comment 2 Julien Nabet 2014-09-24 20:35:25 UTC
would it be possible you attach the generated file?
Comment 3 Ken Chou 2014-09-25 12:16:32 UTC
Created attachment 106851 [details]
xlsx file generated by openpyxl
Comment 4 tommy27 2014-09-25 18:31:41 UTC
I can open the attached xslx with LO 4.3.1.2 under Win7x64
Comment 5 Julien Nabet 2014-09-25 20:44:14 UTC
Created attachment 106875 [details]
console bt

On pc Debian x86-64 with master sources updated today, I had a crash too.

However, with LO Debian package 4.3.1.2, I don't reproduce this.
Comment 6 Julien Nabet 2014-09-25 20:53:32 UTC
I could reproduce this too with 4.3.1 on MacOs.
The problem is I had no trace.

Perhaps the bt in master branch could help to pinpoint the problem.

Anyway, I confirm the problem.
Comment 7 Caolán McNamara 2014-09-26 09:35:56 UTC
It appears to be an unexpected exception. We build release versions under Linux with non enforcing exceptions, but debug versions with enforcing exceptions. Mac is built with clang which always enforces exception specifications. Which would explain why 4.3.1 on Mac falls over, but release build 4.3.1 on Debian doesn't. A self-build 4.3.1 dbgutil on Debian probably falls over in the same place.
Comment 8 Commit Notification 2014-09-26 10:19:37 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4652700776666e385946c47235363c1120846d5d

Resolves: fdo#84261 unexpected exception -> clang builds terminate



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2014-09-26 11:22:45 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3d468017ababdf4d2bb96c662373c96ec06c6c0c&h=libreoffice-4-3

Resolves: fdo#84261 unexpected exception -> clang builds terminate


It will be available in LibreOffice 4.3.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.