Bug 85646 - LibreOffice Writer crashes 10 times per minute and from debug logs looks like Python initialization problem
Summary: LibreOffice Writer crashes 10 times per minute and from debug logs looks like...
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.3.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-30 12:32 UTC by grofaty
Modified: 2015-09-04 03:01 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
crash dialog (43.62 KB, image/png)
2014-10-30 12:32 UTC, grofaty
Details
WinDbg debug of crash (31.72 KB, text/plain)
2014-10-30 12:32 UTC, grofaty
Details
debug_4_3_0_0_beta2 no crash, but exceptions (106.76 KB, text/plain)
2014-11-03 08:21 UTC, grofaty
Details
debug 4_3_0_1 with Python crash (11.46 KB, text/plain)
2014-11-03 08:21 UTC, grofaty
Details

Note You need to log in before you can comment on or make changes to this bug.
Description grofaty 2014-10-30 12:32:08 UTC
Created attachment 108686 [details]
crash dialog

Hi,
I already reported bug https://bugs.freedesktop.org/show_bug.cgi?id=85056 but because of many problems in this bug report I was advised to open a new bug report.

On my computer there was LibreOffice 4.2.6.2 and I have been using it for like a month without a single crash incident (previously using previous versions of LibreOffice also without crashing incidents).

How did problem appear?
1. I have uninstalled LibreOffice 4.2.6.2.
2. Manually deleted installation left overs from C:\Programs\LibreOffice4 (this is my install dir).
3. Install Libreoffice 4.3.2.2 and now hell has been on fire. LibreOffice Writer (also similar problem with Calc) is crashing non-stop. I can do several things but none of them are reproducible.

For example:
a) I type text and Writer crashes - but not all the time.
b) I copy/paste the image from image editor and Writer crashes - but not all the time.
c) I copy/paste the text and Writer crashes.
d) I clicked on AutoSpellcheck button and Writer crashes.

Each time crash appears I need to go through document recovery process and I hope I haven't lost too much work (between last save and crash).

All above is just not reproducible!!! Please don't bother if LibreOffice is not crashing in your case, then you will not be able to reproduce.

I can never say when crash will appear. It is pure hell working like this. Then at one point when crash appeared and I already have few pages of text and images and I was not in the state of losing my work and Writer crashed and after restarting it crash repair started and immediately after repair Writer crashed again. I repeated this 5 times in a role and I couldn't get Writer up with my document.

I was stuck... So I reversed back:
1. Uninstall  LibreOffice 4.3.2.2.
2. Manually deleted installation left overs from C:\Programs\LibreOffice4.
3. Install Libreoffice 4.2.6.2 and magically I was now working for two days at least 5 hours without a single crash.
4. I also opened document and recovery went OK and no crash at all.

It looks to me that there is some regression problem in LibreOffice 4.3.2.2 comparing to 4.2.6.2


Because I have a virtual machine, I have created several snapshots, so I can go to previous state if required.

Today I did the following:
1. Reverted virtual machine back to my LibreOffice 4.3.2.2 state.
2. Opened Writer.
3. Started WinDbg tool to start debugging process.
4. Just start typing some random keys on keyboard - it were letters keys.
5. And crash appeared. It is so easy to crash. I am attaching bug_report output.
What I see from bug report is that "Python" has crashed. This is probably LibreOffice embed Python.

I also investigated and I see embed Python is also used in my outer tools like Gimp and Komodo Edit:


C:\>dir python.exe /s
 Volume in drive C has no label.
 Volume Serial Number is DCD7-FA64

 Directory of C:\Programs\ActiveStateKomodoEdit8\lib\python

06.06.2013  12:45            27.136 python.exe
               1 File(s)         27.136 bytes

 Directory of C:\Programs\gimp2\Python

15.05.2013  21:43            26.624 python.exe
               1 File(s)         26.624 bytes

 Directory of C:\Programs\LibreOffice4\program

18.09.2014  17:16            19.232 python.exe
               1 File(s)         19.232 bytes

 Directory of C:\Programs\LibreOffice4\program\python-core-3.3.3\bin

18.09.2014  12:19            27.136 python.exe
               1 File(s)         27.136 bytes


Also another point. When crash appears I don't get classical LibreOffice crash window, but instead getting in my opinion some Windows like component dialog (or maybe even Python internal dialog, don't know). See attached print-screen.

My humble opinion is this is going to be very hard to reproduce. It looks like LibreOffice Pyhton collides with some other Python or something like that. So I suggest one of developer gets into debug trace and if additional info are required I can always revert back my virtual machine and make additional tests.

Regards
Comment 1 grofaty 2014-10-30 12:32:44 UTC
Created attachment 108687 [details]
WinDbg debug of crash
Comment 2 Julien Nabet 2014-11-01 10:51:08 UTC
On which Windows are you? (XP, Seven, 8) 32 or 64 bits?

