2

When starting my QtJambi program, I get a lot of messages of this type on the console (stderr):

QtDynamicMetaObjectPrivate::QtDynamicMetaObjectPrivate(0x7f75805bfe90) initialize q->d=0x7f75806786e0 m_original_signatures[1]="actionNew()"
QtDynamicMetaObjectPrivate::QtDynamicMetaObjectPrivate(0x7f75805bfe90) initialize q->d=0x7f75806786e0 m_original_signatures[2]="showAnalysisForm()"
QtDynamicMetaObjectPrivate::QtDynamicMetaObjectPrivate(0x7f75805bfe90) initialize q->d=0x7f75806786e0 m_original_signatures[3]="actionOpen()"
QtDynamicMetaObjectPrivate::QtDynamicMetaObjectPrivate(0x7f75805bfe90) initialize q->d=0x7f75806786e0 m_original_signatures[4]="actionSave()"
QtDynamicMetaObjectPrivate::QtDynamicMetaObjectPrivate(0x7f75805bfe90) initialize q->d=0x7f75806786e0 m_original_signatures[5]="actionSaveAs()"

The function names (actionNew, etc) are Qt slots in my program. Why, though, do I see these messages, and how do I get rid of them (so that they don't hide important messages)?

I have installed a QMessageHandler (I think the equivalent of qInstallMsgHandler) which now gives me a few warning messages, but the above messages do not pass through my message handler.

dhardy
  • 11,175
  • 7
  • 38
  • 46
  • I remember seeing nothing like this. Are you using Jambi trunk, or what version? Could you paste some kind of simple example? – Smar Oct 02 '13 at 16:11

1 Answers1

2

This appears to be remnant code from debugging. Within .../qt-jambi-qtjambi-community/src/cpp/qtjambi/qtdynamicmetaobject.cpp you'll find:

for (int i=0; i<m_method_count + m_signal_count; ++i) {
    jobject lr_string = env->GetObjectArrayElement(original_signatures, i);
    m_original_signatures[i] = qtjambi_to_qstring(env, (jstring) lr_string);
fprintf(stderr, "QtDynamicMetaObjectPrivate::QtDynamicMetaObjectPrivate(%p) initialize q->d=%p m_original_signatures[%d]=\"%s\"\n", this, &q->d, i, qPrintable(m_original_signatures[i]));
#ifdef QTJAMBI_DEBUG_LOCALREF_CLEANUP
    env->DeleteLocalRef(lr_string);
#endif
}

Perhaps a new download will solve the problem. Or, you could try deleting the fprintf() yourself and rebuild.

dinman2022
  • 129
  • 1
  • 7
  • Thanks for the answer, and sorry for the long response time. I tried downloading the 4.8.5-beta1 but get a crash (maybe ABI incompatibility with system libraries; can't tell much without debugging symbols). Self-building would help with this but not deployment. Maybe bundling all dynamically-linking libraries in qtjambi releases would be the way to go? – dhardy Jan 27 '14 at 09:40
  • For the record: after self-building a debug build of 4.8.5 and the latest qtcommunity code I still get those messages. – dhardy Feb 03 '14 at 09:47