Bug 65758

Summary: Problem with error function in a "if" statement
Product: LibreOffice Reporter: gaelle.faurepinel
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: gaelle.faurepinel, nopower, serval2412
Version: 3.5.7.2 release   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description gaelle.faurepinel 2013-06-14 15:50:25 UTC
When the "error" function is in a "if" statement, it is never triggered.

Example :

In this case, the routine launchs an error :
Sub Main
Dim isErreur as Boolean
isErreur = 1
MsgBox "Essai lancement erreur."
error(9)
MsgBox "Lancement loupé."
End Sub

In this case, it doesn't :
Sub Main
Dim isErreur as Boolean
isErreur = 1
if isErreur then
	MsgBox "Essai lancement erreur."
	error(9)
	MsgBox "Lancement loupé."
end if
End Sub
Comment 1 Julien Nabet 2013-06-21 22:38:53 UTC
On pc Debian x86-64 with master sources updated today and with 4.0.3 Debian packages, I can reproduce this.
Comment 2 Julien Nabet 2013-06-21 23:22:45 UTC
Noel: one for you?
Indeed, when "if" is used, "SbiRuntime::StepERROR()" from basic/source/runtime/runtime.cxx isn't called.

I added a trace in SbiRuntime::Step() for eOp

Situation OK:
Until first MsgBox:
135
135
137
135
129
128
30
135
24
65
25
128

After:
28
135
66
53

Situation KO:
Until first MsgBox
135
135
137
135
129
128
30
135
129
71
135
24
65
25
128

After:
28
135
24
66
25
128
28
135
24
65
25
128
Comment 3 Noel Power 2013-06-24 09:08:33 UTC
sounds like a bug ( and was there in 3.4 afaict )

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.