I need some help on GTK (C): https://stackoverflow.com/questions/56092425/gtk-tree-model-foreach-assertion-gtk-is-tree-model-model-failed
@angristan why are you using GTK on macOS in the first place? 🙂
@bugaevc school project
No idea why you're getting the error, your example works for me. You could try debugging gtk_tree_model_foreach() to see what it really gets and why GTK_IS_TREE_MODEL() check fails.
@bugaevc why does this print 1
@angristan well here you're clearly not initializing it, and of course NULL isn't a GtkTreeModel
@bugaevc looking at the debugger, my GtkListStore is also NULL...
@angristan that explains it, but in the piece of code that you've posted on Stack Overflow you are initializing it properly and not resetting it afterwards
@bugaevc that's so weird
@angristan you can debug that with a watchpoint to see when your variable gets set to NULL
@bugaevc actually I store my GtkListStore in a struct along with other things.
For some reason, when I click on a button that calls a specific function, some of the struct's DATA becomes NULL. But when I click on other buttons, the data is back. And they're called from the same place with the same params
(sorry the code is not very clean)
Why should you sign up on mstdn.io?
This instance is not focused on any theme or subject, feel free to talk about whatever you want. Although the main language is english, we accept every single language and country.
We're connected to the whole ActivityPub fediverse and we do not block any foreign instance nor user.
We do have rules, but the goal is to have responsible users.
The instance uses a powerful server to ensure speed and stability, and it has good uptime. We follow state-of-the-art security practices.
Also, we have over 300 custom emojis to unleash your meming potential!
Looking for a Kpop themed instance? Try kpop.social