Bug 141844 - XCloseListener attached to form does not throw errors in case of bad Python coding
Summary: XCloseListener attached to form does not throw errors in case of bad Python c...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-23 07:01 UTC by debewerking
Modified: 2022-11-17 03:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description debewerking 2021-04-23 07:01:01 UTC
Description:
When coding errors are present in a closelistener class for some bad coding the expected behaviour is not invoked, while no errors are thrown
I have python opened is a separate editor, CTRL +S, then run the code in libO
(no IDE)

Steps to Reproduce:
def dialog2(oEvent):


    oForm = XSCRIPTCONTEXT.getDocument()

    time.sleep(0.5)
    AB = CloseListener()
    oForm.addCloseListener(AB)

class CloseListener(unohelper.Base, XCloseListener):

    def notifyClosing(self, evt: FrameActionEvent):
       # msgbox("notifyClosing")
       pass

    def queryClosing(self,evt: FrameActionEvent):#,   ownership=True):
        msgbox("qC"+str(9))
        return
    def disposing(self, evt: EventObject):
        pass

0) dialog2 is attached to the 'when loading' form event
1) above code throws no exception, msgbox is not shown, form closes normally

2) if ):# is removed, closing of the form shows the msgbox

3) removing the str function in the msgbox,

4) def queryClosing(self,evt: FrameActionEvent, ownership=True)
without the : an error is thrown

Actual Results:
re 1) no error shown, form closes normally
re 2) good coding, as expected
re 3) no error shown, form closes normally
re 4) bad coding, error is thrown, the only correct case in this list

Expected Results:
re 1) expected is an error like 'expected 2 parameters, got 1
re 2) behaviour is as expected
re 3) should raise the error 'cannot concatenate string and integers'
re 4) behaviour as expected


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 6.4.7.2
Build ID: 1:6.4.7-0ubuntu0.20.04.1
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3;
Comment 1 Buovjaga 2022-04-19 06:24:20 UTC
If you still reproduce the problem with version 7.3, could you attach an example file so we can easily test?

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 2 QA Administrators 2022-10-17 03:30:18 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2022-11-17 03:47:11 UTC
Dear debewerking,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA 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 our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp