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

Modifying contents of a displayio.Group causes a hard crash #4321

Closed
kmatch98 opened this issue Mar 3, 2021 · 0 comments · Fixed by #4322
Closed

Modifying contents of a displayio.Group causes a hard crash #4321

kmatch98 opened this issue Mar 3, 2021 · 0 comments · Fixed by #4322

Comments

@kmatch98
Copy link
Collaborator

kmatch98 commented Mar 3, 2021

The following code causes a hard crash when the group element is changed:

import time
time.sleep(5) # allow time to Ctrl-C if you need to

import displayio

my_group=displayio.Group()
bitmap1=displayio.Bitmap(1,1,2)
palette=displayio.Palette(2)
tilegrid1=displayio.TileGrid(bitmap1, pixel_shader=palette)
tilegrid2=displayio.TileGrid(bitmap1, pixel_shader=palette)

print('appending')
my_group.append(tilegrid1)

print('len(my_group): {}'.format(len(my_group)))

print('mutating my_group[0]')
my_group[0]=tilegrid2

print('entering loop')
while True:
    pass

Here's what shows up on the display before the crash:

>>> 
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

code.py output:
appending
len(my_group): 1
mutating my_group[0]

Hardware: PyPortal
Version:

Adafruit CircuitPython 6.2.0-beta.2-302-gcd48c5ee8 on 2021-03-03; Adafruit PyPortal with samd51j20

Possibly related to #4233

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

Successfully merging a pull request may close this issue.

1 participant