-
Notifications
You must be signed in to change notification settings - Fork 47
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 running AUTO .
#230
Labels
Comments
I can reproduce this with PC-BASIC 2.0.6. |
GBR-613
pushed a commit
to GBR-613/pcbasic
that referenced
this issue
Mar 6, 2024
Open
robhagemans
added a commit
that referenced
this issue
Mar 9, 2024
robhagemans
added a commit
that referenced
this issue
Mar 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Problem
According to the documentation,
AUTO .
should provide automatic line numbering starting from the last program line stored.However, attempting to use it causes the interpreter to throw a
TypeError
.Steps
AUTO .
.Program
10 AUTO .
Crash log
Crash log
Please file a bug report, including this message and the steps you took
just before the crash. Go to:
https://github.com/robhagemans/pcbasic/issues
Please include the full crash log in your report.
You can paste it from the clipboard or from the file at:
/home/patchmixolydic/.local/share/pcbasic-2.0/crash-20231119-t21nxalz.log
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pcbasic/guard.py", line 51, in protect
yield
File "/usr/lib/python3/dist-packages/pcbasic/main.py", line 119, in _run_session
session.interact()
File "/usr/lib/python3/dist-packages/pcbasic/basic/api.py", line 149, in interact
self._impl.interact()
File "/usr/lib/python3/dist-packages/pcbasic/basic/implementation.py", line 315, in interact
self._auto_step()
File "/usr/lib/python3/dist-packages/pcbasic/basic/implementation.py", line 365, in _auto_step
numstr = b'%d' % (self._auto_linenum,)
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
TypeError: %d format: a real number is required, not bytes
==== Screen Pages ==================================================================================
+--------------------------------------------------------------------------------+
0 |PC-BASIC 2.0.5 | 14
1 |(C) Copyright 2013--2022 Rob Hagemans. | 38
2 |60300 Bytes free | 16
3 |Ok? | 3
4 |AUTO . | 6
5 | | 0
6 | | 0
7 | | 0
8 | | 0
9 | | 0
10 | | 0
11 | | 0
12 | | 0
13 | | 0
14 | | 0
15 | | 0
16 | | 0
17 | | 0
18 | | 0
19 | | 0
20 | | 0
21 | | 0
22 | | 0
23 | | 0
24 | 1LIST 2RUN� 3LOAD" 4SAVE" 5CONT� 6,"LPT1 7TRON� 8TROFF� 9KEY 0SCREEN| 80
+--------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------+
0 | | 0
1 | | 0
2 | | 0
3 | | 0
4 | | 0
5 | | 0
6 | | 0
7 | | 0
8 | | 0
9 | | 0
10 | | 0
11 | | 0
12 | | 0
13 | | 0
14 | | 0
15 | | 0
16 | | 0
17 | | 0
18 | | 0
19 | | 0
20 | | 0
21 | | 0
22 | | 0
23 | | 0
24 | | 0
+--------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------+
0 | | 0
1 | | 0
2 | | 0
3 | | 0
4 | | 0
5 | | 0
6 | | 0
7 | | 0
8 | | 0
9 | | 0
10 | | 0
11 | | 0
12 | | 0
13 | | 0
14 | | 0
15 | | 0
16 | | 0
17 | | 0
18 | | 0
19 | | 0
20 | | 0
21 | | 0
22 | | 0
23 | | 0
24 | | 0
+--------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------+
0 | | 0
1 | | 0
2 | | 0
3 | | 0
4 | | 0
5 | | 0
6 | | 0
7 | | 0
8 | | 0
9 | | 0
10 | | 0
11 | | 0
12 | | 0
13 | | 0
14 | | 0
15 | | 0
16 | | 0
17 | | 0
18 | | 0
19 | | 0
20 | | 0
21 | | 0
22 | | 0
23 | | 0
24 | | 0
+--------------------------------------------------------------------------------+
==== Scalars =======================================================================================
==== Arrays ========================================================================================
==== Strings =======================================================================================
==== Program Buffer ================================================================================
b'00' b'0000' (ENDS) b'' b''
==== Program =======================================================================================
==== Options =======================================================================================
[]
Notes
This happens whether or not there are any stored program lines (eg. typing
10 BEEP
followed byAUTO .
will still crash).PC-BASIC version: Log from 2.0.5 (provided by Debian), reproduces on 2.0.7 (bb50fbf 2023-04-02 15:17:45.995101)
Operating system version: Log from Debian Sid (Linux-6.1.0-9-amd64-x86_64-with-glibc2.36), reproduces on Arch Linux (Linux-6.1.62-1-lts-x86_64-with-glibc2.38)
The text was updated successfully, but these errors were encountered: