BBC BASIC for Windows
« Disappearing BASIC »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:58pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Disappearing BASIC  (Read 1451 times)
KenDown
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 181
xx Disappearing BASIC
« Thread started on: Feb 10th, 2014, 07:22am »

Does anyone else have this same problem? All of a sudden - totally without warning - BB4W just disappears!

I'm in the middle of working on a program which, so far as I know, doesn't do anything illegal, doesn't use any machine code, only uses SYS calls found in the help, and suddenly the whole thing vanishes. The program doesn't just hang-up or freeze, the entire BB4W editing window disappears without saving a temp file or anything.

When you restart BB4W it doesn't come up with the program in the window, it's just a blank, new window. If you haven't saved your program regularly - and I'm now getting paranoid about saving after every line or two of code - it's all gone.

Sometimes I have worked on the program and then am called away for some reason, come back and find it all gone - and I wasn't even doing anything!

I've tried looking at the error messages which Microsoft invites you to send off, but they are all different (they refer to a different address each time).

The only clue I have is that the problem seems particularly bad if the program uses a text-edit window.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Disappearing BASIC
« Reply #1 on: Mar 9th, 2014, 1:59pm »

on Feb 10th, 2014, 07:22am, KenDown wrote:
the entire BB4W editing window disappears without saving a temp file or anything.

That is a classic symptom of a thread being left running when your program terminates. Ensure that the following are adhered to:
  • Never abort your program by clicking on the 'stop' button in the IDE's toolbar (or the equivalent menu item).

  • Check that every possible means of exit from your program is trapped, in particular ensure there are both ON CLOSE and ON ERROR handlers.

  • Check that PROCcleanup (or whatever it is called in your program) closes all windows and dialogues you have created, and check that it is called before any END, STOP or QUIT statements.
I guarantee that will fix the problem!

Richard.
User IP Logged

KenDown
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 181
xx Re: Disappearing BASIC
« Reply #2 on: Mar 9th, 2014, 8:24pm »

Thanks, though that is a counsel of perfection, particularly when writing a program. You write d*2 instead of d%*2 and the program comes to a crashing halt (and even worse if the mistake is in PROCerror which should be closing all the bits and pieces you mention!

Nevertheless, I bodge along quite happily with the program crashing and being fixed and restarting and so on - right up until I include an edit window (code copied from your example program) and then the problems start.

So I close down BB4W, I even restart the computer, load the program into BB4W and don't even run it, just scroll through it to find the point where I left off and - bang! Gone!

However, interestingly, I have noticed that once the program is compiled, although the BB4W program still crashes and disappears, the compiled .exe is pretty stable, edit window and all.

Odd.
User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Disappearing BASIC
« Reply #3 on: Mar 9th, 2014, 9:01pm »

on Mar 9th, 2014, 1:59pm, Richard Russell wrote:
Never abort your program by clicking on the 'stop' button in the IDE's toolbar (or the equivalent menu item).

Can I ask - out of curiosity, not criticism - what the need for the STOP button is, then?

Matt
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Disappearing BASIC
« Reply #4 on: Mar 9th, 2014, 10:46pm »

on Mar 9th, 2014, 9:01pm, Matt wrote:
Can I ask - out of curiosity, not criticism - what the need for the STOP button is, then?

The BB4W documentation tells you. Here's a link to the relevant section of the online manual:

http://www.bbcbasic.co.uk/bbcwin/manual/bbcwin1.html#stop

As it says, the STOP button is for use as a last resort when nothing else works.

Richard.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Disappearing BASIC
« Reply #5 on: Mar 9th, 2014, 10:48pm »

on Mar 9th, 2014, 8:24pm, KenDown wrote:
Thanks, though that is a counsel of perfection, particularly when writing a program. You write d*2 instead of d%*2 and the program comes to a crashing halt

Please don't use the emotive word 'crash' out of context. Writing d*2 rather than d%*2 does not result in a crash, it results in an error being reported (probably 'No such variable'). BB4W is not prone to crashing!

Quote:
Nevertheless, I bodge along quite happily with the program crashing

If you follow the recommendations I gave, it will not crash. They are things that every program should do anyway, but they become more important in the rare case when the program creates a new thread.

Quote:
until I include an edit window (code copied from your example program) and then the problems start.

If the example you are referring to is TEXTEDIT.BBC, that does not create a new thread, and cannot crash BB4W in the way you describe (at least, not with the current version of WINLIB5; there may have been a very old version of that library that did create a new thread).

If in doubt, run TEXTEDIT.BBC itself; it will not cause the IDE to crash, even if you use the Stop button.

Richard.
« Last Edit: Mar 9th, 2014, 10:51pm by admin » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls