Results 1 to 6 of 6

Thread: Client/Server Error: BadIDChoice

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Location
    Caracas - Venezuela
    Posts
    15
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Client/Server Error: BadIDChoice

    Hi!!!

    I have a problem with my client/server application (C, C++ and Qt). When I compile it, this is the error:

    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x36001fe
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x36001ff
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600200
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600201
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600202
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600203
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600204
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600205
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600206
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600207
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600208
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600209
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x360020a
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x360020b
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600212
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600214
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600215
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600216
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600217
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600218
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600219
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x360021a
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x360021b
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x360021c
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x360021d
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x360021e
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x360021f
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600220
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600221
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600224
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600225
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600226
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600227
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600228
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600229
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x360022a
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x360022b
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x360022c
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x360022e
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x360022f
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600230
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600231
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600232
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600233
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600235
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600236
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Extension: 153 (RENDER)
    Minor opcode: 4 (RenderCreatePicture)
    Resource id: 0x3600237
    Xlib: unexpected async reply (sequence 0x266b)!
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 1 (X_CreateWindow)
    Resource id: 0x3600222
    Xlib: sequence lost (0x116ea > 0x16ea) in reply type 0x0!
    X Error: BadImplementation (server does not implement operation) 17
    Major opcode: 20 (X_GetProperty)
    Resource id: 0x0
    X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
    Major opcode: 53 (X_CreatePixmap)
    Resource id: 0x3600238


    This is the code that generates the error:

    Qt Code:
    1. //principal.cpp
    2. #include client.h
    3. ...
    4. ...
    5. void principal:: startProcess(){
    6. int pid= fork();
    7.  
    8.  
    9. if (pid<0){
    10. printf("fork fail");
    11. exit(1);
    12. }
    13.  
    14. if(pid==0){ // Child
    15. int portConnect;
    16. char name[32];
    17. int portWait = 30000;
    18.  
    19. waitForChat(portWait, name, &portConnect); //When waitForChat finish, means that other client request for Chat, so the application must show the new window chat.
    20. windowChat = new Chat;
    21. windowChat -> show();
    22. }
    23. }
    24.  
    25. //client.c
    26. ...
    27. ...
    28. void waitForChat(int PtWait,char *c, int *PtConnect){
    29.  
    30. int skt;
    31. int bnd;
    32. int lsn;
    33.  
    34. int client;
    35. struct sockaddr_in dirclient;
    36. struct sockaddr_in dirserv;
    37. char buffer[1024];
    38.  
    39.  
    40.  
    41. if ((skt = socket(PF_INET, SOCK_STREAM, 0)) < 0) {
    42. perror("Clientv:waitForchat: socket");
    43. exit(1);
    44. }
    45.  
    46. dirserv.sin_family = AF_INET;
    47. dirserv.sin_port =htons(PtWait);
    48. dirserv.sin_addr.s_addr =INADDR_ANY;
    49.  
    50.  
    51. if ((bnd= bind(skt, (struct sockaddr *)&dirserv, sizeof(dirserv) )) < 0) {
    52. perror("Clientv:waitForchat:: bind");
    53. exit(1);
    54. }
    55.  
    56.  
    57. if ( (lsn=listen(skt, 100)) < 0) {
    58. perror("Clientv:waitForchat:: listen");
    59. exit(1);
    60. }
    61.  
    62. if ((client = accept(skt,NULL,0)) < 0){
    63. perror("Clientv:waitForchat: accept");
    64. exit(1);
    65. }
    66.  
    67.  
    68.  
    69. if (recv(client,buffer,1024,0) < 0){
    70. perror("Clientv:waitForchat: recv");
    71. exit(1);
    72.  
    73. }
    74.  
    75. sscanf(buffer,"%d %s",PtConnect,c);
    76.  
    77.  
    78. close(client);
    79.  
    80. }
    To copy to clipboard, switch view to plain text mode 
    What's the meaning of Error: BadIDChoice .....???
    How can I fix it???

    Thanks!!!
    Last edited by wysota; 27th November 2007 at 01:48. Reason: missing [code] tags

Similar Threads

  1. Client/Server doesn't work
    By mattia in forum Newbie
    Replies: 2
    Last Post: 1st November 2007, 13:31
  2. Dual TCP/IP Client/Server
    By jimroos in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2007, 21:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.