Download it now!
Bug 50640 - CRASH when EDITING hidden paragraphs fields
Summary: CRASH when EDITING hidden paragraphs fields
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:4.5.0 target:4.4.1
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2012-06-03 07:12 UTC by Leif Lodahl
Modified: 2015-12-05 14:43 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Template with hidden paragraph fields (457.27 KB, application/vnd.oasis.opendocument.text-template)
2012-06-03 07:12 UTC, Leif Lodahl
Details
Another example (8.95 KB, application/vnd.oasis.opendocument.text)
2012-06-04 08:56 UTC, Leif Lodahl
Details
Leif's BrevSkabelon from Comment 0 - backtrace.txt (38.71 KB, text/plain)
2015-01-26 15:36 UTC, Timur
Details
Third example for crash on browsing Fields via Edit Fields (12.86 KB, text/odt)
2015-01-26 15:40 UTC, Timur
Details
Timur's koverta from Comment 7 - backtrace.txt (44.96 KB, text/plain)
2015-01-26 15:48 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leif Lodahl 2012-06-03 07:12:14 UTC
Created attachment 62451 [details]
Template with hidden paragraph fields

In a document with several fields of type hidden paragraph I can crash LibreOffice consequently. 

When I choose not to show hidden paragraphs and I open the first hidden paragraph field (right-click and select field) and then click the next arrow then LibreOffice crashes.

When I choose to show hidden paragraphs from the view menu, this crash doesn't occur.

Template attached.
Comment 1 Rainer Bielefeld Retired 2012-06-04 08:07:11 UTC
We talk about those 'Kundenavn==""' fields I reach after 'rightclick -> Field...'?

NOT reproducible with "LibreOffice 3.6.0alpha1  German UI/Locale [Build-ID: 66f01b5] on German WIN7 Home Premium (64bit) 

Linux related, additional conditions for CRASH required or do I understand something wrong? Additionally I have really big problems to hit the fields, I have to do some "show fieldnames on/of and similar things before I get a field, ma be afterwards no crash can happen?

@Leif
What else than LibO should crash?  ;-)
Is the problem related to fields in frame in page heading or reproducible anywhere on a page?
Comment 2 Leif Lodahl 2012-06-04 08:56:56 UTC
Created attachment 62520 [details]
Another example
Comment 3 Leif Lodahl 2012-06-04 09:00:09 UTC
It is difficult to catch the fields inside a text frame. Here is another example attached.

And yes it's the hide paragraph with condition Fieldname=="" ;-)

The problem is - I think - to jump to a field that is hidden.

(Remember the problem is only when hidden paragraphs are actually hidden).

I can reproduce also in 3.5.4 (Linux)
Comment 4 QA Administrators 2013-05-26 22:31:55 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
Comment 5 QA Administrators 2013-07-08 21:22:17 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
Comment 6 Timur 2015-01-26 15:36:11 UTC
Created attachment 112811 [details]
Leif's BrevSkabelon from Comment 0 - backtrace.txt

I can reproduce Leif's example with attachment 62451 [details]:
1. turn on View-Field Shadings and View-Field Names
2. click within the first of the 4 Hidden Paragraph fields (in the frame)
3. now that Edit-Fields is enabled, open it
4. in the Edit Fields dialog, browse with right arrow till the end
5. LO Writer crashes

Tested with Lo 4.3.5 and 4.4.0.2. Set as "inherited" and Reopened. Please set as New.
Comment 7 Timur 2015-01-26 15:40:58 UTC
Created attachment 112812 [details]
Third example for crash on browsing Fields via Edit Fields

I add a third example for crash on browsing Fields via Edit Fields:
1. turn on View-Field Shadings
2. click on some of the grayed fields
3. now that Edit-Fields is enabled, open it
4. in the Edit Fields dialog, browse with right arrow till the end
5. LO Writer crashes

Fields do not have to be hidden, and this one seems easier to reproduce.
Comment 8 Joel Madero 2015-01-26 15:43:48 UTC
Would be good to get a backtrace on this: https://wiki.documentfoundation.org/Development/How_to_debug
Comment 9 Timur 2015-01-26 15:48:46 UTC
Created attachment 112813 [details]
Timur's koverta from Comment 7 - backtrace.txt
Comment 10 Timur 2015-01-26 16:19:34 UTC
OK, done under 5 minutes, I hope it's acceptable :)
Comment 11 Caolán McNamara 2015-01-27 15:11:58 UTC
Calling GetCurFld() updates the field from the selection. In NextPrevHdl if the selection is empty then *after* calling GetCurFld the selection is expanded to 1 char, calling GetCurFld after this doesn't necessarily return the same thing as it did before expanding the selection
Comment 12 Caolán McNamara 2015-01-28 09:54:09 UTC
And the reason it doesn't correspond after expanding the selection is SwCursor::IsSelOvr which sees a 0 height layout frame for that input field and assumes that it should skip over it as an invalid place to put the cursor.
Comment 13 Commit Notification 2015-01-28 12:27:04 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: fdo#50640 allow the cursor to enter empty vertical input fields

It will be available in 4.5.0.

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 14 Commit Notification 2015-01-28 13:50:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#50640 make sure we don't move away from the current field

It will be available in 4.5.0.

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 15 Commit Notification 2015-02-05 10:30:31 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

Resolves: tdf#50640 make sure we don't move away from the current field

It will be available in 4.4.1.

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 16 Julien Nabet 2015-12-05 14:43:44 UTC
cleanup keywords