Very strange bug on win32

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Very strange bug on win32

Post by zuzuf » Sun May 11, 2008 1:09 am

in networking mode, the win32 client freezes after some time. It's easily reproducible, just join a multiplayer game from a win32 client, play and it'll freeze after a few minutes.

it's because of an infinite loop ... that shouldn't be infinite. The ending condition is always false because it does some test with a NaN (float which is Not a Number). I've added a macro to test NaNs, and guess what ... it still freeze !!!

That's really strange since the code of the infinite loop shouldn"t be run because of the NaN test, so the float becomes a NaN after that test ... between the test and the loop there are a total of 0 lines of code :evil: . I've spent 3 hours trying to fix it without success.

I'll try something tomorrow ... time to go to bed zzzzzzzzzzzzzzzz
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun May 11, 2008 6:37 am

Kinda really strange problem :(

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun May 11, 2008 10:49 am

It looks like a memory corruption bug, but what is really strange is that it seems linked to a very small portion of code that should be able to corrupt memory since it only does a "if" and a "+=" or "-=" !!
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun May 11, 2008 11:24 am

Maybe there are some kind of key to several crashes not only in multiplayer game?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun May 11, 2008 12:18 pm

I don't really understand what's happening with this bug. But I wrote a workaround. It checks for NaN, but it seems my workaround wasn't detecting a specific king of NaN (the one that appears here ... :x ), now it should be fixed (I hope, I faced an other crash while testing, a thread safe bug, it's fixed now ...)
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun May 11, 2008 1:19 pm

Ok, I could nearly finish a game between a Linux server and a windows client

There is a strange bug that didn't make the game crash but that prevent from wining of losing:
weapons creation aren't always synced :evil: don''t know why. It's using TCP, network isn't under heavy load, it shouldn't lose any packet !! so it's on the program side, but that's strange, I'll debug this on Linux, it'll be easier to find and fix.
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests