Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when assigning to KEY$ #2

Closed
mengstr opened this issue Jan 8, 2016 · 2 comments
Closed

Crash when assigning to KEY$ #2

mengstr opened this issue Jan 8, 2016 · 2 comments

Comments

@mengstr
Copy link

mengstr commented Jan 8, 2016

I didn't realise that KEY was a reserved KEYword (pun intended) so I had a KEY$=INKEY$ in the code which resulted in a hard crash.

PC-BASIC 15.08.3                                                                
(C) Copyright 2013--2015 Rob Hagemans.                                          
60300 Bytes free                                                                
Ok                                                                              
KEY$="Me so stupid..."  
2016-01-08 12:22:37.473 pcbasic[29835:1095836] 12:22:37.473 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.
ERROR: Unhandled exception
Traceback (most recent call last):
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.__main__", line 169, in start_basic
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.run", line 46, in start
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.run", line 60, in run_once
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.statements", line 170, in parse_statement
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.statements", line 2255, in exec_key
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.statements", line 2260, in exec_key_define
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.expressions", line 111, in parse_expression
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.expressions", line 119, in parse_operators
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.expressions", line 920, in value_operator
  File "/Users/rob/pc-basic/packaging/osx/build/installer/out00-PYZ.pyz/pcbasic.vartypes", line 306, in equals
TypeError: 'NoneType' object is not subscriptable
'```

@robhagemans
Copy link
Owner

Thanks for reporting this! I'll fix the bug for the next minor update. Of course you'll still get a Syntax Error for using KEY in this way, but there should certainly not be a crash :)

Rob

@robhagemans
Copy link
Owner

Fixed by commit 1db4c83 which will be in the 15.08.4 release.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants