Actually, sometimes it works fine.
Here is the stderr:
"sni-qt/23769" WARN 15:27:11.881 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE
No system tray available
Creating UI
Adding device to cache: "/org/freedesktop/UDisks/devices/sda1"
No systemtrayicon available
As you see, I'm using the notraycheck branch, otherwise it should exit right after the line2. I also tried to grep, and it doesn't seems that the last error is produced directly by your code.