avertuss 48 Posted February 2, 2020 Share Posted February 2, 2020 (edited) Hi. I found problem in my source. When i want to attack(i just click spacebar) channel is crashing. BT c++ https://pastebin.com/XQ8hEYpV Any ideas? I'm using clang9. If i'm using old source with gcc it work's fine. Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted February 2, 2020 Premium Share Posted February 2, 2020 (edited) this=0x0 rip XD Btw seem you made a wrong gdb with a newer file. Edited February 2, 2020 by WeedHex . Link to comment Share on other sites More sharing options...
avertuss 48 Posted February 2, 2020 Author Share Posted February 2, 2020 37 minutes ago, WeedHex said: this=0x0 rip XD Btw seem you made a wrong gdb with a newer file. I know that there is nullptr but why if i didn't change that function. Btw I updated gdb and nothing change so Reading symbols from game... [New LWP 101185] [New LWP 100449] [New LWP 100457] [New LWP 100471] Core was generated by `./ch11'. Program terminated with signal SIGSEGV, Segmentation fault. #0 CHARACTER::IsPolymorphed (this=0x3a) at ./char.h:810 810 ./char.h: No such file or directory. [Current thread is 1 (LWP 101185)] (gdb) bt full #0 CHARACTER::IsPolymorphed (this=0x3a) at ./char.h:810 No locals. #1 CHARACTER::GetMotionMode (this=0x3a) at char.cpp:2773 dwMode = <error reading variable dwMode (Cannot access memory at address 0x0)> pkItem = <optimized out> #2 CHARACTER::GetMoveMotionSpeed (this=0x3a) at char.cpp:2812 dwMode = <optimized out> pkMotion = <optimized out> #3 0x000000a0 in ?? () No symbol table info available. #4 0x0000003a in ?? () No symbol table info available. #5 0x0000002b in ?? () No symbol table info available. #6 0x429066f8 in ?? () No symbol table info available. #7 0x43e0fff9 in ?? () No symbol table info available. #8 0x127f1e7f in ?? () No symbol table info available. #9 0x00000000 in ?? () No symbol table info available. (gdb) Link to comment Share on other sites More sharing options...
IceShiva 150 Posted February 2, 2020 Share Posted February 2, 2020 Which gcc version did you use? Link to comment Share on other sites More sharing options...
avertuss 48 Posted February 2, 2020 Author Share Posted February 2, 2020 38 minutes ago, IceShiva said: Which gcc version did you use? I'm using CLANG-9 Link to comment Share on other sites More sharing options...
IceShiva 150 Posted February 2, 2020 Share Posted February 2, 2020 (edited) Which gcc version did you use on working core btw Quote To avoid run-time errors that are difficult to detect and diagnose, we recommend that you never statically link to binaries that were compiled by using different versions of the compiler. Also, when you upgrade an EXE or DLL project, make sure to upgrade the libraries that it links to. If you're using CRT (C Runtime) or STL (Standard Template Library) types, don't pass them between binaries (including DLLs) that were compiled by using different versions of the compiler. You can of course replace keyworks like EXE to ELF DLL to shared object regardless Additionally you dont have correctly setuped flags for producting debug builds in you makefile. Edited February 2, 2020 by IceShiva Link to comment Share on other sites More sharing options...
avertuss 48 Posted February 2, 2020 Author Share Posted February 2, 2020 (edited) 22 minutes ago, IceShiva said: Which gcc version did you use on working core btw You can of course replace keyworks like EXE to ELF DLL to shared object regardless Additionally you dont have correctly setuped flags for producting debug builds in you makefile. GCC 4.8.3. I'm using GetMoveMotionSpeed in that function bool CHARACTER::SetSyncPosition(long x, long y) { long mx = GetX(); long my = GetY(); float fDist = DISTANCE_SQRT(mx - x, my - y); float motionSpeed = GetMoveMotionSpeed(); DWORD mduration = CalculateDuration(GetLimitPoint(POINT_MOV_SPEED), (int)((fDist / motionSpeed) * 1000.0f)); DWORD mstart = get_dword_time(); sync_hack = mstart + mduration; } Maybe there is something wrong? Edited February 2, 2020 by avertuss Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now