PDA

View Full Version : Assert failure with tablet installed



Spectralist
21st April 2011, 07:56
I'm getting this error message when running a debug version of my program:

File: global\qglobal.cpp
Line: 2262

ASSERT failure in Qt::Internal: "There is no packet queue for the tablet. The tablet will not work", file kernel\qwidget_win.cpp, line 222

If I ignore the error the program runs fine and if I compile a release build the error doesn't happen.

The error just popped up after I installed a wacom tablet, without even recompiling the program. My program doesn't use a tablet, or any functions related to a tablet. Nor do I want it to. I'm not sure why Qt is trying to find a packet queue for the tablet. How do I stop it from doing this?

high_flyer
21st April 2011, 11:35
Q_ASSERT are given out only in debug version, when QT_NO_DEBUG is not defined (which I guess you didn't, why should you?).
Which is also the reason the release build is silent.
So you can just define QT_NO_DEBUG - but then all debug messages will not be given.

If it really bothers you you can rebuild Qt with the -no-tablet option.

If this is an application you plan to distribute to users, then I guess you will be packaging only the release version, so no problems.

However I must admit, I am not so sure why now that Qt can find the wacom driver, that it has a problem, and without a driver it was silent.

MarekR22
21st April 2011, 14:31
all assertion are just information for developer that some assumption is not met in code so code should be verified and fixed.
That is why in release assertions are disabled.
IMHO you should investigate what is the problem.
See this source file: qwidget_wince.cpp
(http://qt.gitorious.org/qt/staging/blobs/6e25e8b7857de7f688c673ba700384f85b4113d4/src/gui/kernel/qwidget_wince.cpp#line118)
// Set the size of the Packet Queue to the correct size...
int currSize = ptrWTQueueSizeGet(qt_tablet_context);
if (!ptrWTQueueSizeSet(qt_tablet_context, QT_TABLET_NPACKETQSIZE)) {
// Ideally one might want to use a smaller
// multiple, but for now, since we managed to destroy
// the existing Q with the previous call, set it back
// to the other size, which should work. If not,
// there will be trouble.
if (!ptrWTQueueSizeSet(qt_tablet_context, currSize)) {
Q_ASSERT_X(0, "Qt::Internal", "There is no packet queue for"
" the tablet. The tablet will not work");
}
}