Propbasic: Compiler Crash when cogstart w/o Task Definition
Yendor
Posts: 288
Bean,
Even though this may be a d'oh, you may want to catch it. (Propbasic v0.97)
Error:
Compiler Crashed with run time error: 217 Unhandled Exception
So basically,·this occurs when you try to do a cogstart w/o the task defined first.
Also not sure if you want these in the propbasic thread or new ones like this.
example
MyTask1 Task
'MyTask2 Task· ' commented out
...
cogstart MyTask1
cogstart MyTask2
·
Even though this may be a d'oh, you may want to catch it. (Propbasic v0.97)
Error:
Compiler Crashed with run time error: 217 Unhandled Exception
So basically,·this occurs when you try to do a cogstart w/o the task defined first.
Also not sure if you want these in the propbasic thread or new ones like this.
example
MyTask1 Task
'MyTask2 Task· ' commented out
...
cogstart MyTask1
cogstart MyTask2
·
Comments
Ray
· Thanks for the input. I'll check it out and fix it.
P.S. I tried and and I get "Invalid Parameter" ??? Can you post a complete program that crashes.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]
Post Edited (Bean) : 5/23/2010 1:22:31 PM GMT
Jon's N&V code causes a similar crash for me for some reason.
'ping.pbas' example code·shows "unknown command "str"
I guess it's some sort of install thing. Let me reinstall and see what that gives.
Thanks!
[noparse][[/noparse]edit]
well, overwriting bst and the propbasic-bst exe files fails.· propbasic-bst.exe fails too.
Here's jon's N&V code that it shows "crash w/ runtime error 217: unhandled exception"
It must be me or my config - any thoughts on what file·needs to be 'cleaned'?
[noparse][[/noparse]edit]
tried a different directory, no dice.·Both Compile Information and Compile Current File·give the·same runtime error···running directly from command prompt gives the following useful info, I'm sure [noparse]:o[/noparse]):
An unhandled exception occurred at $0040D3D6 :
EAccessViolation : Access violation
· $0040D3D6
· $0045D922
· $0040A6A3
· $0040B60E
.
Note that this 'was' working at one time. I d/l a newer version and put it in a new directory.· Not sure if there's a temp file somewhere that needs to be redeleted
<edit>
Ok, making progress PropBasic Version 00.00.87 Feb 28, 2010 compiles fine.
Fails with·PropBasic VERSION 00.00.97a· May 13, 2010
Thanks!
Post Edited (Yendor) : 5/24/2010 1:59:15 AM GMT
I added another task, however commented out the task code at bottom.
It compiles fine, but as soon as I uncomment out the TASK/ENDTASK at the bottom, it crashes.
Is this happening to anyone else? I'll try another computer tomorrow.
Yep, there is a bug. It will be fixed in the next release.
It happens when you make aliases of the system variables.
As soon as I get the LOAD command fixed I'll post the new version.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]
Have been going crazy with it!
Next time I'll post code right off.
The regular code is fixed - much appreciated!
I tried the original posted issue and it still crashes on me when a Task Definition isn't defined, but is started, and is defined at the bottom.
Note the posted code with the Task Definition commented out. (see, I'm learn'in)
I know it's a user error, and is not a show stopper,·but wanted to let you know it crashes the compiler, or at least it does for me.
I·believe the reason for this is that the compiler is a single pass type and·leaving out the·reference to the task
·will always throw an error.
Similarly, for example,If you write a DO LOOP without the LOOP statement the compiler won't complain but if you use LOOP without the DO statement it will.
regards
Gerry
Thanks for posting the code. I found the problem and it will be corrected in the next release.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]
When I compile program using the EditPlus Editor it gives me the error message
"INVALID PARAMETER "AnotherTask" which is correct
but under BST I get "UNHANDLED EXCEPTION"
Gerry
The compiler throws the "INVALID PARAMETER" error, then crashes.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]
Just to explain that, if the compiler crashes bst will ignore _all_ input from the compiler and simply try and interpret the error return code. I'll put "try and interpret partial output and report errors" on my todo list.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Are you suggesting coconuts migrate?"