[Development] Help debugging "impossible condition"

Thiago Macieira thiago.macieira at intel.com
Sat May 5 22:18:20 CEST 2012

One of my tasks was to clean up QEvent. I have done mostly so, but I wanted to 
go one step further and put a warning to anyone (ab)using the QEvent d-
pointer. That's change

Unfortunately, I've hit a snag and I need help. Somehow, something is setting 
the d pointer in one or both QEvents created on the stack in 
QApplicationPrivate::dispatchEnterLeave, causing my change to crash in 

I can't reproduce it. On my system, the crash doesn't happen. In fact, the 
function in question isn't called at all. And the test fails -- which might be 

So I need help. Can anyone:
a) help me make the test pass and, in the process, crash for me?
b) debug the issue? I suggest putting a breakpoint in 
QApplicationPrivate::dispatchEnterLeave, then a watchpoint in those QEvent's 
d-pointers and see where they get changed. A full fix would be nice, but I'll 
settle for the location of where the d pointer is set.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120505/632f4f64/attachment.sig>

More information about the Development mailing list