Shop OBEX P1 Docs P2 Docs Learn Events
Propbasic: Compiler Crash when cogstart w/o Task Definition — Parallax Forums

Propbasic: Compiler Crash when cogstart w/o Task Definition

YendorYendor Posts: 288
edited 2010-05-26 12:50 in Propeller 1
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


·

Comments

  • RsadeikaRsadeika Posts: 3,837
    edited 2010-05-23 10:04
    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
  • BeanBean Posts: 8,129
    edited 2010-05-23 13:02
    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. [noparse][[/noparse]RUSH - Freewill]

    Post Edited (Bean) : 5/23/2010 1:22:31 PM GMT
  • YendorYendor Posts: 288
    edited 2010-05-24 01:14
    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!

    [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
  • YendorYendor Posts: 288
    edited 2010-05-24 02:30
    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.
  • YendorYendor Posts: 288
    edited 2010-05-25 02:21
    Just tried 98a, and still crashes on the above code.

    Is this happening to anyone else? I'll try another computer tomorrow.
  • BeanBean Posts: 8,129
    edited 2010-05-25 02:26
    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. [noparse][[/noparse]RUSH - Freewill]
  • YendorYendor Posts: 288
    edited 2010-05-25 02:37
    Whew - thanks for the response Bean!

    Have been going crazy with it!

    Next time I'll post code right off.
  • YendorYendor Posts: 288
    edited 2010-05-26 04:05
    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 KeelyGerry Keely Posts: 75
    edited 2010-05-26 06:40
    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
  • BeanBean Posts: 8,129
    edited 2010-05-26 11:29
    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. [noparse][[/noparse]RUSH - Freewill]
  • Gerry KeelyGerry Keely Posts: 75
    edited 2010-05-26 11:51
    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
  • BeanBean Posts: 8,129
    edited 2010-05-26 12:18
    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]
  • BradCBradC Posts: 2,601
    edited 2010-05-26 12:50
    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?"
Sign In or Register to comment.