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

ERROR: got a thing with invalid stackpos #1045

Closed
2 of 5 tasks
BastardofWinterfell opened this issue Jan 15, 2025 · 2 comments · Fixed by #1047
Closed
2 of 5 tasks

ERROR: got a thing with invalid stackpos #1045

BastardofWinterfell opened this issue Jan 15, 2025 · 2 comments · Fixed by #1047
Labels
invalid This doesn't seem right Priority: Medium This issue may be impactful and needs some attention. 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

@BastardofWinterfell
Copy link
Contributor

Priority

Medium

Area

  • Data
  • Source
  • Docker
  • Other

What happened?

Issue

When bot is turned on, if the Check Players option is enabled in the Extras menu of vBot_4.8 (accessed via the vBot Settings and Scripts button for those unfamiliar) and another player appears on the screen, the following errors appears in the terminal:

ERROR: ProtocolGame::parseCreatureHealth: could not get creature with id 268435458
at:
    [C++]: ?parseCreatureHealth@ProtocolGame@@AEAAXAEBV?$shared_ptr@VInputMessage@@@std@@@Z
ERROR: got a thing with invalid stackpos
stack traceback:
    [C]: in function 'look'
    [string "/vBot/extras.lua"]:571: in function 'callback'
    /game_bot/functions/callbacks.lua:24: in function 'callback'
    /game_bot/executor.lua:297: in function 'onCreatureAppear'
    /game_bot/bot.lua:660: in function </game_bot/bot.lua:660>
    [C]: in function 'pcall'
    /game_bot/bot.lua:609: in function 'safeBotCall'
    /game_bot/bot.lua:660: in function </game_bot/bot.lua:658>
at:
    [C++]: ?getStackPos@Thing@@QEAAHXZ
Images

With the Check Players option enabled, when another player appears on the screen, the code in extras.lua, triggered via the onCreatureAppear function, uses g_game.look() and onTextMessage to retrieve the vocation and level of the other player from the server log message, and then :setText() to draw that information over the character.

Expected Behavior

With the Check Players option enabled, when another player appears on the screen, the script should automatically "look" at the player to find out his/her vocation and level and draw it over that character (see image below), with no errors in the terminal.

Environment

Using: Unmodified latest main (commit 262d238)
Client: OpenGL x64 compiled using VS Solution
Operating System: Windows
Server/Protocol: TFS-based 10.41

What OS are you seeing the problem on?

Windows

Code of Conduct

  • I agree to follow this project's Code of Conduct
@BastardofWinterfell BastardofWinterfell added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jan 15, 2025
@github-actions github-actions bot added invalid This doesn't seem right Priority: Medium This issue may be impactful and needs some attention. Status: Pending Test This PR or Issue requires more testing labels Jan 15, 2025
@kokekanon
Copy link
Collaborator

@BastardofWinterfell confirms if it works #1047

@BastardofWinterfell
Copy link
Contributor Author

This does, indeed, fix it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right Priority: Medium This issue may be impactful and needs some attention. 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

Successfully merging a pull request may close this issue.

2 participants