You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cannot get anymore int of enumclass (alpha2) #1810
In v2.5.2 I'm able to get a C# enum and get the int value. In alpha 2 it seems that the full enum class is returned but the int command is not working. In 3.0.0dev it makes crashing the Debugger.
I can't reproduce this, you have given almost no code here. Does the code run outside of the debugger? Please provide a Minimal, Complete and Verifiable example.
Hi @filmor I don't know how to create an example for you since I obtain it from My C# API that returns an enum on the following call:
self.edbcomponent.GetComponentType()
I have the full enum in it including .value__ property (not .value). When I do the int of that enum it crashes and and stops to work. It fails also in running mode.
This is the content of the enum
the command should return 1 (the content of value__)
@filmor I've taken from UT the enum to test but I noticed that you don't run a test on an enum value.
So you can debug and add that as additional test for future reference
Activity
filmor commentedon Jun 8, 2022
I can't reproduce this, you have given almost no code here. Does the code run outside of the debugger? Please provide a Minimal, Complete and Verifiable example.
maxcapodi78 commentedon Jun 8, 2022
Hi @filmor I don't know how to create an example for you since I obtain it from My C# API that returns an enum on the following call:
self.edbcomponent.GetComponentType()
I have the full enum in it including .value__ property (not .value). When I do the int of that enum it crashes and and stops to work. It fails also in running mode.

This is the content of the enum
the command should return 1 (the content of value__)
filmor commentedon Jun 8, 2022
I am sorry, I can't and won't do remote debugging. Please provide a complete example that reproduces the issue that I can run on my machine.
maxcapodi78 commentedon Jun 8, 2022
Taken from your Unit Test:
from System import DayOfWeek
int(DayOfWeek.Sunday)
filmor commentedon Jun 8, 2022
Odd that this works in the unit test itself, I'll have a look.
maxcapodi78 commentedon Jun 8, 2022
@filmor I've taken from UT the enum to test but I noticed that you don't run a test on an enum value.
So you can debug and add that as additional test for future reference
lostmsu commentedon Jun 8, 2022
The exception looks like GIL is being released somewhere.
filmor commentedon Jun 13, 2022
@maxcapodi78 This should be fixed on the current master, if not, please reopen :)
maxcapodi78 commentedon Jun 13, 2022
@filmor I've tested the latest main and it works pretty well. Thanks