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

listener function for opcode 2 of xdg_toplevel is NULL #222

Open
MY201314MY opened this issue Jun 23, 2022 · 5 comments
Open

listener function for opcode 2 of xdg_toplevel is NULL #222

MY201314MY opened this issue Jun 23, 2022 · 5 comments
Labels

Comments

@MY201314MY
Copy link

MY201314MY commented Jun 23, 2022

Afer I build my project, fhe following errors occurred:

listener function for opcode 2 of xdg_toplevel is NULL
Aborted (core dumped)

My configuration is:

#define LV_WAYLAND_XDG_SHELL 1
#define LV_WAYLAND_TIMER_HANDLER 1

#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
My runtime environment is

Linux mac 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

And if I set LV_WAYLAND_WL_SHELL 1,following errors:

[Info] (0.000, +0) lv_init: begin (in lv_obj.c line #102)
[Error] (0.000, +0) create_window: No shell available (in wayland.c line #1810)
[Error] (0.000, +0) lv_wayland_create_window: failed to create wayland window (in wayland.c line #2313)
[Warn] (0.000, +0) lv_disp_get_scr_act: no display registered to get its active screen (in lv_disp.c line #54)
[Info] (0.000, +0) lv_obj_create: begin (in lv_obj.c line #206)
[Warn] (0.000, +0) lv_obj_class_create_obj: No display created yet. No place to assign the new screen (in lv_obj_class.c line #58)

Segmentation fault (core dumped)

Did anyone have the same problem as me?

@kisvegabor
Copy link
Member

I cc @simplejack-src who have added some major refactoring and improvements to the Wayland driver.

@ghost
Copy link

ghost commented Jun 24, 2022

I've made a pull request for the first one (looks like the drivers missing an event handler for an event that was added to the XDG shell protocol in a later revision). The second one I'm not so sure about, it looks like wl_shell isn't supported by your compositor (however since our support of that shell is deprecated, I'm not too worried about that one).

@MY201314MY
Copy link
Author

MY201314MY commented Jun 24, 2022

Thank you for your reply.
I did a test with the patch, and it works with the following code:

int main() {  
    lv_init();
    lv_wayland_init();

    lv_disp_t * display = lv_wayland_create_window(H_RES, V_RES, "Window Title", NULL);

    lv_example_get_started_1();

    while (1) {
        lv_tick_inc(5);
        lv_task_handler();
        usleep(5*1000);
    }

    return 0;
}

But the following errors occured on the window after it runs about 30 seconds later:

"WIndow Title" is not responding.
You may choose to wait a short while for it to continue or
force the application to quit entirely.

@ghost
Copy link

ghost commented Jun 24, 2022

I can't reproduce that (granted my compositor is Wayfire). Is your LVGL configuration correct? i.e. LV_WAYLAND_TIMER_HANDLER is not defined (since your using the Wayland driver in a polling setup)?

@stale
Copy link

stale bot commented Apr 20, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants