stislav73 / quadra

Automatically exported from code.google.com/p/quadra
0 stars 0 forks source link

Error updating highscore list #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have a certain score (problem started when I got > 200 000) in the local
highscore list.
2. Click "Update" in the highscore screen.
3. It's displaying "Connected. Transfer in progress. 0 bytes", but nothing
more happens.

What is the expected output? What do you see instead?
Bytes should be counting up as the list is transfered, but they don't. 
Also, to get back to the main menu I have to press "cancel" (which was
previously the update button), otherwise no other button works.

What version of the product are you using? On what operating system?
I'm using the latest svn version (rev 447) on linux.  Main menu shows
1.2.0.  But it also happened on 1.1.8.  Tried it on two computers, one is
gentoo (problem occurs in portage and svn version), the other is ubuntu (svn).

Please provide any additional information below.
If I remove the "local*.*" files from my $HOME/.quadra directory it works
again.  If I then play a few games to fill the local highscores it still
works as long as I have only have low scores, so it's not depending on the
number of local scores saved but rather on the score itself.  

E.g. it worked when I had up to around 130 000, but stopped after the next
game where I got around 200 000.

Original issue reported on code.google.com by mnieberg...@gmail.com on 8 Mar 2008 at 7:12

GoogleCodeExporter commented 8 years ago
Could you send us a local*.qrec file that causes the problem to appear? That 
would
probably be helpful, thanks!

Original comment by pphaneuf on 18 Mar 2008 at 6:22

GoogleCodeExporter commented 8 years ago
I just played a few games after cleaning out "~/.quadra" again and the attached 
file
(score of around 150k) was the first that produced the problem (the other games 
had
lower scores).  Tried it with the normal and the sdl version, and both only show
"connected" without actually downloading.

Btw, I copied the file to my MacBook and everything still works there (SDL 
version on
MacOS X 10.5).  So maybe it's a Linux only issue.

Original comment by mnieberg...@gmail.com on 18 Mar 2008 at 7:45

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by pphaneuf on 1 Apr 2008 at 2:27

GoogleCodeExporter commented 8 years ago

Original comment by pphaneuf on 20 Apr 2008 at 6:27

GoogleCodeExporter commented 8 years ago
Can't reproduce this on either trunk or sdl branches (on windows). I will make 
a few 
small improvements to the highscore updating code in trunk (as discussed 
yesterday) 
and then assign this back to pphaneuf.

Original comment by slaj...@gmail.com on 20 Apr 2008 at 7:56

GoogleCodeExporter commented 8 years ago
Made small changes in r482. The main issue seems to be linux-specific.

Original comment by slaj...@gmail.com on 20 Apr 2008 at 8:37

GoogleCodeExporter commented 8 years ago
The following sequence of system calls is quite enlightening... They were taken 
with
"strace -e 'select,send,recv'".

select(6, NULL, [5], NULL, {0, 0})      = 1 (out [5], left {0, 0})
send(5, "POST /cgi-bin/qserv-test.pl HTTP"..., 15244, 0) = 11584
select(6, [5], NULL, NULL, {0, 0})      = 0 (Timeout)

See how there was a short-write, and then, we're not checking for writability, 
so we
can write more, but instead just assume that all is well and go on to the 
reading
part? This must be some bad luck related to kernel buffer sizes, that kind of 
stuff,
but I think that a big enough demo would eventually expose the bug on any 
platform.

Now, to think up of a fix that won't require re-architecting the whole 
networking
code... Argh.

Original comment by pphaneuf on 21 Apr 2008 at 1:13

GoogleCodeExporter commented 8 years ago
Should be fixed by r493.

Original comment by pphaneuf on 21 Apr 2008 at 2:39

GoogleCodeExporter commented 8 years ago
Needs a bit more work, see code review posted to quadra-dev. Feel free to 
assign to 
me if you want me to make those tweaks.

Original comment by slaj...@gmail.com on 21 Apr 2008 at 4:24

GoogleCodeExporter commented 8 years ago
See also issue #11, a possible duplicate.

Original comment by slaj...@gmail.com on 21 Apr 2008 at 4:36

GoogleCodeExporter commented 8 years ago
Implementing a few more changes as discussed on quadra-dev.

Original comment by slaj...@gmail.com on 21 Apr 2008 at 9:20

GoogleCodeExporter commented 8 years ago
Fixed in r497.

Original comment by slaj...@gmail.com on 21 Apr 2008 at 10:54