Skip to content

[v1.2 only] Crash on changing graphics page after changing PCjr/Tandy video memory size #102

@32bitkid

Description

@32bitkid

Bug report

Problem
When using pcjr/tandy graphics modes and using clear to clear video memory while on a graphical screen, pcbasic does not reset the video mode and will crash if you attempt to access the newly available screen page using screen 4,,1,1 (Rather than returning Illegal function call like it would before the clear command)

On an actual PCjr, when the clear command is not a noop, it resets the screen to mode 0. I do not have a Tandy available for testing.

Program

$ pcbasic --preset=pcjr

10 screen 4
20 clear ,,,32768!
30 screen 4,,1,1

Crash log

EXCEPTION                                                                       
:SCREEN 4,0,1,1                                                                                                                                                 
pcbasic.statements:169, parse_statement                                         
    None                                                                        
pcbasic.statements:2501, exec_screen                                            
    None                                                                        
pcbasic.backend:1040, screen                                                    
    None                                                                        
pcbasic.backend:1187, set_page                                                  
    None                                                                        
IndexError: list index out of range                                             

Notes

PC-BASIC version: 1.2.14 and 2.0.2beta
Operating system version: MacOS 10.14.5

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions