PDA

View Full Version : Propbasic: Compiler Crash when cogstart w/o Task Definition



Yendor
05-23-2010, 03:41 PM
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


·

Rsadeika
05-23-2010, 06:04 PM
You may want to try version .98a, it may have been fixed, unless of course you have already tried that version, and you are working backwards to see at what version it goes away.

Ray

Bean
05-23-2010, 09:02 PM
Yendor,
· 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. [RUSH - Freewill]

Post Edited (Bean) : 5/23/2010 1:22:31 PM GMT

Yendor
05-24-2010, 09:14 AM
Well, not sure what's going on now. It seemed to be consistant, but last night was·getting some pretty wild stuff.· I just tried rebooting and known good code is causing issues:
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!

[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'?

[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 :o):

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

Yendor
05-24-2010, 10:30 AM
This one crashes in 00.00.87

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.

Yendor
05-25-2010, 10:21 AM
Just tried 98a, and still crashes on the above code.

Is this happening to anyone else? I'll try another computer tomorrow.

Bean
05-25-2010, 10:26 AM
Yendor,
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. [RUSH - Freewill]

Yendor
05-25-2010, 10:37 AM
Whew - thanks for the response Bean!

Have been going crazy with it!

Next time I'll post code right off.

Yendor
05-26-2010, 12:05 PM
Thanks Bean!

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.

Gerry Keely
05-26-2010, 02:40 PM
Hi

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

Bean
05-26-2010, 07:29 PM
Yendor,
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. [RUSH - Freewill]

Gerry Keely
05-26-2010, 07:51 PM
Yendor/Bean - for info

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

Bean
05-26-2010, 08:18 PM
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. [RUSH - Freewill]

BradC
05-26-2010, 08:50 PM
Bean said...
Gerry,
The compiler throws the "INVALID PARAMETER" error, then crashes.


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?"