LVGL deletes completely wrong object

I’m having an issue where my GUI crashes due to the wrong object being deleted when I call lv_obj_del. For more information, it is happening in the Visual Studio simulator, I haven’t been able to discover if it’s an LVGL issue or Visual Studio issue, but I’m curious if anyone has experienced this before.

I have a msgbox object I’m using as a popup to change some menus, before the msgbox is created I create an object the size of the screen, make it pure black, and the set the opacity low so it grays out the background. Like this:

Now when a user selects a button or presses exit it’ll call the lv_msgbox_close function, which I’ve slightly modified to check if the background shader exists and delete it too. We can see all is fine when this happens:

You can also see objects pointer. Of course this passes the lv_obj_is_valid check:

But when I step inside the lv_obj_del function:

The object pointer is now changed to that is suppose to be “lcd_ui.textarea”, when we step out of the lv_obj_del function, we can see that it was in fact “lcd_ui.textarea” that was deleted:

I’m at a total loss on how this is happening. I’m going to try to revert to an older version of visual studio and see if it fixes this issue.

Reverting to older versions of Visual Studio did not resolve the issues.