Dereference null segfault when calling lv_obj_create

I’m trying to use lvgl functions in a new class. When I try to use lv_obj_create, I end up getting

2022-09-08 16:32:55.912 19934-19934/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x36
2022-09-08 16:32:55.912 19934-19934/? A/DEBUG: Cause: null pointer dereference

Some more of the stacktrace can be found here

2022-09-08 16:32:55.912 19934-19934/? A/DEBUG: #00 pc 0000000000119760 (lv_obj_mark_layout_as_dirty+8)
2022-09-08 16:32:55.912 19934-19934/? A/DEBUG: #01 pc 0000000000117a50 (lv_obj_class_init_obj+16)
2022-09-08 16:32:55.912 19934-19934/? A/DEBUG: #02 pc 0000000000115e28 (lv_obj_create+32)

The same error happens with a NULL parameter or a screen parameter. The lv_group_remove_all_objs functions seems to work fine. My best guess is that it seems to be a dependency issue, but I don’t know how to trace it