[Gambas-user] Issue 438 in gambas: gb.xml.rpc sometimes doesn't parse data correctly due to incompleteness of received data

gambas at ...2524... gambas at ...2524...
Sat Jun 8 12:00:32 CEST 2013


Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 438 by r... at ...1740...: gb.xml.rpc sometimes doesn't parse  
data correctly due to incompleteness of received data
http://code.google.com/p/gambas/issues/detail?id=438

1) Describe the problem.

XMLRPC server and client communication is faulty because of a timing issue  
on certain systems.

2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):

Version: TRUNK
[System]
OperatingSystem=Linux
Kernel=3.8.0-23-generic
Architecture=x86_64
Distribution=Ubuntu 13.04
Desktop=GNOME
Theme=QGtk
Language=en_US.UTF-8
Memory=7954M

[Libraries]
Curl=libcurl.so.4.3.0
GStreamer=libgstreamer-0.10.so.0.30.0
GTK+=libgtk-x11-2.0.so.0.2400.17
Qt4=libQtCore.so.4.8.4
SDL=libSDL-1.2.so.0.11.4
Poppler=libpoppler.so.28.0.0

3) Provide a little project that reproduces the bug or the crash.
Difficult to reproduce, since it depends on speed of system and network.

4) If your project needs a database, try to provide it, or part of it.
N/A.

5) Explain clearly how to reproduce the bug or the crash.

It can be fixed by this workaround:
Insert a Sleep 0.1 at the beginning of Socket_Read() in miniServer.module:
-----
Public Sub Socket_Read()

   Dim Buf As String
   Dim sCad As String
   Dim Bucle As Integer
   Dim hS As Socket

   Sleep 0.1

   For Bucle = 0 To hSocket.Count - 1
     If hSocket[Bucle] = Last Then
       hS = Last
       Break
     End If
   Next
------
Maybe a better way is to check in Socket_Read for completeness of the  
received data and then proceed processing it.

Can someone apply the patch?
At least it fixes problems on a lot of systems.

Read here for more background information:
http://domotiga.nl/boards/1/topics/1700

6) By doing that carefully, you have done 50% of the bug fix job!

IMPORTANT NOTE: if you encounter several different problems or bugs, (for
example, a bug in your project, and an interpreter crash while debugging
it), please create distinct issues!

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings




More information about the User mailing list