Code Monkey home page Code Monkey logo

Comments (9)

Zeex avatar Zeex commented on August 29, 2024

Thanks! I slightly edited your original commit to make the condition a bit more specific (as in sc4.c:738) and removed the extra spaces around the == (I generally try to follow Pawn's coding convention), I hope you don't mind.

from compiler.

oscar-broman avatar oscar-broman commented on August 29, 2024

Ah, yes, I tried to conform to the style guide but old habits die hard!

from compiler.

Zeex avatar Zeex commented on August 29, 2024

BTW are you aware that the introspect demo crashes when running it without crashdetect?

from compiler.

oscar-broman avatar oscar-broman commented on August 29, 2024

Oh, I was unaware of that. Thanks. Any ideas why that is?

from compiler.

Zeex avatar Zeex commented on August 29, 2024

Last time I checked it looked like an invalid native call as the server tried to call a function at at 0x11a.

from compiler.

Zeex avatar Zeex commented on August 29, 2024

Enabling sysreq.d in crashdetect revealed that it indeed crashed trying to call some native, probably SendRconCommand as 0x11a corresponds to its index in the native table.

Edit:

RunSimpleStatement("SendRconCommand(\"echo hello from rcon!\")");

Indeed, if I remove this line it stops crashing.

from compiler.

Zeex avatar Zeex commented on August 29, 2024

It turned out to be a bug in CallNative(), I fixed this in Zeex/amx_assembly@47c52e5

from compiler.

oscar-broman avatar oscar-broman commented on August 29, 2024

Aha, nice!

from compiler.

oscar-broman avatar oscar-broman commented on August 29, 2024

Now it crashes only when crashdetect is present!

> print("hello")
[debug] Server crashed while executing gm.amx
[debug] AMX backtrace:
[debug] #0 0000a2e4 in GetFunctionIdx (name[]=@0x002600b0 "ello") at include/amx/dynamic_call.inc:383
[debug] #1 000018a0 in GetFunctionInfo (name[]=@0x002600b0 "ello", info[E_FUNCTION:69]=@0x0030387c) at include/samp-introspect/introspect-debug-info.inc:272
[debug] #2 0000fa24 in SysreqDN (address=135070032, args_to_push=1, bool:auto_pop=true) at include/samp-introspect/parser.inc:989
[debug] #3 00018c84 in Exec_Evaluate (token[E_TOKEN:4]=@0x003039f4, tree[][E_TOKEN:4]=@0x0026092c, entry=3) at include/samp-introspect/exec.inc:653
[debug] #4 000139b0 in RunExpression (line[]=@0x00300268 "print("hello")", size=14, as=-1) at include/samp-introspect/exec.inc:32
[debug] #5 00018fa8 in public OnRconCommand (cmd[]=@0x00300248 "runcode print("hello")") at include/ppg.inc:18
[debug] Native backtrace:
[debug] #0 f744d31b in _ZN10StackTraceC1EPv () from plugins/../../../ppg/plugins/crashdetect.so
[debug] #1 f74477c2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/../../../ppg/plugins/crashdetect.so
[debug] #2 f74483ac in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/../../../ppg/plugins/crashdetect.so
[debug] #3 f7448856 in _ZN11CrashDetect11OnExceptionEPv () from plugins/../../../ppg/plugins/crashdetect.so
[debug] #4 f744cf6c in ?? () from plugins/../../../ppg/plugins/crashdetect.so
[debug] #5 f771a410 in ?? ()
[debug] #6 f744f943 in amx_Exec () from plugins/../../../ppg/plugins/crashdetect.so
[debug] #7 f7447708 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/../../../ppg/plugins/crashdetect.so
[debug] #8 f744b1c9 in ?? () from plugins/../../../ppg/plugins/crashdetect.so
[debug] #9 080ad9a3 in ?? () from /home/samp/ppg/bin/server/samp03svr
[debug] #10 080a82df in ?? () from /home/samp/ppg/bin/server/samp03svr
[debug] #11 080c749a in ?? () from /home/samp/ppg/bin/server/samp03svr
[debug] #12 0808e6eb in ?? () from /home/samp/ppg/bin/server/samp03svr
[debug] #13 08074596 in ?? () from /home/samp/ppg/bin/server/samp03svr
[debug] #14 080761ae in ?? () from /home/samp/ppg/bin/server/samp03svr
[debug] #15 f76f1c39 in ?? () from /lib32/libpthread.so.0
[debug] #16 f75329ce in clone () from /lib32/libc.so.6

I thought maybe you'd have an idea as to why that is - otherwise I'll investigate more and create an issue where approporiate.

from compiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.