Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erros de logs causa do fechamento do cliente. #964

Open
2 of 5 tasks
andreoam opened this issue Nov 12, 2024 · 3 comments
Open
2 of 5 tasks

Erros de logs causa do fechamento do cliente. #964

andreoam opened this issue Nov 12, 2024 · 3 comments
Labels
Priority: High Represent a high impact in key areas of the base/user experience Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@andreoam
Copy link

andreoam commented Nov 12, 2024

Priority

High

Area

  • Data
  • Source
  • Docker
  • Other

What happened?

Log

== application started at Nov 12 2024 06:19:46 == operating system: Windows OTClient - Redemption 3.x rev 0.000 (desenv) built on Nov 10 2024 for arch x64 ERROR: Unable to send extended opcode 1, extended opcodes are not enabled ERROR: Unable to send extended opcode 201, extended opcodes are not enabled ERROR: Lua exception: /game_interface/widgets/statsbar.lua:293: attempt to index a nil value stack traceback: [C]: in function '__index' /game_interface/widgets/statsbar.lua:293: in function 'toggleIcon' /game_interface/widgets/statsbar.lua:321: in function </game_interface/widgets/statsbar.lua:303> ERROR: protected lua call failed: LUA ERROR: /game_interface/widgets/statsbar.lua:293: attempt to index a nil value stack traceback: [C]: in function '__index' /game_interface/widgets/statsbar.lua:293: in function 'toggleIcon' /game_interface/widgets/statsbar.lua:321: in function </game_interface/widgets/statsbar.lua:303> WARNING: [BOT] !! Blessings not bought !! CaveBot[BuyPotions]: Too many tries, can't buy CaveBot[BuyPotions]: Too many tries, can't buy CaveBot[BuyPotions]: NPC not found CaveBot[BuyPotions]: NPC not found ERROR: ProtocolGame::parseCreatureSpeed: could not get creature with id 1342194885 at: [C++]: ?parseCreatureSpeed@ProtocolGame@@AEAAXAEBV?$shared_ptr@VInputMessage@@@std@@@Z ERROR: ProtocolGame::parseCreatureSpeed: could not get creature with id 1342194864 at: [C++]: ?parseCreatureSpeed@ProtocolGame@@AEAAXAEBV?$shared_ptr@VInputMessage@@@std@@@Z ERROR: ProtocolGame::parseCreatureSpeed: could not get creature with id 1342194885 at: [C++]: ?parseCreatureSpeed@ProtocolGame@@AEAAXAEBV?$shared_ptr@VInputMessage@@@std@@@Z ERROR: ProtocolGame::parseCreatureHealth: could not get creature with id 1342407241 at: [C++]: ?parseCreatureHealth@ProtocolGame@@AEAAXAEBV?$shared_ptr@VInputMessage@@@std@@@Z ERROR: ProtocolGame::parseCreatureHealth: could not get creature with id 1342407245 at: [C++]: ?parseCreatureHealth@ProtocolGame@@AEAAXAEBV?$shared_ptr@VInputMessage@@@std@@@Z ERROR: ProtocolGame::parseCreatureHealth: could not get creature with id 1342407238 at: [C++]: ?parseCreatureHealth@ProtocolGame@@AEAAXAEBV?$shared_ptr@VInputMessage@@@std@@@Z

What OS are you seeing the problem on?

Windows

Code of Conduct

  • I agree to follow this project's Code of Conduct
@andreoam andreoam added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Nov 12, 2024
@github-actions github-actions bot added Priority: High Represent a high impact in key areas of the base/user experience Status: Pending Test This PR or Issue requires more testing labels Nov 12, 2024
@bblazik
Copy link

bblazik commented Jan 14, 2025

@andreoam
I see this is in test phase, is it a problem with const auto & in tile.cpp and protocolgameparse.cpp
It looks like shared_ptr references can't be increased but dunno.. In other clients they have simple auto or directly using CreaturePtr.

void ProtocolGame::parsePlayerHelpers(const InputMessagePtr& msg) const
{
    const uint32_t creatureId = msg->getU32();
    const uint16_t helpers = msg->getU16();

    const auto& creature = g_map.getCreatureById(creatureId);
    if (!creature) {
        g_logger.traceError(stdext::format("ProtocolGame::parsePlayerHelpers: could not get creature with id %d", creatureId));
        return;
    }

    g_game.processPlayerHelpers(helpers);
}

@edit. Removing all wrongly used const auto& solves a problem with the client crashing. But still, some msges which are sent over are causing log errors. Proper incorrect msg client handling would be nice, but i didn't went into details how it is solved in other clients.

@kokekanon
Copy link
Collaborator

in the original message , I only see parseCreatureHealth, parseCreatureSpeed

v8 parseCreatureHealth

Image

v8 parseCreatureSpeed
Image

the other messages are bot spam and other already solved stasbar messages.

@InnerCircleTFS
Copy link
Contributor

be a good idea to change to g_logger.debug or (delete like v8=, so it doesn't spam in terminal ?

to all

   creature = g_map.getCreatureById(creatureId);
    if (!creature) {
        // delete (like v8 )or g_logger.debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Represent a high impact in key areas of the base/user experience Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

4 participants