Issue 70598

Summary: Basic IDE - no way to stop a macro in an infinite loop
Product: General Reporter: pagalmes.lists
Component: uiAssignee: stefan.baltzer
Status: CLOSED IRREPRODUCIBLE QA Contact: issues@framework <issues>
Severity: Trivial    
Priority: P3 CC: issues, maison.godard, manens, pet.ebe
Version: OOo 2.0.4Keywords: oooqa
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description pagalmes.lists 2006-10-19 11:50:06 UTC
In the Basic IDE, in some cases, there is no way to stop a macro in an infinite
loop except by killing the whole soffice. For example, have a look at the
following code :

while fileProcessed <> ""

    msgBox fileProcessed

wend

This is an infinite loop where a message box is displayed in each iteration.
When executing this code, each loop will display a message Box which is modal.
That means that you can't click on the stop button in the IDE. The only choice
you have is to click on the "Ok" button from the msgBox, which will display a
new msgBox...

Currently, the only choice we have is to kill OpenOffice.org (or close the
document containing the macro if you can). This may be quite annoying, because
you have to re-open everything.

This is somehow related to an issue Laurent (Lgodard) posted some years ago :
Issue 24895
Comment 1 maison.godard 2006-10-19 12:59:07 UTC
changing component
Comment 2 eberlein 2006-10-20 07:32:22 UTC
Select another component (IDE -> text document or vice versa), press
CTRL-SHIFT-Q and the macro will stop.
If you have only one frame open, you have to take care, that such a loop has an 
"exit Do" (don't use while wend).
The normal user shouldn't have possibilities to break running macros with shortcuts.
Comment 3 maison.godard 2006-10-20 07:57:11 UTC
This works ! even with msgbox

Sub Main
a=1
while a<1000000
	msgbox a
wend
print a
End Sub

whan has this been introduced ?
Comment 4 eberlein 2006-10-20 08:03:21 UTC
StarOffice 4.0 ? ;)
Andreas must know it.
Comment 5 manens 2006-10-20 14:51:36 UTC
I think that the shortcut should be set on CTRL+BREAK (like in others products).
Should I create a new issue ?
Comment 6 ace_dent 2008-05-17 21:48:20 UTC
The Issue you raised has been marked as 'Resolved' and not updated within the
last 1 year+. I am therefore setting this issue to 'Verified' as the first step
towards Closing it. If you feel this is incorrect, please re-open the issue and
add any comments.

Many thanks,
Andrew
 
Cleaning-up and Closing old Issues
~ The Grand Bug Squash, pre v3 ~
http://marketing.openoffice.org/3.0/announcementbeta.html
Comment 7 ace_dent 2008-05-17 23:52:24 UTC
As per previous posting: Verified -> Closed.
A Closed Issue is a Happy Issue (TM).

Regards,
Andrew