UserCancelled function crashes RealBasic? 
Author Message
 UserCancelled function crashes RealBasic?

My program has a Start button on the main window; when pressed, the program
goes through a series (5 for...next loops, to be exact) of nested, lengthy
loops.  It prompts the user to "press the (command key) + (period) to
abort"; it checks if the user pressed that key combination using the
built-in UserCancelled function.

If the user does press that key combination, the global boolean variable
"Abort" is set to "True"; then, using Exit, it gracefully exits all of the
for...next loops.

Everything goes fine, but if the user presses the Start button again,
RealBasic 4.0.2 itself immediately crashes altogether, with an "Error of
Type 2".

If the user doesn't press the Command + period keys, and lets the program
finish, he can press the Start button again, with no problem.

If, after pressing Command + period keys, the program is exited, and then
Run again, everything is fine, with no problem.

This problem is repeatable.

I haven't tried to see what happens if I compile the application... this
problem is happing in the IDE.

I've tried giving RealBasic gobs of memory (65 megs, to be exact), to no
avail.

Is there something I should be doing after the UserCancelled event occurs?

I'm developing on a Mac G4 cube, 450 mHz, 576 megs RAM, OS 9.0.4, RealBasic
4.0.2 Professional.

Any insights will be appreciated!



Fri, 24 Sep 2004 04:34:31 GMT  
 UserCancelled function crashes RealBasic?

Quote:
> Is there something I should be doing after the UserCancelled event occurs?

No. You may have found a bug in RB.
Please try if 4.5a6 still has this bug and if yes, use Realbugs to send
in a bug report.

Mfg
Christian

--
BSOD = Blue Screen Of Death. Selbstaufrufendes M$-SpielProgram, das
nicht installiert werden mu?, die F?higkeit des Benutzers zur
Interpretation hexadezimaler Gedichte trainiert und einen K{*filter*}der
GraphikKarte (blau) testet. [Herwig Huener am 12.04.2000 in ger.ct]



Fri, 24 Sep 2004 05:11:35 GMT  
 UserCancelled function crashes RealBasic?

[..]

Quote:
> Is there something I should be doing after the UserCancelled event occurs?

Do any of those for/next loops open a resource fork without closing it,
or use a Declared or plugin-related command that needs a subsequent
close?


Fri, 24 Sep 2004 05:30:51 GMT  
 UserCancelled function crashes RealBasic?

Quote:

> Everything goes fine, but if the user presses the Start button again,
> RealBasic 4.0.2 itself immediately crashes altogether, with an "Error of
> Type 2".

Well, that's not UserCancelled crashing, that's your program crashing,
undoubtedly because of something that gets done when the loops are
allowed to finish, but isn't getting done when you bail out early.

What you need to do if you can't look at the code and see a likely
culprit is to run the loops once, bail out, and then start the loops
again and trace through the code, line by line, until the crash
happens.  Then you'll know where it's crashing and can work backwards
from there.



Sat, 25 Sep 2004 00:10:07 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. realbasic 4 crashing?

2. RealBasic Finder Crash problems

3. Realbasic Apps crash when opening files

4. RealBasic crash often

5. Crash - go - boom - Lots of errors in RealBasic Win32 version

6. Duplicating the effects of userCancelled for threads?

7. Cancel buttons and userCancelled

8. Using old External Functions (xfcn) in REALbasic

9. Realbasic instead of VB in Excel function macro?

10. XOR function missing from RealBasic?

11. Sound in RealBasic 4 Prof. (er, RealBasic)

12. Matching Data Types between RealBasic and the RealBasic Database

 

 
Powered by phpBB® Forum Software