THE-FYP/SAMP.Lua

Game freezes while trying to load an object's material

pdr52 opened this issue · 1 comments

pdr52 commented

After joining a specific server, I noticed that the game would always freeze right before the login screen, after researching a bit more i found that SAMP.lua was trying to load an object's material indefinitely, thus causing the game to freeze infinitely.

Steps to reproduce:

1- Use this script
2- Join this server: [removed]
3- Wait a bit and see your game freeze.

The problem seems to be in this line, putting some prints in the code i get this:

test_1: while start
test_1: while iteration x1 6
test_1: while iteration x2 6
test_1: while iteration x3 6
..
test_1: while iteration x89 6
..
infinitely.

I don't know if the solution would be to use raknetBitStreamIgnoreBits or something as i know nothing about the internals of SAMP, can you help me @THE-FYP? Thanks.

Thanks for the report and sorry for no answer for long.
For some reason there was an excess bits in the packet, which is not enough to read a full 8-bit value, so reading and following conditions falls and loop goes infinite. This behavior is unusual for normal samp server, I suppose it was because of server's anticheat.
Should be fine now, reinstall from the source code.