Bug 44040 - VIEWING: Crash when page preview after <f4> (data sources)
Summary: VIEWING: Crash when page preview after <f4> (data sources)
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.1 RC1
Hardware: x86-64 (AMD64) Windows (All)
: medium major
Assignee: Andras Timar
URL:
Whiteboard: target:3.5.0
Keywords: regression
: 44229 (view as bug list)
Depends on:
Blocks: mab3.5
  Show dependency treegraph
 
Reported: 2011-12-21 23:03 UTC by Rainer Bielefeld Retired
Modified: 2012-01-28 00:07 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
typescript of gdb session (14.31 KB, text/plain)
2012-01-01 07:26 UTC, Terrence Enger
Details
Proposition of patch (1.65 KB, text/plain)
2012-01-14 11:06 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Bielefeld Retired 2011-12-21 23:03:21 UTC
Steps how to reproduce with "LibreOffice 3.4.5 RC1  - WIN7 Home Premium (64bit) German UI [Build ID: OOO340m1 (Build:501)]" or with 
Parallel Dev-Installation of  "LibreOffice 3.5.0 Beta1 - WIN7 Home Premium (64bit) German UI [Build-ID: 7362ca8-b5a8e65-af86909-d471f98-61464c4] Windows_Release_Configuration  11-Dec-2011 06:51"

1. Start LibO
2. New WRITER document from LibO Start Center
3. <f4> to make visible data sources
4. Click 'Page Preview' Icon for print page preview
   expected: Page shown
   actual: LibO stops responding, Crash 100% reproducible

Worked fine with LibO 3.3.3 Portable
With builds still available for me I see that starting with 3.4.1RC1 OOO340m1 (Build:101), so might have started with 3.4.0?

Only WRITER affected, no problem in Calc.
Also crashes in step 4 using menu 'File -> Page Preview'

NEW because reproducible in lots of versions (I also tested various Master builds and 3.4.5RC1)

@Cédric:
Please feel free to reassign (or reset Assignee to default) if it’s not your area or if provided information is not sufficient. Please set Status to ASSIGNED if you accept this Bug.
Comment 1 Rainer Bielefeld Retired 2011-12-28 12:00:53 UTC
*** Bug 44229 has been marked as a duplicate of this bug. ***
Comment 2 Rainer Bielefeld Retired 2011-12-28 12:01:53 UTC
Bug 44040 has a bugreport.txt as attachment
Comment 3 Terrence Enger 2012-01-01 07:26:09 UTC
Created attachment 55018 [details]
typescript of gdb session

I have managed to provoke a SIGABRT in this situation.  Running on
ubuntu-natty with LibreOffice very lightly hacked from commit id
4097499 (pulled 2011-12-08); configuration options ...
    --disable-mozilla
    --enable-symbols
    --enable-dbgutil
    --enable-crashdump
    --disable-build-mozilla
    --enable-ext-postgresql-sdbc

Running under gdb, I get messages ...

    /usr/include/c++/4.5/debug/safe_iterator.h:238:error: attempt to decrement 
        a dereferenceable (start-of-sequence) iterator.

    Objects involved in the operation:
    iterator "this" @ 0x0xbfffe200 {
    type = N11__gnu_debug14_Safe_iteratorISt17_Rb_tree_iteratorISt4pairIKtN5dbaui20SbaTableQueryBrowser15ExternalFeatureEEENSt7__debug3mapItS6_St4lessItESaIS7_EEEEE (mutable iterator);
      state = dereferenceable (start-of-sequence);
      references sequence with type `NSt7__debug3mapItN5dbaui20SbaTableQueryBrowser15ExternalFeatureESt4lessItESaISt4pairIKtS3_EEEE' @ 0x0xbfffe200
    }

    Program received signal SIGABRT, Aborted.
    0x0012e416 in __kernel_vsyscall ()

Attaching typescript of the session, including backtrace.
Comment 4 Petr Mladek 2012-01-02 03:01:22 UTC
I see this bug on Windows. I do not see it on Linux.
Comment 5 Cédric Bosdonnat 2012-01-06 01:52:21 UTC
Andras, could you have a look at it? I can't reproduce on openSUSE here.
Comment 6 Julien Nabet 2012-01-14 11:06:29 UTC
Created attachment 55580 [details]
Proposition of patch

I updated the iterator management which seemed buggy. I've got no more crash now but perhaps I missed something.
Comment 8 libreoffice2 2012-01-22 12:38:49 UTC
Same crash with Version 3.5.0 RC1
Comment 9 Julien Nabet 2012-01-23 12:37:23 UTC
Fixed on master with commit 82a061079ae03f841713fd26c809d45621a59836
Fixed on 3.5 branch with commit 4d60e1a0832dafe05b4eecee7c9607bbd2ce1b07 (so should be in 3.5.0 rc2)

The patch I had proposed worked only with C++11 (http://en.wikipedia.org/wiki/C%2B%2B11) whereas C++98 must be supported (see http://nabble.documentfoundation.org/PATCH-proposed-fix-for-fdo-44040-seems-iterator-issue-only-tp3659513p3663825.html).

So Caolán proposed this new patch and I tested it ok (there was just an extra semicolon :-p)
Comment 10 libreoffice2 2012-01-27 11:19:53 UTC
Fixed for me in 3.5.0 RC2
thx
Comment 11 Rainer Bielefeld Retired 2012-01-28 00:07:54 UTC
No crash with "LibreOffice 3.5.0 RC2 German UI/Locale [Build-ID: e371a95-bf68a13-5a1aa2b-d3c1ae9-b938258] on German WIN7 Home Premium (64bit)