Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.62 KB | None | 0 0
  1. Stacktrace:
  2.  
  3.   at <unknown> <0xffffffff>
  4.   at (wrapper managed-to-native) CitizenFX.Core.GameInterface.WalkStackBoundary (string,byte[],byte[],byte[]&) [0x0000a] in <bf55ee21e10b4d7f840db10567715352>:0
  5.   at CitizenFX.Core.InternalManager.WalkStack (byte[],byte[]) [0x00000] in /src/code/client/clrcore/InternalManager.cs:253
  6.   at (wrapper remoting-invoke-with-check) CitizenFX.Core.InternalManager.WalkStack (byte[],byte[]) [0x00034] in <bf55ee21e10b4d7f840db10567715352>:0
  7.   at (wrapper xdomain-dispatch) CitizenFX.Core.InternalManager.WalkStack (object,byte[]&,byte[]&,byte[],byte[]) [0x00054] in <bf55ee21e10b4d7f840db10567715352>:0
  8.   at (wrapper xdomain-invoke) CitizenFX.Core.InternalManager.WalkStack (byte[],byte[]) <0x00151>
  9.   at (wrapper remoting-invoke-with-check) CitizenFX.Core.InternalManager.WalkStack (byte[],byte[]) [0x00028] in <bf55ee21e10b4d7f840db10567715352>:0
  10.   at CitizenFX.Core.MonoScriptRuntime.WalkStack (byte[],int,byte[],int,CitizenFX.Core.IScriptStackWalkVisitor) <0x0005b>
  11.   at (wrapper cominterop) CitizenFX.Core.IScriptStackWalkingRuntime.WalkStack (intptr,byte[],int,byte[],int,CitizenFX.Core.IScriptStackWalkVisitor) <0x0005a>
  12.   at (wrapper native-to-managed) CitizenFX.Core.IScriptStackWalkingRuntime.WalkStack (intptr,intptr,int,intptr,int,intptr) <0x00343>
  13.   at <unknown> <0xffffffff>
  14.   at (wrapper xdomain-dispatch) CitizenFX.Core.MonoScriptRuntime/WrapScriptHost.InvokeNative (object,byte[]&,byte[]&) <0x0025f>
  15.   at (wrapper xdomain-invoke) CitizenFX.Core.MonoScriptRuntime/WrapScriptHost.InvokeNative (intptr) [0x0006b] in <bf55ee21e10b4d7f840db10567715352>:0
  16.   at CitizenFX.Core.ScriptContext.InvokeInternal (CitizenFX.Core.fxScriptContext*,ulong,CitizenFX.Core.IScriptHost) [0x00007] in /src/code/client/clrcore/ScriptContext.cs:343
  17.   at CitizenFX.Core.ScriptContext.InvokeInternal (ulong,CitizenFX.Core.IScriptHost) [0x00014] in /src/code/client/clrcore/ScriptContext.cs:330
  18.   at CitizenFX.Core.ScriptContext.Invoke (ulong,CitizenFX.Core.IScriptHost) [0x00000] in /src/code/client/clrcore/ScriptContext.cs:321
  19.   at CitizenFX.Core.Native.Function.InvokeInternal (CitizenFX.Core.Native.Hash,System.Type,CitizenFX.Core.Native.InputArgument[]) [0x00022] in /src/code/client/clrcore/Native.cs:28
  20.   at CitizenFX.Core.Native.Function.Call (CitizenFX.Core.Native.Hash,CitizenFX.Core.Native.InputArgument[]) [0x00000] in /src/code/client/clrcore/Native.cs:16
  21.   at CitizenFX.Core.BaseScript.TriggerEventInternal (string,byte[],bool) [0x00029] in /src/code/client/clrcore/BaseScript.cs:175
  22.   at CitizenFX.Core.BaseScript.TriggerEvent (string,object[]) [0x00007] in /src/code/client/clrcore/BaseScript.cs:116
  23.   at vRP.MySQL.e_tick () [0x001f3] in <8dfc0861f4df44189d833de5e878b97b>:0
  24.   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <4fffd39960df419684f9b9cb5ce46688>:0
  25.   at <unknown> <0xffffffff>
  26.   at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) [0x00016] in <4fffd39960df419684f9b9cb5ce46688>:0
  27.   at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00041] in <4fffd39960df419684f9b9cb5ce46688>:0
  28.   at System.Reflection.MethodBase.Invoke (object,object[]) [0x00006] in <4fffd39960df419684f9b9cb5ce46688>:0
  29.   at System.Delegate.DynamicInvokeImpl (object[]) [0x000e9] in <4fffd39960df419684f9b9cb5ce46688>:0
  30.   at System.MulticastDelegate.DynamicInvokeImpl (object[]) [0x0000a] in <4fffd39960df419684f9b9cb5ce46688>:0
  31.   at System.Delegate.DynamicInvoke (object[]) [0x00002] in <4fffd39960df419684f9b9cb5ce46688>:0
  32.   at CitizenFX.Core.EventHandlerEntry/<Invoke>d__5.MoveNext () [0x00064] in /src/code/client/clrcore/EventHandlerDictionary.cs:89
  33.   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<CitizenFX.Core.EventHandlerEntry/<Invoke>d__5> (CitizenFX.Core.EventHandlerEntry/<Invoke>d__5&) [0x00033] in <4fffd39960df419684f9b9cb5ce46688>:0
  34.   at CitizenFX.Core.EventHandlerEntry.Invoke (string,object[]) [0x00037] in <bf55ee21e10b4d7f840db10567715352>:0
  35.   at CitizenFX.Core.EventHandlerDictionary/<Invoke>d__4.MoveNext () [0x00028] in /src/code/client/clrcore/EventHandlerDictionary.cs:51
  36.   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<CitizenFX.Core.EventHandlerDictionary/<Invoke>d__4> (CitizenFX.Core.EventHandlerDictionary/<Invoke>d__4&) [0x00033] in <4fffd39960df419684f9b9cb5ce46688>:0
  37.   at CitizenFX.Core.EventHandlerDictionary.Invoke (string,string,object[]) [0x0003f] in <bf55ee21e10b4d7f840db10567715352>:0
  38.   at CitizenFX.Core.InternalManager/<>c__DisplayClass33_2.<TriggerEvent>b__0 () [0x00000] in /src/code/client/clrcore/InternalManager.cs:336
  39.   at System.Threading.Tasks.Task`1<TResult_REF>.InnerInvoke () [0x00011] in <4fffd39960df419684f9b9cb5ce46688>:0
  40.   at System.Threading.Tasks.Task.Execute () [0x00001] in <4fffd39960df419684f9b9cb5ce46688>:0
  41.   at System.Threading.Tasks.Task.ExecutionContextCallback (object) [0x00006] in <4fffd39960df419684f9b9cb5ce46688>:0
  42.   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00073] in <4fffd39960df419684f9b9cb5ce46688>:0
  43.   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00004] in <4fffd39960df419684f9b9cb5ce46688>:0
  44.   at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task&) [0x00038] in <4fffd39960df419684f9b9cb5ce46688>:0
  45.   at System.Threading.Tasks.Task.ExecuteEntry (bool) [0x00050] in <4fffd39960df419684f9b9cb5ce46688>:0
  46.   at System.Threading.Tasks.TaskScheduler.TryExecuteTask (System.Threading.Tasks.Task) [0x00016] in <4fffd39960df419684f9b9cb5ce46688>:0
  47.   at CitizenFX.Core.CitizenTaskScheduler.InvokeTryExecuteTask (System.Threading.Tasks.Task) [0x00000] in /src/code/client/clrcore/CitizenTaskScheduler.cs:160
  48.   at CitizenFX.Core.CitizenTaskScheduler.Tick () [0x0006c] in /src/code/client/clrcore/CitizenTaskScheduler.cs:128
  49.   at CitizenFX.Core.InternalManager.TriggerEvent (string,byte[],string) [0x0015f] in /src/code/client/clrcore/InternalManager.cs:348
  50.   at (wrapper remoting-invoke-with-check) CitizenFX.Core.InternalManager.TriggerEvent (string,byte[],string) [0x00035] in <bf55ee21e10b4d7f840db10567715352>:0
  51.   at (wrapper xdomain-dispatch) CitizenFX.Core.InternalManager.TriggerEvent (object,byte[]&,byte[]&,string,byte[],string) [0x00061] in <bf55ee21e10b4d7f840db10567715352>:0
  52.   at (wrapper xdomain-invoke) CitizenFX.Core.InternalManager.TriggerEvent (string,byte[],string) <0x0015e>
  53.   at (wrapper remoting-invoke-with-check) CitizenFX.Core.InternalManager.TriggerEvent (string,byte[],string) [0x00029] in <bf55ee21e10b4d7f840db10567715352>:0
  54.   at CitizenFX.Core.MonoScriptRuntime.TriggerEvent (string,byte[],int,string) <0x0005b>
  55.   at (wrapper cominterop) CitizenFX.Core.IScriptEventRuntime.TriggerEvent (intptr,string,byte[],int,string) <0x00052>
  56.   at (wrapper native-to-managed) CitizenFX.Core.IScriptEventRuntime.TriggerEvent (intptr,intptr,intptr,int,intptr) <0x0014b>
  57. /proc/self/maps:
  58. 400c4000-40214000 rwxp 00000000 00:00 0
  59. 402b1000-40401000 rwxp 00000000 00:00 0
  60. 40d3c000-40f44000 rwxp 00000000 00:00 0
  61. 40f44000-40f54000 rwxp 00000000 00:00 0
  62. 4117b000-4134e000 rwxp 00000000 00:00 0
  63. 413b9000-41409000 rwxp 00000000 00:00 0
  64. 41900000-419f0000 rwxp 00000000 00:00 0
  65. 33261680000-332616af000 rw-p 00000000 00:00 0
  66. d06ae380000-d06ae400000 rw-p 00000000 00:00 0
  67. d4fd1e80000-d4fd1f00000 rw-p 00000000 00:00 0
  68. 1ca5c1280000-1ca5c1283000 rw-p 00000000 00:00 0
  69. 2073f3180000-2073f3183000 rw-p 00000000 00:00 0
  70. 2073f3183000-2073f3200000 r--p 00000000 00:00 0
  71. 27cb892ec000-27cb892f4000 rw-p 00000000 00:00 0
  72. 3ac676900000-3ac676980000 rw-p 00000000 00:00 0
  73. 3c33043c7000-3c3304400000 ---p 00000000 00:00 0
  74. 3c3304400000-3c3304403000 rw-p 00000000 00:00 0
  75. 3c3304403000-3c3304404000 ---p 00000000 00:00 0
  76. 3c3304404000-3c330447f000 r-xp 00000000 00:00 0
  77. 3c330447f000-3c330c3c7000 ---p 00000000 00:00 0
  78. 7fd5e653b000-7fd5e6c00000 rw-p 00000000 00:00 0
  79. 7fd5e6cf4000-7fd5e6cf6000 ---p 00000000 00:00 0
  80. 7fd5e6cf6000-7fd5e6cf7000 rw-p 00000000 00:00 0
  81. 7fd5e6cf7000-7fd5e6cff000 ---p 00000000 00:00 0
  82. 7fd5e6cff000-7fd5e6ef8000 rw-p 00000000 00:00 0
  83. SCRIPT ERROR: @vrp/lib/utils.lua:43: attempt to call a nil value (upvalue 'callback')
  84. > task (@vrp/lib/utils.lua:47)
  85. > cb (@vrp/modules/identity.lua:42)
  86. > handler (- begin MySQL module
  87. local MySQL = {}
  88.  
  89. MySQL.debug = false
  90. local dpaths = {}
  91.  
  92. local tasks = {}
  93.  
  94. --[[
  95. local function tick()
  96.   SetTimeout(1, function() -- protect errors from breaking the loop
  97.     SetTimeout(1000, tick)
  98.  
  99.     local rmtasks = {}
  100.     for id,cb in pairs(tasks) do
  101.       local r = exports.vrp_mysql:checkTask(id)
  102.       if r.status == 1 then
  103.         cb(r.rows,r.affected) -- rows, affected
  104.         table.insert(rmtasks, id)
  105.       elseif r.status == -1 then
  106.         print("[vRP] task "..id.." failed.")
  107.         table.insert(rmtasks, id)
  108.       end
  109.     end
  110.  
  111.     -- remove done tasks
  112.     for k,v in pairs(rmtasks) do
  113.       tasks[v] = nil
  114.     end
  115.   end)
  116. end
  117. tick()
  118. --]]
  119.  
  120. AddEventHandler("vRP:MySQL_task", function(task_id, data)
  121. --  print("vRP:MySQL_task "..task_id)
  122.   local cb = tasks[task_id]
  123.   if data.status == 1 then
  124.     if cb then
  125.       if data.mode == 0 then
  126.         cb(data.affected or 0)
  127.       elseif data.mode == 1 then
  128.         cb(data.scalar or 0)
  129.       elseif data.mode == 2 then
  130.         cb(data.rows or {}, data.affected or 0) -- rows, affected
  131.       end
  132.     end
  133.   elseif data.status == -1 then
  134.     print("[vRP] task "..task_id.." failed.")
  135.   end
  136.  
  137.   tasks[task_id] = nil
  138.  
  139.   if MySQL.debug and dpaths[task_id] then
  140.     print("[vRP] MySQL end query "..dpaths[task_id].." ("..task_id..")")
  141.     dpaths[task_id] = nil
  142.   end
  143. end)
  144.  
  145. local task_id = -1
  146. AddEventHandler("vRP:MySQL_taskid", function(_task_id)
  147. --  print("vRP:MySQL_taskid ".._task_id)
  148.   task_id = _task_id
  149. end)
  150.  
  151. -- host can be "host" or "host:port"
  152. function MySQL.createConnection(name,host,user,password,db,debug)
  153. --  print("[vRP] try to create connection "..name)
  154.   -- parse port in host as "ip:port"
  155.   local host_parts = splitString(host,":")
  156.   if #host_parts >= 2 then
  157.     host = host_parts[1]..";port="..host_parts[2]
  158.   end
  159.  
  160.   local config = "server="..host..";uid="..user..";pwd="..password..";database="..db..";"
  161.  
  162. --  TriggerEvent("vRP:MySQL:createConnection", name, config)
  163.   exports.vrp_mysql:createConnection(name, config)
  164. end
  165.  
  166. function MySQL.createCommand(path, query)
  167. --  print("[vRP] try to create command "..path)
  168. --  TriggerEvent("vRP:MySQL:createCommand", path, query)
  169.   exports.vrp_mysql:createCommand(path, query)
  170. end
  171.  
  172. -- generic query
  173. function MySQL._query(path, args, mode, cb)
  174.   -- TriggerEvent("vRP:MySQL:query", path, args)
  175.   if not (type(args) == "table") then
  176.     args = {}
  177.   end
  178.  
  179.   -- force args to be a C# dictionary
  180.   args._none = " "
  181.  
  182. --  exports.vrp_mysql:query(path, args)
  183. --  print("[vRP] try to query "..path.." id "..task_id)
  184.   TriggerEvent("vRP:MySQL_query", path, args, mode)
  185.   if MySQL.debug then
  186.     print("[vRP] MySQL begin query (m"..mode..") "..path.." ("..task_id..")")
  187.     dpaths[task_id] = path
  188.   end
  189.  
  190.   tasks[task_id] = cb
  191. end
  192.  
  193. -- do a query (multiple rows)
  194. --- cb(rows, affected)
  195. function MySQL.query(path, args, cb)
  196.   MySQL._query(path, args, 2, cb)
  197. end
  198.  
  199. -- do a scalar query (one row, one column)
  200. --- cb(scalar)
  201. function MySQL.scalar(path, args, cb)
  202.   MySQL._query(path, args, 1, cb)
  203. end
  204.  
  205. -- do a execute query (no results)
  206. --- cb(affected)
  207. function MySQL.execute(path, args, cb)
  208.   MySQL._query(path, args, 0, cb)
  209. end
  210.  
  211. -- return module
  212. return MySQL
  213. :45)
  214. > fn (@vrp_mysql/init.lua:3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement