Liberty BASIC Community Forum
« error closes IDE »

Welcome Guest. Please Login or Register.
Feb 18th, 2018, 3:35pm


Rules|Home|Help|Search|Recent Posts|Notification

Problems installing Liberty BASIC? Read the Vista/Win7 Installation FAQ
Looking for a categorized List of Bug Reports? Visit the Liberty BASIC Bug Tracker

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: error closes IDE  (Read 194 times)
tsh73
Board Moderator

member is offline

Avatar

Anatoly (real name)


PM

Gender: Male
Posts: 1745
xx error closes IDE
« Thread started on: Jan 31st, 2018, 01:46am »

While debugging a program, got IDE closed after error, several times
(it was programmatically generated names).

My wish that error in a program should not close IDE I work with, never.

Condensed offending program to this. Checked of two computers, WinXP and Win10.
Please check/confirm if this program closes IDE.

Code:
open "test" for graphics as #gr
while 1
    timer 100, [nxt]
    wait
[nxt]
    timer 0
'this line refers to non-existant BMP in memory (was programmer error)
'with timer and a loop - 
'it closes IDE
'*Nothing* should close IDE!
'Same behavour happens in a graphicbox.
    #gr "drawbmp notExistBMP 1 1"
wend
wait 
User IP Logged

damned Dog in the Manger
Rod
Global Moderator
ImageImageImageImageImage


member is online

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5655
xx Re: error closes IDE
« Reply #1 on: Jan 31st, 2018, 05:06am »

Yes it crashes, can be avoided by running in debug, ladybug,run, stops on offending line with error message. Does not close IDE.
User IP Logged

tsh73
Board Moderator

member is offline

Avatar

Anatoly (real name)


PM

Gender: Male
Posts: 1745
xx Re: error closes IDE
« Reply #2 on: Jan 31st, 2018, 07:23am »

Quote:
Yes it crashes, can be avoided by running in debug, ladybug,run, stops on offending line with error message. Does not close IDE.

so
* (normal) run in IDE - crashes, close IDE
* run in Debug mode - stops on offending line with error message. Does not close IDE

right?
User IP Logged

damned Dog in the Manger
robmcal
Senior Member
ImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 401
xx Re: error closes IDE
« Reply #3 on: Jan 31st, 2018, 1:06pm »

on Jan 31st, 2018, 01:46am, tsh73 wrote:
My wish that error in a program should not close IDE I work with, never.

The best way to accomplish this is to use an external editor...
User IP Logged

Definition of an Upgrade: Take old bugs out, put new ones in.
Rod
Global Moderator
ImageImageImageImageImage


member is online

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5655
xx Re: error closes IDE
« Reply #4 on: Feb 1st, 2018, 03:58am »

Quote:
so
* (normal) run in IDE - crashes, close IDE
* run in Debug mode - stops on offending line with error message. Does not close IDE

right?



Yes so what happens for you? The debug window has to close because it has caught the error but the IDE and the program is untouched and you can continue editing.
User IP Logged

tsh73
Board Moderator

member is offline

Avatar

Anatoly (real name)


PM

Gender: Male
Posts: 1745
xx Re: error closes IDE
« Reply #5 on: Feb 1st, 2018, 06:00am »

>>Yes so what happens for you?
same thing.
Then debugging IDE survives.
User IP Logged

damned Dog in the Manger
Chris Iverson
Administrator
ImageImageImageImageImage


member is offline

Avatar

20% Cooler


Homepage PM

Gender: Male
Posts: 2301
xx Re: error closes IDE
« Reply #6 on: Feb 1st, 2018, 10:01am »

Rod's solution is a decent enough workaround, but I would agree that a bug in your written code crashing the entire editing environment is frustrating. Perhaps it's a bad habit, but I run into this a lot, because I tend to not use the debugger until I have running code already. When I'm throwing code together to test an idea, or test how things work, I have a tendency to just quickly hit run and see if any issues pop up immediately.

Ideally, the LB IDE would be isolated enough that the typed in code wouldn't crash it.
User IP Logged

"Do you believe in destiny?" - Pyrrha Nikos, RWBY
"With what wish will your Soul Gem shine?" - Kyubey, Puella Magi Madoka Magica
Noble D. Bell
Board Moderator

member is offline

Avatar




PM

Gender: Male
Posts: 935
xx Re: error closes IDE
« Reply #7 on: Feb 2nd, 2018, 08:40am »

I have noticed this in Windows 10 but have not experienced it in Windows 7.

User IP Logged

Thank you and God bless,
Noble D. Bell
http://www.noblebell.com
Rod
Global Moderator
ImageImageImageImageImage


member is online

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5655
xx Re: error closes IDE
« Reply #8 on: Feb 2nd, 2018, 1:07pm »

As far as i am aware runtime errors have always had the potential to crash the runtime and ide.

This is an interpreted and compiled language, your basic text is first interpreted and compiled to a tokenised small talk file. During this process Liberty attempts to report basic language syntax errors.

If it finds none the tokenised file is submitted to the runtime engine. This is no more than a second interpreter that is small talk based. Given you have passed the basic interpretation the runtime either runs full steam, ie compiled, or it runs interpreted, ie debug. One you can catch errors the other you canít

So from the good old olden days of compiling you always ran interpreted till you were 100% sure your parameters were in scope and range.
« Last Edit: Feb 2nd, 2018, 1:08pm by Rod » User IP Logged

Stefan Pendl
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Computers are like babies, you must teach them what you like them to do ...


Homepage PM

Gender: Male
Posts: 5307
xx Re: error closes IDE
« Reply #9 on: Feb 3rd, 2018, 03:13am »

The best way to avoid loosing your source code it to enable "Create *.BAK on Run/Debug" in the preferences of the LB IDE, don't forget to specify a path. This setting is usually enabled by default.
Since the IDE is also the VM a hard crash will always result in loosing the IDE, a separate process for running the VM would be beneficial.
User IP Logged

Stefan

Make sure to read and follow the Forum Guidelines

Liberty BASIC Pro 4.5.1 beta, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Brandon Parker
Board Moderator

member is offline

Avatar




PM

Gender: Male
Posts: 1127
xx Re: error closes IDE
« Reply #10 on: Feb 4th, 2018, 3:08pm »

I'm a really big fan of using Subroutines/ Functions to encapsulate as much code as I can especially if the code is used repeatedly. This also allows for trapping errors fairly easily and if they are handled inside the Subroutine/ Function the the main program can continue on. Only the most severe errors, usually protection violations with DLL's, tend to just outright crash Liberty BASIC.

Code:
Function myFunction()
    On Error GoTo [Error]
    'Do something

    Exit Function
    [Error]
    'Address Error
End Function 



{:0)

Brandon Parker
« Last Edit: Feb 4th, 2018, 3:11pm by Brandon Parker » User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Liberty BASIC Community Wiki
Wikispaces
Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls