Skip to content

Unix port failing on sdl_display object creation #113

@androiddrew

Description

@androiddrew

So I have attempted to build the unix port on two ubuntu machines. One is a 22.04 with an Nvidia GPU the other is a 24.04 Ubuntu machine with a simple dell with an onboard GPU.

I have added DEBUG to the micropython compile with:

diff --git a/builder/unix.py b/builder/unix.py
index ba0bc7d..669798f 100644
--- a/builder/unix.py
+++ b/builder/unix.py
@@ -245,6 +245,7 @@ def compile(*args):  # NOQA
 
     cmd_ = compile_cmd[:]
     cmd_.extend(list(args))
+    cmd_.insert(0, "DEBUG=1")
 
     return_code, _ = spawn(cmd_)
     if return_code != 0:

I am running on both machines

python3 make.py unix submodules clean mpy_cross DISPLAY=sdl_display INDEV=sdl_pointer

I copy the example program on https://github.com/lvgl-micropython/lvgl_micropython/blob/main/README.md?plain=1#L580-L628 to a test_unix_sdl.py file then run

toor@toor-jammy-jellifish:~/experiments/lvgl_micropython$ ./build/lvgl_micropy_unix ./test_unix_sdl.py
Segmentation fault (core dumped)

When I run the program with gdb

Reading symbols from ./build/lvgl_micropy_unix...
(gdb) break main
Breakpoint 1 at 0x1b1f48: file main.c, line 467.
(gdb) run ./test_unix_sdl.py 
Starting program: /home/toor/experiments/lvgl_micropython/build/lvgl_micropy_unix ./test_unix_sdl.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, main (argc=2, argv=0x7fffffffdb58) at main.c:467
467	int main(int argc, char **argv) {
(gdb) c
Continuing.
[New Thread 0x7ffff1200640 (LWP 24564)]

Thread 1 "lvgl_micropy_un" received signal SIG34, Real-time event 34.
0x00007ffff7d18bcf in __GI___poll (fds=0x7fffffffd248, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
29	../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
(gdb) backtrace
#0  0x00007ffff7d18bcf in __GI___poll (fds=0x7fffffffd248, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6f647e2 in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007ffff6f64eb1 in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007ffff6f65ea6 in xcb_wait_for_reply64 () from /lib/x86_64-linux-gnu/libxcb.so.1
#4  0x00007ffff6fc831c in _XReply () from /lib/x86_64-linux-gnu/libX11.so.6
#5  0x00007ffff66c4921 in ?? () from /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#6  0x00007ffff667382c in ?? () from /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#7  0x00007ffff4e088fe in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.560.35.03
#8  0x00007ffff667144d in ?? () from /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#9  0x00007ffff4e5e564 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.560.35.03
#10 0x00007ffff4e62d5e in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.560.35.03
#11 0x00007ffff4e62ee6 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.560.35.03
#12 0x00007ffff4e3858b in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.560.35.03
#13 0x00007ffff4e48875 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.560.35.03
#14 0x00007ffff666f7c7 in ?? () from /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#15 0x00007ffff666feef in ?? () from /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#16 0x00007ffff7ffd040 in ?? () from /lib64/ld-linux-x86-64.so.2
#17 0x0000000000000000 in ?? ()

The above output was from my 22.04 ubuntu machine with an NVIDIA GPU.

I am getting this signal 34 event. I'm kind of at a loss where to take this. I manually typed in each line from test_unix_sdl.py and I believe it is happening on initializing the SDLDisplay.

display = sdl_display.SDLDisplay(
    data_bus=bus,
    display_width=_WIDTH,
    display_height=_HEIGHT,
    frame_buffer1=buf1,
    frame_buffer2=buf2,
    color_space=lv.COLOR_FORMAT.RGB888
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions