« Return to Thread: C# binary issue

Re: C# binary issue

by Stifu :: Rate this Message:

Reply to Author | View in Thread

I just tried, and doing Convert.ToInt32(string.Empty); or Convert.ToInt32(""); throws an exception with .NET. Convert.ToInt32(null); works with both .NET and Mono, though.
So that's not what's happening in the program (ie: the string is not empty), or it'd fail with .NET too...

We could spend ages trying to blindly debug this. Can't you privately give me the sources so I can have a look?

Cere wrote:
It's an emply string as far as i can see:


Thread @35 stopped at #0: 0xb6f8b3c0 in gameClass.Game.initRooms()+0x4f0 at /home/cere/temp/poker/Server/gameEngine.cs:230.
 230                     addRoom(i - 1, ids[i - 1], numes[i - 1], Convert.ToInt32(maxPlayers[i - 1]), Convert.ToInt32(sb[i - 1]), Convert.ToInt32(bb[i - 1]), Convert.ToInt32(minBuy[i - 1]), Convert.ToInt32(maxBuy[i - 1]));
Display 1 ("18"): 18
(mdb) print sb[0]
(string) ""
(mdb) print sb[1]
ERROR: Index of array expression `sb' out of bounds.
(mdb) print i
(int) 1
(mdb) print bb[0]
(string) ""
(mdb) print bb[1]
ERROR: Index of array expression `bb' out of bounds.
(mdb) print minBuy[1]
ERROR: Index of array expression `minBuy' out of bounds.
(mdb) print minBuy[0]
(string) ""

 « Return to Thread: C# binary issue