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

Session crashes when trying to assign LED callback #7

Closed
JSensebe opened this issue Sep 1, 2024 · 1 comment
Closed

Session crashes when trying to assign LED callback #7

JSensebe opened this issue Sep 1, 2024 · 1 comment

Comments

@JSensebe
Copy link
Contributor

JSensebe commented Sep 1, 2024

When using the Genesis Plus GX core:

Exception ignored on calling ctypes callback function: <bound method DictEnvironmentDriver.environment of <libretro.drivers.environment.composite.CompositeEnvironmentDriver object at 0x0000023AAFE4DA60>>
Traceback (most recent call last):
  File "C:\Users\jsens\AppData\Roaming\Python\Python312\site-packages\libretro\drivers\environment\dict.py", line 44, in environment
    return self._envcalls[envcall](data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jsens\AppData\Roaming\Python\Python312\site-packages\libretro\drivers\environment\default.py", line 188, in <lambda>
    EnvironmentCall.GET_LED_INTERFACE: lambda data: self._get_led_interface(
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jsens\AppData\Roaming\Python\Python312\site-packages\libretro\drivers\environment\composite.py", line 1003, in _get_led_interface
    self._led_cb = retro_led_interface(self.__set_led_state)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected CFunctionType instance, got method

This later leads to an access violation in run():

Traceback (most recent call last):
  File "C:\Users\jsens\Desktop\retro_test2.py", line 39, in <module>
    session.run() # Equivalent to one retro_run() call
  File "C:\Users\jsens\AppData\Roaming\Python\Python312\site-packages\libretro\session.py", line 326, in run
    self._core.run()
  File "C:\Users\jsens\AppData\Roaming\Python\Python312\site-packages\libretro\core.py", line 462, in run
    self._core.retro_run()
OSError: exception: access violation writing 0x00007FFC00000000

Calling with_led(None) when building the session gets around the issue.

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

No branches or pull requests

2 participants
@JSensebe and others