Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, May 2007
A lot Xlib errors


Message 1 in thread

Hi,
I got these X errors in my apps,it's not always appears,and seems not
appears in gdb( I have
try to gdb it for a few times to find which operation causes this,but
unfortunately ( or fortunately?) it doesnt happens.
Well,what typical errors would make these X errors?
regards


X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
  Major opcode:  53
  Minor opcode:  0
  Resource id:  0x310008
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode:  66
  Minor opcode:  0
  Resource id:  0x1e0034b
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode:  70
  Minor opcode:  0
  Resource id:  0x1e0034b
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode:  70
  Minor opcode:  0
  Resource id:  0x1e0034b
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode:  151
  Minor opcode:  4
  Resource id:  0x1e0034b
X Error: BadPixmap (invalid Pixmap parameter) 4
  Major opcode:  56
  Minor opcode:  0
  Resource id:  0x1e0034b
X Error: RenderBadPicture (invalid Picture parameter) 173
  Major opcode:  151
  Minor opcode:  7
  Resource id:  0x1e0034c
X Error: BadPixmap (invalid Pixmap parameter) 4
  Major opcode:  54
  Minor opcode:  0
  Resource id:  0x1e0034b
Xlib: unexpected async reply (sequence 0x40ec)!
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode:  66
  Minor opcode:  0
  Resource id:  0x1e0034b


-- 
 [ signature omitted ] 

Message 2 in thread

On Tuesday 15 May 2007 11:58:26 jiang jefix wrote:
> Hi,
> I got these X errors in my apps,it's not always appears,and seems not
> appears in gdb( I have
> try to gdb it for a few times to find which operation causes this,but
> unfortunately ( or fortunately?) it doesnt happens.
> Well,what typical errors would make these X errors?

Sounds like you could be hitting this problem:

http://www.trolltech.com/developer/task-tracker/index_html?id=146956&method=entry

Do any of the workarounds mentioned in the task work for you?

-- 
 [ signature omitted ] 

Message 3 in thread

Hi,

> I got these X errors in my apps,it's not always appears,and seems not
> appears in gdb( I have
> try to gdb it for a few times to find which operation causes this,but
> unfortunately ( or fortunately?) it doesnt happens.
> Well,what typical errors would make these X errors?

Are you using threads in your application?

You may be using GUI elements (QWidget, QPixmap, etc. in a secondary thread. 
You cannot do that. Always use GUI elements from the main (GUI) thread.

--
 [ signature omitted ] 

Message 4 in thread

Yes,I using thread to do backend_time_consuming_func(),and from that func
will time after time emit signal to main(Gui),this signal contains a int value
And main(GUI) update some string according this value;
The frequency is not fixed,Min less than 10 times per 1 sec,Max
1000times per 1 sec


2007/5/16, Dimitri <dimitri@xxxxxxxxxxxxx>:
> Hi,
>
> > I got these X errors in my apps,it's not always appears,and seems not
> > appears in gdb( I have
> > try to gdb it for a few times to find which operation causes this,but
> > unfortunately ( or fortunately?) it doesnt happens.
> > Well,what typical errors would make these X errors?
>
> Are you using threads in your application?
>
> You may be using GUI elements (QWidget, QPixmap, etc. in a secondary thread.
> You cannot do that. Always use GUI elements from the main (GUI) thread.
>
> --
> Dimitri
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>


-- 
 [ signature omitted ] 

Message 5 in thread

On 16.05.07 08:55:08, jiang jefix wrote:
> Yes,I using thread to do backend_time_consuming_func(),and from that func
> will time after time emit signal to main(Gui),this signal contains a int value
> And main(GUI) update some string according this value;
> The frequency is not fixed,Min less than 10 times per 1 sec,Max
> 1000times per 1 sec

IIRC you're using Qt4 right? If so make sure that you do the connect
using the Qt::QueuedConnection type, possibly stating it explicitly as
5th parameter to connect.

Andreas

-- 
 [ signature omitted ] 

Message 6 in thread

i use qt3.3.6


2007/5/16, Andreas Pakulat <apaku@xxxxxx>:
> On 16.05.07 08:55:08, jiang jefix wrote:
> > Yes,I using thread to do backend_time_consuming_func(),and from that func
> > will time after time emit signal to main(Gui),this signal contains a int value
> > And main(GUI) update some string according this value;
> > The frequency is not fixed,Min less than 10 times per 1 sec,Max
> > 1000times per 1 sec
>
> IIRC you're using Qt4 right? If so make sure that you do the connect
> using the Qt::QueuedConnection type, possibly stating it explicitly as
> 5th parameter to connect.
>
> Andreas
>
> --
> Try the Moo Shu Pork.  It is especially good today.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>


-- 
 [ signature omitted ] 

Message 7 in thread

jiang jefix schrieb:
> i use qt3.3.6

In Qt 3 no asynchronous signals are supported - you need to send a 
custom event into the Qt event queue (use QApplication::postEvent() 
which is thread-safe) from your worker thread.

The main (GUI) thread picks up this custom signal and can then safely 
update the GUI.

Again, you must *not* change GUI elements from any other thread than the 
main (GUI) thread.

Cheers, Oliver

--
 [ signature omitted ] 

Message 8 in thread

Till Oliver Knoll schrieb:
> jiang jefix schrieb:
>> i use qt3.3.6
> 
> In Qt 3 no asynchronous signals are supported - you need to send a 
> ...
> The main (GUI) thread picks up this custom signal [...]
                                              ^^^^^^

I meant custom event off course ;)

Cheers, Oliver

--
 [ signature omitted ]