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

draw_text intermittently uses invalid pointer #1

Open
Poikilos opened this issue Jan 17, 2020 · 3 comments
Open

draw_text intermittently uses invalid pointer #1

Poikilos opened this issue Jan 17, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@Poikilos
Copy link
Owner

Poikilos commented Jan 17, 2020

(lcd) [root@pentdestrian owner]# lcd-cli --clear hello 
* showing 'hello'...
(lcd) [root@pentdestrian owner]# lcd-cli --clear hello world
* showing 'hello'...
munmap_chunk(): invalid pointer
Aborted (core dumped)
(lcd) [root@pentdestrian owner]# lcd-cli --clear hello 1
* showing 'hello'...
munmap_chunk(): invalid pointer
Aborted (core dumped)
(lcd) [root@pentdestrian owner]# lcd-cli --clear hello 2345
* showing 'hello'...
munmap_chunk(): invalid pointer
Aborted (core dumped)
(lcd) [root@pentdestrian owner]# lcd-cli --clear hello 2 3 4
* showing 'hello'...
* showing '2'...
* showing '3'...
* showing '4'...
(lcd) [root@pentdestrian owner]# lcd-cli --clear hello 2 3 4 5 6 7 8 9 10 11 12
* showing 'hello'...
* showing '2'...
* showing '3'...
* showing '4'...
* showing '5'...
* showing '6'...
* showing '7'...
* showing '8'...
* showing '9'...
[ PicoLCD ] WARNING in draw_text: offscreen buffer had 0 text pixels
* showing '10'...
[ PicoLCD ] WARNING in draw_text: offscreen buffer had 0 text pixels

@Poikilos Poikilos added the bug Something isn't working label Jan 19, 2020
@Poikilos
Copy link
Owner Author

Poikilos commented Jan 29, 2020

This is still happening intermittently. You can sometimes prevent it by physically disconnecting and reconnecting the LCD, which resets some buffers (the only reason that solves the issue seems to be changing the conditions under which Pillow operates, such as clearing the Image etc which causes pypicolcd to draw things differently [avoid optimizations regarding pixels that are already on; and possibly other differences]). See python-pillow/Pillow#4225

@Poikilos Poikilos reopened this Jan 29, 2020
@radarhere
Copy link

A proposed fix for the Pillow issue has been merged and released as part of Pillow 8.2.0.

@Poikilos
Copy link
Owner Author

Poikilos commented Apr 3, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants