QVariantMap, GetProperties:Condition failed: action GLib-GObject-WARNING GLib-GObject-CRITICAL
Hi all, I am new to programming. I am creating a Qt GUI application. It is a small word jumble game.
Problem is whenever I start this program from command prompt after building it I get following output on command prompt:
QVariantMap DBusMenuExporterDBus::GetProperties(int, const QStringList&): Condition failed: action@
and program starts and works fine. Upper two lines are ok, I printed them but what is QVariantMap DBusMenuExporterDBus::GetProperties(int, const QStringList&): Condition failed: action
After starting application it works fine But when I close it I get following output on command prompt:
@(<unknown>:7312): GLib-GObject-WARNING **: invalid uninstantiatable type
(null)' in cast toGObject'
(<unknown>:7312): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed@
What all these errors mean and how can I remove them.
I am using Ubuntu 10.10
Thanks in advance.
Come on, no one.
Have no one encountered this problem or do not know answer to this problem or my question is incomplete. Reply some thing.
Please be a bit more patient. Six and a half hour is way too short to ask again. And keep in mind that it is weekend and DevNet users are spread all over the world. Some of the crowd may be in bed...
Some more info does not harm anyways. The output mentions DBus, it would be helpful if you told us what you're actually doing. Googling with the exact error message gives some results, did you check these already?
People answer fast if they know the answer and if they are online.
A bit more information would be helpful:
Which platform do you use? (I suppose Linux? as you use DBus?)
Which Qt version (4.7.2?)
What are you doning there? did you already debug to check, which functions are called when the output occurs?
Can you make a small example, that shows the problem so others can look at it and insprect the code without looking at huindres of files with 1000s of lines of code?
I am using Ubuntu 10.10 but I think it does not matter since qt is platform independent.
I am using qt 4.7.0.
The first output occurs when I start application and second occurs when I close the application.
And it is not much big program it have just 4 .cpp and 3 .h files. You can look at my complete source code here: http://harshveer.in/sites/default/files/lexi-jumble.tar
I am googling about this error from about 10-15 days and I did not find any satisfactory and problem solving answer then I finally asked this question in this forum. And I am sorry for being impatient, this is my first time asking question on forum and I see people answering within half an hour. so…………………..
And about this DBus I do not know from where this is coming. I am just using simple QWidgets.
I am using CMake to build my source. All u can see problem your self. And just remember that I am just a starter to programming so there can be many unusual coding, So please tell me so I can learn and improve that (You can also reply me about my coding and improvement at email@example.com please I will appreciate it. I am going to distribute it as Open Source application).
Thanks for your reply.
I tend to ignore those glib warnings by now... Running any glib based application on my ubuntu system produces lots of critical messages in the console, so I decided that must be normal. Just try yourself: Run any gtk/glib based app in your console...
Yes, Qt is cross platform, but the surrounding code is not necessarily. DBus is one of those things: It is available but basically unusable anywhere but on Linux.
I don't understand, my application is not gtk/glib based, then from where this warning is coming.
Qt does use the glib event loop on linux, so glib is a dependency. Then you seem to be using dbus, which is another glib based thing. Check the library dependencies if you do not believe me:-)
The message makes it pretty clear that GLib is triggering it, too.
Note: Ignoring warnings in general is not a good idea and you should try to find out what is going wrong. It is just that I have seen so many critical warnings from GLib based applications (not my own!) that I can not take them serious anymore.
The program works fine on OS X too.
On an older Kubuntu box (8.04) with an old Qt version (4.4.1) there are no warnigs. So, I suggest you go with Tobias' advice and just ignore the glib/dbus warnings.