View Issue Details

IDProjectCategoryView StatusLast Update
0007642Multi Theft Auto : San AndreasServerpublic2013-06-08 11:04
ReporterWAssigned Toccw 
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
PlatformOSLinuxOS Version
Product Version 
Target Version1.4Fixed in Version1.4 
Summary0007642: getModelHandling(incorrect model id) crashes the server
Description

getModelHandling(incorrect model id) crashes the server, instead of returning false.

Probably also crashes when executed on client-side, but I have not tested this.

Steps To Reproduce
  1. start runcode
  2. srun getModelHandling(100)
Additional Information

MTA:SA Server v1.3.1-r5099-release crash report.
Caught 33 addresses ...

Backtrace:
#0 - ./core.so(_ZN13CCrashHandler21HandleExceptionGlobalEi+0x69) [0xf7442fc9]
#1 - [0xf7759400]
#2 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(_ZN16CLuaHandlingDefs16GetModelHandlingEP9lua_State+0xc5) [0xf6de0ac5]
#3 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x3260d1) [0xf6e450d1]
#4 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x3315e0) [0xf6e505e0]
#5 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x3265b8) [0xf6e455b8]
#6 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x3212e1) [0xf6e402e1]
#7 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x325b13) [0xf6e44b13]
#8 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x325b78) [0xf6e44b78]
#9 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(lua_pcall+0x68) [0xf6e400f8]
#10 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x33425d) [0xf6e5325d]
#11 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x3260d1) [0xf6e450d1]
#12 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x331530) [0xf6e50530]
#13 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x3265b8) [0xf6e455b8]
#14 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x3212e1) [0xf6e402e1]
#15 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x325b13) [0xf6e44b13]
#16 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(+0x325b78) [0xf6e44b78]
#17 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(lua_pcall+0x68) [0xf6e400f8]
#18 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(_ZN8CLuaMain5PCallEP9lua_Stateiii+0x57) [0xf6dc3ad7]
#19 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(ZNK13CLuaArguments4CallEP8CLuaMainRK15CLuaFunctionRefPS+0xb4) [0xf6d7bc94]
#20 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(_ZN19CRegisteredCommands18CallCommandHandlerEP8CLuaMainRK15CLuaFunctionRefPKcS6_P7CClient+0x180) [0xf6cfd7d0]
#21 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(_ZN19CRegisteredCommands14ProcessCommandEPKcS1_P7CClient+0xf4) [0xf6cfddd4]
#22 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(ZN8CConsole11HandleInputEPKcP7CClientS3+0x2a9) [0xf6c3c489]
#23 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(_ZN5CGame11HandleInputEPc+0x55) [0xf6c6d295]
#24 - /home/fa/fullarena/trunk/mta/mods/deathmatch/deathmatch.so(_ZN7CServer11HandleInputEPc+0x2b) [0xf6be0a3b]
#25 - ./core.so(_ZN15CModManagerImpl11HandleInputEPKc+0x1f) [0xf744371f]
#26 - ./core.so(_ZN11CServerImpl11HandleInputEv+0x4cc) [0xf74443fc]
#27 - ./core.so(_ZN11CServerImpl8MainLoopEv+0x96) [0xf74446e6]
#28 - ./core.so(_ZN11CServerImpl3RunEiPPc+0x9e8) [0xf7445b48]
#29 - ./core.so(Run+0x46) [0xf745be06]
#30 - ./mta-server(gxx_personality_v0+0x4df) [0x8048d43]
#31 - /lib/i386-linux-gnu/i686/cmov/libc.so.6(
libc_start_main+0xe6) [0xf74aae46]
#32 - ./mta-server(__gxx_personality_v0+0x4d) [0x80488b1]

TagsNo tags attached.

Activities

sbx320

2013-06-04 13:06

administrator   ~~0018637

Confirmed, does not affect 1.4 as the crash was fixed as part of r5217.

I'd suggest backporting CLuaHandlingDefs.cpp to 1.3.2 to fix this issue.

The client is not affected as there is no clientside getModelHandling.

ccw

2013-06-07 02:12

administrator   ~~0018672

Thanks for clue on where to look.

Fixed in http://code.google.com/p/mtasa-blue/source/detail?r=5503

Issue History

Date Modified Username Field Change