-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Segfault when scrolling past the last tablet in reels #2717
Comments
I just tried adding less tablets to the reels so that the tablets never reach the bottom of the reels, and scrolling works fine, both ups and downs, circular and infinite, no errors whatsoever. I then started to add tablets one by one, until something breaks, and when one of the tablets reached the bottom of the reel (or plane?), the whole screen shifts up and i got these errors everytime i press
Adding one more tablet at this point and then scrolling down gives me segfault |
ick, this likely affects my growlight tool if this is all valid. i'll look into it as soon as i can (probably not before this weekend, sadly). thanks for the high-quality report! |
Appreciate it, take it easy, cheers! |
So i just done more testing, and apparently when i remove the top and bottom borders of the tablets using Enabling either top, bottom, or both, triggers the segfaults when scrolling down. I think i'm going to disable top and bottom border as a workaround for now. Thanks! |
oh that's a great find! thanks a lot, that ought make things significantly easier! |
Update, i was experiencing segfault sometimes with no border around the tablets. This time the tablet contains longer text inside it. If anyone experiencing this, the workaround is by incrementing the number of lines returned by tablet callback. |
Apparently, this is because i counted the content of the tablets wrong, hence i returned the wrong return value for the tablet callback. This is the cause of the segfaults. SOOOO DUMB!! Thanks for the help, i'm closing this issue. |
Wait sorry, i'm a dumbass, apparently it still happens when the tablet have top and/or bottom borders. |
Please include the following data:
export | egrep 'LANG|LC_CTYPE|TERM'
notcurses-demo i
)Issue description
So, i'm creating a program that use reel, but when scrolling down past the last displayed tablet, i got a segfault. I tried scrolling up, it works fine, but when i scroll down again it segfaults.
To make sure it's not just my code, i tried running the reel demo, when i scroll down past the last tablet or sometimes past the last tablet displayed, the demo segfaults too. Scrolling up works fine too in the demo.
Debugger log
Here's the errors i can capture from gdb
How to reproduce:
notcurses-demo r
j
ordown arrow
keyThe text was updated successfully, but these errors were encountered: