Bug 57611 - report builder design mode CRASH on change FixedLine height to zero
Summary: report builder design mode CRASH on change FixedLine height to zero
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.6.4.1 rc
Hardware: All All
: medium critical
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:4.0.0 target:3.6.5
Keywords:
: 57612 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-27 14:03 UTC by Lionel Elie Mamane
Modified: 2012-11-30 12:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
reproduction file (12.05 KB, application/vnd.oasis.opendocument.database)
2012-11-27 14:03 UTC, Lionel Elie Mamane
Details
backtrace (7.29 KB, text/plain)
2012-11-27 14:07 UTC, Lionel Elie Mamane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2012-11-27 14:03:28 UTC
Created attachment 70663 [details]
reproduction file

Open attached .odb

Click "Reports" (in the left pane)

Right-click "Report1" (right-lower pane)

Click on the horizontal line in the middle of the "Detail" section.

If the properties don't show (at the right of the window), right click on the line and click on "Properties"

Change height to "0"

Press tab key


---------> Abort (crash); stderr says "terminate called after throwing an instance of 'com::sun::star::beans::PropertyVetoException'"



This happens with any height < .02cm


Expected behaviour: either accept the change, or reject it, but don't crash.


Origin:

reportdesign/source/core/api/FixedLine.cxx line 526:

    if ( (aSize.Width < MIN_WIDTH && m_nOrientation == 1) || (aSize.Height < MIN_HEIGHT && m_nOrientation == 0) )
        throw beans::PropertyVetoException();


Backtrace also attached. You'll notice that the backtrace contains a "try () ... catch ()" block that should catch this exception. Backtrace also goes through UNO bridge (I don't understand why???), but UNO bridge should forward UNO exceptions!
Comment 1 Lionel Elie Mamane 2012-11-27 14:04:42 UTC
*** Bug 57612 has been marked as a duplicate of this bug. ***
Comment 2 Lionel Elie Mamane 2012-11-27 14:07:03 UTC
Created attachment 70664 [details]
backtrace
Comment 3 Lionel Elie Mamane 2012-11-27 14:11:49 UTC
The try{} catc(){} in question is:

extensions/source/propctrlr/browserlistbox.cxx line 327


        try
        {
            impl_processEvent_throw( _rEvent );
        }
        catch( const Exception& )
        {
            // can't handle otherwise, since our caller (the notification thread) does not allow
            // for exceptions (it could itself abort only)
            DBG_UNHANDLED_EXCEPTION();
        }


According to udkapi/com/sun/star/beans/PropertyVetoException.idl, PropertyVetoException is a com::sun::star::uno::Exception, so it should be caught here!
Comment 4 Stephan Bergmann 2012-11-28 07:34:47 UTC
(In reply to comment #0)
> Open attached .odb
> 
> Click "Reports" (in the left pane)
> 
> Right-click "Report1" (right-lower pane)

This recipe does not work for me (recent Linux libreoffice-3-6 build, with the bundled Report Builder 1.2.3 extension installed, in case that is relevant):  Right-click "Report1" just opens a context menu.  Clicking the context menu "Open", or double-clicking "Report1" only leads to a "The document "Report1" could not be opened." error box.  I do not know what you mean with "horizontal line in the middle of the 'Detail' section" below.

> Click on the horizontal line in the middle of the "Detail" section.
Comment 5 Lionel Elie Mamane 2012-11-28 07:45:27 UTC
(In reply to comment #4)
> (In reply to comment #0)

>> Right-click "Report1" (right-lower pane)

> This recipe does not work for me:  Right-click "Report1" just
> opens a context menu.

You have to take "edit" in this context menu. Forgot it my reproduction instructions, sorry.
Comment 6 Stephan Bergmann 2012-11-28 09:56:26 UTC
The problem is that OFixedLine::setSize, called from within OFixedLine::setHeight, throws a PropertyVetoException that cannot pass out of OFixedLine::setHeight (thanks to the latter's throw(RuntimeException) specification) so this results in a call to std::unexpected -> std::abort.

Looks like a design bug that the setter of the com.sun.star.report.XReportComponent.Height attribute does not specify raises(com.sun.star.beans.PropertyVetoException) while the com.sun.star.drawing.XShape.setSize method does.
Comment 7 Not Assigned 2012-11-29 20:46:44 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

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

fdo#57611 don't crash when setting too small size



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 8 Not Assigned 2012-11-30 11:56:35 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b14f981e055bde9243c82d3ca5bbd3e469a7eb40&g=libreoffice-3-6

fdo#57611 do not crash when setting too small size


It will be available in LibreOffice 3.6.5.

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.