Skip to content

Menu exception #390

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

Closed
NosferatuJoe opened this issue Mar 26, 2021 · 5 comments · Fixed by #399
Closed

Menu exception #390

NosferatuJoe opened this issue Mar 26, 2021 · 5 comments · Fixed by #399

Comments

@NosferatuJoe
Copy link

I encountered an exception with the menus, not sure if it's a big issue but thought to report it nevertheless.

2021-03-26 19:48:01 - sp	-	EXCEPTION	
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/packages/source-python/commands/auth.py", line 44, in __call__
    return self.callback(*args)
  File "../addons/source-python/packages/source-python/menus/queue.py", line 267, in _menuselect_callback
    _radio_queues[index]._select(choice)
  File "../addons/source-python/packages/source-python/menus/queue.py", line 126, in _select
    next_menu = active_menu._select(self._index, choice)
  File "../addons/source-python/packages/source-python/menus/radio.py", line 113, in _select
    self._player_pages[player_index].options[choice_index])

KeyError: 1

I might've been using the adaptive radar plugin from the forums though, not sure if it was turned on or off.

@jordanbriere
Copy link
Contributor

Could you please provide a reproducible code? That traceback is rather ambiguous, as there is no way to tell if the missing key is the player index or the selected option..

@vinci6k
Copy link
Contributor

vinci6k commented May 21, 2021

He mentioned he might've been using the adaptive radar plugin, so I have a feeling this might be causing issues with menus created by SourceMod plugins:

@ClientCommand('menuselect')
def menu_select(command, index):
    """Called when the player selects an option in the menu."""
    # Did the player close their menu?
    if SimpleMenu.get_user_queue(index).active_menu is None:
        PlayerAR(index).show_radar()

I'll see if I can reproduce it in a few minutes.

@vinci6k
Copy link
Contributor

vinci6k commented May 21, 2021

Ran into a small issue:

[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\packages\source-python\messages\hooks.py", line 188, in _pre_send_user_message
    buffer = make_object(ProtobufMessage, args[3])

RuntimeError: Access violation - no RTTI data!

That happens whenever a menu is created/sent by SourceMod.

@jordanbriere
Copy link
Contributor

Ran into a small issue:

[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\packages\source-python\messages\hooks.py", line 188, in _pre_send_user_message
    buffer = make_object(ProtobufMessage, args[3])

RuntimeError: Access violation - no RTTI data!

That happens whenever a menu is created/sent by SourceMod.

That's likely part of the issue, actually. I currently don't have the time, or an up-to-date environment for that game to dig deeper, but the solution would be similar to what was suggested into #140. Feel free to play around with it and make a PR if you get it to work.

@vinci6k
Copy link
Contributor

vinci6k commented May 21, 2021

Will do as soon as I get back!

vinci6k added a commit to vinci6k/Source.Python that referenced this issue May 22, 2021
vinci6k added a commit to vinci6k/Source.Python that referenced this issue May 24, 2021
@jordanbriere jordanbriere linked a pull request May 24, 2021 that will close this issue
jordanbriere pushed a commit that referenced this issue Jun 1, 2021
* Partial fix for issue #390.

* Proper fix for issue #390.
jordanbriere added a commit that referenced this issue Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants