If there’s a bug in GLib, it should use g_assert()
If there’s a bug in the application, it should use g_critical()
Either way, it’s a bug and shouldn’t happen, and we should try to figure out why. What app is crashing? Can you get a stack trace?
Looking at the bug report you linked to, I agree that g_critical() might potentially be more appropriate here, but we’d need to understand what’s happening before changing anything. Also, we’d need to find a way to make the critical message understandable to application developers rather than referencing confusing GLib implementation details.