Coder Social home page Coder Social logo

Comments (19)

bigbearishappy avatar bigbearishappy commented on July 29, 2024

This is the log when the error happens:

drm: flip
drm: Find plane property: FB_ID
drm: Find plane property: FB_ID
drm: Find plane property: CRTC_ID
drm: Find plane property: CRTC_ID
drm: Find plane property: SRC_X
drm: Find plane property: SRC_X
drm: Find plane property: SRC_Y
drm: Find plane property: SRC_Y
drm: Find plane property: SRC_W
drm: Find plane property: SRC_W
drm: Find plane property: SRC_H
drm: Find plane property: SRC_H
drm: Find plane property: CRTC_X
drm: Find plane property: CRTC_X
drm: Find plane property: CRTC_Y
drm: Find plane property: CRTC_Y
drm: Find plane property: CRTC_W
drm: Find plane property: CRTC_W
drm: Find plane property: CRTC_H
drm: Find plane property: CRTC_H
drm: Flush done
drm: x 6551:406 y 55:58 w -6144 h 4
Segmentation fault

from lv_port_linux.

kisvegabor avatar kisvegabor commented on July 29, 2024

Can you reproduce it in a simulator on a simple UI (i.e. with a single button or so)?

from lv_port_linux.

bigbearishappy avatar bigbearishappy commented on July 29, 2024

Can you reproduce it in a simulator on a simple UI (i.e. with a single button or so)?

OK, I'll try that and tell you the result.

from lv_port_linux.

bigbearishappy avatar bigbearishappy commented on July 29, 2024

Can you reproduce it in a simulator on a simple UI (i.e. with a single button or so)?

Hello,I have test the single button(lv_example_keyboard_1) and it works fine in all orientation.
but when I test the keyboard(lv_example_keyboard_1).I can reproduce the app break after I touch the touch panel for several times.
And I attach my patch file for this project.Maybe it's helpful for you.
lvgl_patch.zip

from lv_port_linux.

kisvegabor avatar kisvegabor commented on July 29, 2024

For easier review, could you send Pull request with the suggested fixes?

from lv_port_linux.

bigbearishappy avatar bigbearishappy commented on July 29, 2024

For easier review, could you send Pull request with the suggested fixes?

I'm sorry.The file lvgl_patch.zip is to apply for adapting to my own hardware.It can not fix this problem.

from lv_port_linux.

kisvegabor avatar kisvegabor commented on July 29, 2024

Oh, I was too optimistic. I thought patch to fix the problem πŸ™‚

I've tested lv_examples_keyboard_1 with 270 degree rotation and noticed a glitch. It wasn't crashing for me but that glitch can be the sign of the same problem. See the blinking cursor here:
t

The software rotation was written by @embeddedt. Hopefully he can take look at it and spot the problem easily.

from lv_port_linux.

embeddedt avatar embeddedt commented on July 29, 2024

@kisvegabor I will have to look into it in more detail later, however, from a quick debugging session, the issue seems to be related to my optimization here, where I try to rotate the top chunk as a square to save memory and time. For some reason this seems to result in only half of the cursor being drawn correctly each time it blinks.

If you disable that optimization by prepending false && to the if statement, the issue only appears the first time you click the keyboard (you see half of the cursor appearing rather than the full cursor), but it immediately corrects itself afterwards.

It's strange that this is only affecting the cursor and not anything else on the screen.

from lv_port_linux.

kisvegabor avatar kisvegabor commented on July 29, 2024

I made some test with a slightly modified lv_example_btn_1(). Adding false to the mentioned if doesn't make much difference.
r

from lv_port_linux.

embeddedt avatar embeddedt commented on July 29, 2024

@kisvegabor True. Thanks for finding that reproduction case, it's a lot easier to control than the text area's cursor.

I think it's an issue with the SDL driver, not LVGL. I added a lot of debug statements locally and the last chunk (the one which lags behind by a frame) is definitely being sent to flush_cb. I also modified flush_cb to render a different solid color for each new frame, thus ignoring whatever bitmap data LVGL produces, and I can see the same issue where the last section is staying as the previous color instead of being redrawn. So I don't think the rotation logic is responsible for this glitch, though it is definitely an issue. I still don't know exactly why it's happening only when the screen is rotated by 90 degrees.

I also ran the exact same code on STM32 and didn't see any problems there at all.

from lv_port_linux.

bigbearishappy avatar bigbearishappy commented on July 29, 2024

Oh, I was too optimistic. I thought patch to fix the problem πŸ™‚

I've tested lv_examples_keyboard_1 with 270 degree rotation and noticed a glitch. It wasn't crashing for me but that glitch can be the sign of the same problem. See the blinking cursor here:
t

The software rotation was written by @embeddedt. Hopefully he can take look at it and spot the problem easily.

Yes, when I have observed the abnormality carefully. I find this glitch on my machine too. Everytime I touch the textarea of the example, the glitch happens. and then my app breaks.
Also, I tried to simplify the code of lv_example_keyboard_1 with deleting the keyboard in it.
I can reproduce the glitch by touch the textarea too.

from lv_port_linux.

bigbearishappy avatar bigbearishappy commented on July 29, 2024

@kisvegabor I will have to look into it in more detail later, however, from a quick debugging session, the issue seems to be related to my optimization here, where I try to rotate the top chunk as a square to save memory and time. For some reason this seems to result in only half of the cursor being drawn correctly each time it blinks.

If you disable that optimization by prepending false && to the if statement, the issue only appears the first time you click the keyboard (you see half of the cursor appearing rather than the full cursor), but it immediately corrects itself afterwards.

It's strange that this is only affecting the cursor and not anything else on the screen.

@kisvegabor I will have to look into it in more detail later, however, from a quick debugging session, the issue seems to be related to my optimization here, where I try to rotate the top chunk as a square to save memory and time. For some reason this seems to result in only half of the cursor being drawn correctly each time it blinks.

If you disable that optimization by prepending false && to the if statement, the issue only appears the first time you click the keyboard (you see half of the cursor appearing rather than the full cursor), but it immediately corrects itself afterwards.

It's strange that this is only affecting the cursor and not anything else on the screen.

I also tried adding false && to the if statement.The app still breaked.

from lv_port_linux.

bigbearishappy avatar bigbearishappy commented on July 29, 2024

In my opinion. It should be something wrong with the coordinate calculation.

from lv_port_linux.

kisvegabor avatar kisvegabor commented on July 29, 2024

I found the issue of incorrect cursor refresh. See here: lvgl/lvgl@c514bdd

The flushing_last flag wasn't set therefore SDL didn't update the texture.

Probably it won't solve the issue of @bigbearishappy but let's give it a try :)

from lv_port_linux.

bigbearishappy avatar bigbearishappy commented on July 29, 2024

I found the issue of incorrect cursor refresh. See here: lvgl/lvgl@c514bdd

The flushing_last flag wasn't set therefore SDL didn't update the texture.

Probably it won't solve the issue of @bigbearishappy but let's give it a try :)

Cool, I'll try it next Monday.Thank you.

from lv_port_linux.

bigbearishappy avatar bigbearishappy commented on July 29, 2024

I found the issue of incorrect cursor refresh. See here: lvgl/lvgl@c514bdd

The flushing_last flag wasn't set therefore SDL didn't update the texture.

Probably it won't solve the issue of @bigbearishappy but let's give it a try :)

I have apply the patch and test on my machine.
But the changes can not solve this issue.
The break happens as it used to be.

from lv_port_linux.

kisvegabor avatar kisvegabor commented on July 29, 2024

Can you debug the project to see how that weird area is calculated?

from lv_port_linux.

bigbearishappy avatar bigbearishappy commented on July 29, 2024

Can you debug the project to see how that weird area is calculated?

OK,I'll have a try and reply to you.

from lv_port_linux.

stale avatar stale commented on July 29, 2024

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from lv_port_linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.