Bug 43422 - Spell check: Crash "Runtime Error" with AutoSpellcheck
Summary: Spell check: Crash "Runtime Error" with AutoSpellcheck
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: x86 (IA32) Windows (All)
: high blocker
Assignee: Caolán McNamara
URL:
Whiteboard:
Keywords:
: 43702 43787 44036 (view as bug list)
Depends on:
Blocks: mab3.5
  Show dependency treegraph
 
Reported: 2011-12-01 07:22 UTC by manj_k
Modified: 2011-12-22 16:40 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Text document 'multilingual en fr es.odt' (8.87 KB, application/vnd.oasis.opendocument.text)
2011-12-01 07:24 UTC, manj_k
Details
Screenshot 'runtime_error.png' (62.61 KB, image/png)
2011-12-01 07:25 UTC, manj_k
Details

Note You need to log in before you can comment on or make changes to this bug.
Description manj_k 2011-12-01 07:22:45 UTC
LibO-dev 3.5.0 · Build ID: 2d0998f-090bcba-45cf606
[master~2011-12-01_08.37.54_libodev35.msi · 01-Dec-2011
Index of /daily/Win-x86@6-fast/master/current];
UI en-US; default user profile; on WinXP 32b

1. Open the attached file 'multilingual en fr es.odt' with three misspelled words 'Xyz' (en-US, fr-FR, es-ES, corresponding to the bundled dictionaries)
2. Set the cursor in any misspelled word
3. Right-click context menu (AutoSpellcheck)

Crash:
"Microsoft Visual C++ Runtime Library
Runtime Error!
...\soffice.bin
[...]"

See also the attached screenshot 'runtime_error.png'.
Comment 1 manj_k 2011-12-01 07:24:37 UTC
Created attachment 54015 [details]
Text document 'multilingual en fr es.odt'
Comment 2 manj_k 2011-12-01 07:25:59 UTC
Created attachment 54016 [details]
Screenshot 'runtime_error.png'
Comment 3 manj_k 2011-12-02 09:39:41 UTC
The same crash with LibO 3.5.0 Beta0
LibreOffice 3.5.0 
Build ID: ef91e38-b1d4df6-090bcba-45cf606-05891e7
(server image, UI en-US, default user profile)

If confirmed: blocker?
Comment 4 manj_k 2011-12-03 11:10:14 UTC
Confirmed via 'discuss<at>de.libreoffice.org'
→ http://nabble.documentfoundation.org/QA-Bestatigung-fur-Bug-43422-Crash-AutoSpellcheck-td3557512.html

Modified as follows: 
Status: NEW
Blocks: 37361
Comment 5 Rainer Bielefeld Retired 2011-12-04 00:02:11 UTC
[Reproducible] with Server Installation of  "LibreOffice 3.5.0 Beta0  - WIN7 Home Premium (64bit) English UI [Build:ef91e38-b1d4df6-090bcba-45cf606-05891e7]", also in CALC. Right click on misspelled word crashes when auto spell check is active.

We can not ship a release with this bug.

András:
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 6 Julien Nabet 2011-12-10 09:24:27 UTC
Could anybody attach a backtrace with symbol or some error messages ?
I don't reproduce this problem on Debian testing but since it's a Windows only bug...
Comment 7 Rainer Bielefeld Retired 2011-12-11 02:11:29 UTC
*** Bug 43702 has been marked as a duplicate of this bug. ***
Comment 8 Caolán McNamara 2011-12-12 07:34:46 UTC
valgrind under Linux is silent on the matter, no crash or warnings there FWIW
Comment 9 László Németh 2011-12-14 14:39:05 UTC
This was the biggest patch in this area (popup menu of spelling mistakes), at the same time:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=68f1b7dac7e77f68050f73c8692b8180f6e7cc65
Comment 10 László Németh 2011-12-14 14:51:44 UTC
*** Bug 43787 has been marked as a duplicate of this bug. ***
Comment 11 Jesus Corrius 2011-12-15 01:33:49 UTC
 Backtrace of the exception, no symbols:

 kernel32!RaiseException+0x53
 MSVCR90!_CxxThrowException+0x48
 cppuhelper3MSC!cppu::loadSharedLibComponentFactory+0x98
 bootstrap_uno!component_getFactory+0xc92f
 cppuhelper3MSC!cppu::createOneInstanceComponentFactory+0x1c49
 cppuhelper3MSC!cppu::createOneInstanceComponentFactory+0x200e
 cppuhelper3MSC!cppu::createStandardClassWithSequence+0x5bc
 cppuhelper3MSC!cppu::createStandardClassWithSequence+0xdca
 bootstrap_uno!component_getFactory+0x29d04
 bootstrap_uno!component_getFactory+0x255e1
 swlo!SwModule::GetLanguageGuesser+0x5d
 swlo!SwTOXMgr::UpdateOrInsertTOX+0x5dc1
 swlo!SwView::ExecSpellPopup+0x2b8
 swlo!SwGlossaryHdl::ExpandGlossary+0x29221
 vcllo!Window::Window+0x4c7
 vcllo!Window::LinkStubImplAsyncFocusHdl+0x1128
 vcllo!Window::LinkStubImplAsyncFocusHdl+0x11d7
 vcllo!Window::LinkStubImplAsyncFocusHdl+0x12a9
 vcllo!WorkWindow::StartPresentationMode+0x233bb
 vcllo!WorkWindow::StartPresentationMode+0x25c6b
 vcllo!WorkWindow::StartPresentationMode+0x2bd27
 vcllo!WorkWindow::StartPresentationMode+0x2bed3
 USER32!InternalCallWinProc+0x28
 USER32!UserCallWinProcCheckWow+0x151
 USER32!DispatchMessageWorker+0x327
 USER32!DispatchMessageW+0xf
 vcllo!WorkWindow::StartPresentationMode+0x4ad1
 vcllo!WorkWindow::StartPresentationMode+0x84a9
 vcllo!WorkWindow::StartPresentationMode+0x855f
 vcllo!WorkWindow::StartPresentationMode+0x85fe
 vcllo!Application::Abort+0xde
 vcllo!Application::Yield+0xd
 vcllo!Application::Execute+0x1e
 vcllo!DeInitVCL+0x42c
 vcllo!SVMain+0x1c
 sofficeapp!soffice_main+0x81
 soffice+0x12b1
 soffice+0x12d2
 kernel32!BaseProcessStart+0x23
Comment 12 Caolán McNamara 2011-12-15 01:38:43 UTC
hmm, "SwModule::GetLanguageGuesser" probably then a window failure to load the libexttextcat eventually. A quick-fix is probably to put a try catch around 

            m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >(
                    xMgr->createInstance(
                        rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.LanguageGuessing"))),
                        uno::UNO_QUERY );
Comment 13 Caolán McNamara 2011-12-15 03:26:58 UTC
$ dumpbin /exports wntmsci12.pro/bin/guesslanglo.dll
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file wntmsci12.pro/bin/guesslanglo.dll

File Type: DLL

  Section contains the following exports for guesslanglo.dll

    00000000 characteristics
    4EE9D0CC time date stamp Thu Dec 15 10:49:48 2011 
        0.00 version
           1 ordinal base
           1 number of functions
           1 number of names

    ordinal hint RVA      name

          1    0 00001000 GetVersionInfo = _GetVersionInfo

  Summary

        1000 .data
        1000 .rdata
        1000 .reloc
        1000 .rsrc
        1000 .text


the "component_getFactory" symbol is missing
Comment 14 Caolán McNamara 2011-12-15 03:48:29 UTC
Some visibility foo, I can fix it anyway with cut and paste from a working relative :-)
Comment 15 Caolán McNamara 2011-12-15 03:55:27 UTC
This seems to work for me under windows anyway

http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=c8fc44a4468ad27655a778d51c8877d0f036e996
Comment 16 Don't use this account, use tml@iki.fi 2011-12-19 03:34:16 UTC
The problem seems to be in guesslanglo.dll, from lingucomponent. Dependency Walker shows this just before it crashes:

GetProcAddress(0x0B540000 [GUESSLANGLO.DLL], "component_getFactory") called from "SAL3.DLL" at address 0x1000C5C1 and returned NULL. Error: Det gr inte att hitta den angivna proceduren (127).

And indeed, guesslanglo.dll from beta1 does not export component_getFactory . In my fresh build, it does, so presumably this has been fixed. If I replace the guesslanglo.dll in beta1 with the one from my fresh build, the crash goes away.

... and only then, after doing the above debugging and writeup, I notice that Jesús and Caolán already have done the same and resolved the bug. Sigh...
Comment 17 Rainer Bielefeld Retired 2011-12-21 03:48:04 UTC
Works fine with Server installation of  Master "LOdev 3.5.0beta2+  – WIN7 Home Premium (64bit) ENGLISH UI [Build ID: 22905fb-b605e4f-4c1bcb5]" Win-x86@6- - pull time 2011-12-20 20:59:59)
Comment 18 manj_k 2011-12-22 16:40:20 UTC
*** Bug 44036 has been marked as a duplicate of this bug. ***