-
Notifications
You must be signed in to change notification settings - Fork 73
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
Button callback in button example not always firing #112
Comments
Hi, thanks for the issue report! Was this on latest master or version 0.6.2? This was a known issue on 0.6.2 that (I thought) has since been fixed. If on latest master, can you rerun with |
Thanks for fast reply!
Was it reported? If so, I need to improve my search skills. I'm going to test master soon. |
Not reported, just turned out to be a small issue with the timer. A lot of (quite important) bugfixes have been published since 0.6.2 so expect a new stable version soon-ish |
Ok, here are logs with INFO enabled and on master*:
You see, the first two clicks got lost. The third, although on the same coords fires the callback. It repeats. I believe this is enough. Now I'm not sure if I'm truly on master, but I believe so:
My setup is: Arch Linux with i3-wm. Versions of SDL libraries:
|
I added dependencies with explicit
The issue is still there:
|
Can I see your code (assuming from your let start = Instant::now();
lvgl::task_handler();
window.update(&sim_display);
/* ... */
sleep(Duration::from_millis(15));
lvgl::tick_inc(Instant::now().duration_since(start)); Note that also you can just specify |
Sure. Here you go: https://github.com/zborro/lvgl-rust-button-click-issue-112 (I got button example from master, not I see you're quite responsive, which is fantastic! But I need to take care of something else now. I'll be back in couple of hours, though. |
Meanwhile, maybe try using the Edit: I got it to replicate, but only on very low millisecond times for the frame duration. Still can't dig into this right now, but I have some suspicions. The SDL example still works fine at low ms values so I assume the bug may result from how |
Thanks for confirming.
|
Ah, make sure |
To be clear, the docs will be expanded and updated in time for the next release. It's probably my first priority once I get some bugfixing done. |
I think I can confirm that with SDL it works flawlessly. There are two other issues, though:
Not to mention the issue with high CPU usage I noticed. Is there any place where we can continue such discussions? I don't want this ticket to contain offtop. |
I opened #113 for the overflow; it's a known issue but also one that's been quite headache inducing and with increased attention on this crate it's worth having the fix somewhere obvious. For performance, try building with |
Thanks. While trying to confirm that
I checked it too (the repo I created) on other machine with Ubuntu, but also i3-wm - also segfault. Now I'm checking it on Debian in VirtualBox, that will take while. Trace doesn't tell much more:
I compiled release version with debug symbols and it segfaults too. Unfortunately GDB isn't very helpful:
|
Don't worry, I'll take a look with LLDB tomorrow - it offers much better traces than GDB since rustc uses LLVM internally. C interop is pain. Push your new code to that repository and I'll take a look |
I didn't use LLDB before. This is what it teels. It looks like accessing null pointer or something of that sort.
I'm installing the VM already, so at least I will come back here to say whether it also segfaults under Debian with Gnome. |
Unfortunately this sort of stuff is very difficult to debug remotely. If the code fails on Arch, though, it should fail on my system too so I'll build and look into it. |
Just to let you know - under Gnome over Wayland on Debian VM it doesn't crash. I have also checked i3-wm under same VM and it doesn't crash either. There are still lot of moving parts here that might be our culprit, but I would look into whether switching from Wayland to Xorg causes the problem to appear. Hopefully you find this useful. Since I don't want to meddle into your plans anymore I'm leaving it as for now. Thanks. |
Don't worry, this is useful info. Just send over your code so I can build and test it, as the |
Sure, I created |
yet another update: I noticed |
Enabling the |
As for the initial issue, needless to say I did not take my own advice of going to bed. See #114 and let me know if it fixes the issue. |
Hah. I checked it and issue seems to be gone. Thanks a lot for fixing it! |
Perfect! I'll close this for now and see what's up with the segfaulting when |
Sure. I was about to add that I get two new compilation warnings with your code but that's really minor. Given that I'm already here maybe you have some low hanging fruits for me so I can actually give something in return. I have to say that I perceive your help and attitude to be excellent! 😸
|
Damnit, I missed those. I'll fix that in the next PR I open. If you want to help out, bug reports are very useful; I'm very very bad at QA. Other than that, feel free to look around some recent issues where I ask for feedback if you have any ideas e.g. #109 and such. I appreciate the compliments :D this is a bit of a passion project for me, initially as part of a different project I was doing where I needed LVGL (https://git.haecceity.cc/nia/mxboot) and now I guess I'm maintaining this. It's a lot of fun and I'm glad to help people out |
If you don't mind... #116 I'll look around how can I help with either bug reports or issues. |
Hi,
At the beginning I would like to say that I appreciate your hard work working on this project. Truly amazing.
The issue I have is that I have built button example just to test it, but when I click on the button, the callback is not always fired. Sometimes it works, sometimes it doesn't. Please take a look at the log below. Notice that coordinates don't change, but the button sometimes won't receive event. It doesn't matter how long I press mouse button down.
Looking at the code I'm unable to say where the problem lies. I tried to play around with sleep time (documentation says it should be between 1 and 10 milliseconds) - no luck. As for
lv_conf.h
andlv_drv_conf.h
, I just copied templates and enabled them withifdef
.If there's anything I can help with please let me know.
EDIT: I didn't state it, but I checked plain LVGL button demo too and from what I can tell it hasn't this issue.
The text was updated successfully, but these errors were encountered: