I developed a new module according to SDL_mouse.c, which is used to implement input devices through the network. When I am running, they are all normal. The button can be touched and the normal touch state changes, but when I pass the button through btn.set_event_cb (event_handle) After binding the event, click the button again, micropython has a segfault, what is the cause? (The same mpy code runs normally with the SDL module, and the event_handle runs successfully). Thank you for your help.
New module link
modnid.c
I developed a new module according to SDL_mouse.c, which is used to implement input devices through the network. When I am running, they are all normal. The button can be touched and the normal touch state changes, but when I pass the button through btn.set_event_cb (event_handle) After binding the event, click the button again, micropython has a segfault, what is the cause? (The same mpy code runs normally with the SDL module, and the event_handle runs successfully). Thank you for your help. New module link modnid.c