For the test, could you rename your LO directory profile (see https://wiki.documentfoundation.org/UserProfile#Windows) and give a try to last stable 4.3.3?

Did you install any specific fonts? I mean do you have other fonts than those installed out of box with Windows? 
If yes, could you disable them and give it a new try?
Comment 3 grofaty 2014-11-03 07:05:48 UTC
Julien,
my operating system is Windows 7 64 bit.

I did the following tests:
1. LibreOffice 4.3.2.2 Writer with my profile (this bug report): Python crash.
2. LibreOffice 4.3.2.2 Writer with new clean profile: Python crash.
3. LibreOffice 4.3.3.2 Writer with my profile: Python crash.
4. LibreOffice 4.3.3.2 Writer with new cleaan profile: Python crash.

I also tested previous versions:
1. LibreOffice 4.2.6.2 with my profile: Works fine.
2. LibreOffice 4.2.7.2 with my profile: Works fine.

I haven't install any font for very long time and I am also not using any specific exotic font, I use Arial font.

Hope this helps. Do you want me to do any other test?

P.S. I have a virtual machine, so I can make several tests without impacting my production LibreOffice environment.

P.S.S. I have updated info to:
Hardware=x86-64(AMD64)
Windows (All)

Regards
Comment 4 Julien Nabet 2014-11-03 07:18:49 UTC
Thank you for your detailed feedback, I put it back to NEW.
Comment 5 grofaty 2014-11-03 08:20:00 UTC
I have made a test marathon and downloaded several old versions from subdirectory: http://downloadarchive.documentfoundation.org/libreoffice/old/ to figure it out in which version this crash started to appear.

In bellow tests I always uninstalled LibreOffice, manually clean install leftovers from C:\Programs\LibreOffice4 (my install dir), delete profile (so having clean profile):
1. LibreOffice 4.3.1.2: Python crash.
2. LibreOffice 4.3.0.4: Python crash.
3. LibreOffice 4.3.0.2: Python crash.
4. LibreOffice 4.3.0.1: Python crash.
5. LibreOffice 4.3.0.0.beta2: Works fine.
6. LibreOffice 4.3.0.0.beta1: Works fine.

It looks like LibreOffice was working fine in 4.3.0.0.beta2 and the crash introduced was in LibreOffice 4.3.0.1.

In LibreOffice 4.3.0.1 (the first version crashing) I started LibreOffice Writer and starting a debug with WinDbg. Move cursor to LibreOffice and press letter d and Python crash appeared. This is the record pressing only one key and crash.

Additional info, in debug I can see there are also! exceptions in 4.3.0.0.beta1, 4.3.0.0.beta2 and also in previous release 4.2.7.2, but LibreOffice does not crashes. Exception are like for example:
(b78.a98): C++ EH exception - code e06d7363 (first chance)
appears in debug every time I press any key, I only pressed English letters.

I am attaching:
- LibreOffice 4.3.0.0.beta2 with exceptions, but still no crash.
- LibreOffice 4.3.0.1 with Python crash error.

Hope this helps debugging the problem.
Comment 6 grofaty 2014-11-03 08:21:04 UTC
Created attachment 108824 [details]
debug_4_3_0_0_beta2 no crash, but exceptions
Comment 7 grofaty 2014-11-03 08:21:30 UTC
Created attachment 108825 [details]
debug 4_3_0_1 with Python crash
Comment 8 grofaty 2014-11-14 09:27:02 UTC
Now I have analyzed what is different between LibreOffice 4.3.0.0.beta1 and LibreOffice 4.3.0.0.beta2 (last two working versions) and LibreOffice 4.3.0.1 (first crashing version) and I figure it out that beta versions are installing in different directory: "LibOfficeDev 4" and non-beta versions are installing in production directories like "LIbOffice 4".

So I uninstalled LibreOffice beta, delete all programs left overs, delete profile and install LibreOffice 4.3.0.0.beta1 in C:\Programs\LibreOffice4\ directory just like I did install all other 4.3.x or 4.2 versions before.

Stunning, if LibreOffice 4.3.0.0.beta1 is installed in C:\Programs\LibreOffice4 directory then it is crashing all over, but if it is installed in C:\Programs\LibreOfficeDev4 then it is not crashing at all.

So all of the LibreOffice 4.3.x are now crashing if installed in C:\Programs\LibreOffice4 and also tried back to install LibreOffice 4.2.7.2 in the same directory (uninstalling/cleaning program left oveers/cleaning profile) and it works perfectly well without crashing.

Strange, can't explain it rational...
Comment 9 Julien Nabet 2014-11-17 19:14:45 UTC
I must recognize I don't understand why you test beta version from 4.3.0.0

Last stable LO version is 4.3.4, would it be possible you give a try?
Comment 10 grofaty 2014-11-18 06:16:13 UTC
@Julien Nabet, I would like to know when LibreOffice started crashing, so did several tests with different versions. 

I found out that 4.2.x (including last 4.2.7) is working fine without crashes.
But as I see crashing appears in 4.3.x series starting with! beta-1 (that is why I have made a test with beta).

I searched the source-code repository (sorry I can't find this anymore) that there was a commit of adding a new Python version in 4.3.x and Python is crashing in my case.
Comment 11 Julien Nabet 2014-11-18 06:27:45 UTC
Grofaty: this link https://wiki.documentfoundation.org/QA/HowToBibisect may interest you.
However, it's interesting only if the bug is still present! :-)
Comment 12 grofaty 2014-11-19 06:42:19 UTC
Tested on LibreOffice 4.3.4.1 on Windows 7 and the same crash.
Comment 13 grofaty 2015-01-06 13:15:23 UTC
Sorry for late response... It looks this problem is realted to AutoHotKey program! But it is still interesting that using both products for years and not when LibreOffice updated to 4.3.x problem appeared.

I applied work-around suggested on AutoHotKey forum: http://www.autohotkey.com/board/topic/117985-libreoffice-43x-crashes-if-started-from-autohotkey-keyboard-shortcut/?hl=%20step2  -  like creating a Windows shortcut and then use AutoHotKey to run a shortcut instead of .exe file directly. Very strange to me, I think this is still some kind of strange bug in LibreOffice like updating new internal Python to newer version in 4.3.x that produces this strange effect.
Comment 14 QA Administrators 2015-07-18 17:35:42 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team

This NEEDINFO message was generated on: 2015-07-18
Comment 15 QA Administrators 2015-09-04 03:01:00 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided):

a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. 
Please do not:
a) respond via email 
b) update the version field in the bug or any of the other details on the top section of FDO
Message generated on: 2015-09-03