Vala's name mangling stubly differs from that of Gtk
As I've painfully learned today after a few hours of debugging, class name ABCodeDead
(synthetic example, but I hit this on real code) will be translated by Vala into
ab_code_dead
Which seems reasonable enough. However, this does not match what GTK expects, which is one of the following:
a_bcode_dead
abcode_dead
Additionally, Vala also gets this test incorrectly. I suggest adopting these test cases to reduce chances of this happening ever again.
All in all, this causes failure when Gtk tries to look up an affected symbol in the binary, preventing GUI from loading unless you manually do typeof()
on the affected class first.
P.S.: frustratingly, using [CCode (cname = "abcode_dead")]
makes valac fail, complaining about not being able to find symbol in the UI file and vice versa.