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

Regression: v1.4.1 causes an exception, v1.4.0 works #436

Open
3 of 5 tasks
creiter64 opened this issue Oct 17, 2023 · 0 comments
Open
3 of 5 tasks

Regression: v1.4.1 causes an exception, v1.4.0 works #436

creiter64 opened this issue Oct 17, 2023 · 0 comments

Comments

@creiter64
Copy link

Describe the Issue
v1.4.1 and above cause an exception when connection to my camera.

To Reproduce
Execute the sample code

Sample Code

from harvesters.core import Harvester
from pathlib import Path

h = Harvester()

GENTL_FILE = Path.cwd().parent / "./libs/s2i_GenTL_win64/GEVTLS2I.cti"
assert GENTL_FILE.is_file()

h.add_file(str(GENTL_FILE))
h.update()

ia = h.create()

Reproducable:

  • Yes
  • No

Expected Behavior
No crash as in v1.4.0

Exception Backtrace

src\gige\genicam_connection.py:86: in connect
    self.image_src = self._harvester.create(self.device_selector)
venv\Lib\site-packages\harvesters\core.py:3076: in create
    return self._create_acquirer(device_proxy=device_proxy, config=config)
venv\Lib\site-packages\harvesters\core.py:3106: in _create_acquirer
    ia = ImageAcquirer(device_proxy=device_proxy_, config=config,
venv\Lib\site-packages\harvesters\core.py:1661: in __init__
    manager(module.register_event(event_type))
venv\Lib\site-packages\harvesters\core.py:227: in m
    return getattr(self._source_object, attribute)(*args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <genicam.gentl.System; proxy of <Swig Object of type 'std::shared_ptr< GenTLCpp::TransportLayer > *' at 0x0000024398CF47E0> >
event_id = <EVENT_TYPE_LIST.EVENT_MODULE: 5>

    def register_event(self, event_id):
        r"""
    
        Returns an :class:`~gentl.EventToken` object which monitors an event, specified by :data:`event_id`, on the object.
    
        Args:
            event_id (EVENT_TYPE_LIST): Set an event that you want to monitor.
    
        :rtype: EventToken
    
        """
>       return _gentl.System_register_event(self, event_id)
E       _gentl.InvalidHandleException: GenTL exception: Given handle does not support the operation. (Message from the source: The specified handle is not found.) (ID: -1006)

venv\Lib\site-packages\genicam\gentl.py:2303: InvalidHandleException

Configuration

  • OS: Windows 11
  • Python: 3.11
  • GenTL Producer: Sensor2Image
  • Camera: Unreleased Product

Reproducibility

This phenomenon can be stably reproduced:

  • Yes
  • No.

If applicable, please provide your observation about the reproducibility.

Actions You Have Taken

Additional context
I suspect the crash might be due to events added in v1.4.1. It might be that my camera implements them incorrectly, but I'd expect harversters to not crash if I'm not using that feature.

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

1 participant