<html><head></head><body><div style="color:#000; background-color:#fff; font-family:lucida console, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1503910461861_17708"><span>Hi,</span></div><div id="yui_3_16_0_ym19_1_1503910461861_17770"><span><br></span></div><div id="yui_3_16_0_ym19_1_1503910461861_17771"><span id="yui_3_16_0_ym19_1_1503910461861_17825">Will file a bug when it is possible. I currently get a 500 when hitting the "Submit Bug" button.</span></div><div id="yui_3_16_0_ym19_1_1503910461861_17848"><span id="yui_3_16_0_ym19_1_1503910461861_17825"><br></span></div><div id="yui_3_16_0_ym19_1_1503910461861_17849" dir="ltr"><span id="yui_3_16_0_ym19_1_1503910461861_17825">In the meantime, I have been researching the code.</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503910461861_19668"><span id="yui_3_16_0_ym19_1_1503910461861_17825"><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503910461861_19711"><span id="yui_3_16_0_ym19_1_1503910461861_17825">The OverflowError emanates from PyLong_AsLong(PyObject *obj) method (https://github.com/python/cpython/blob/3.6/Objects/longobject.c#L471)</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503910461861_21625"><span id="yui_3_16_0_ym19_1_1503910461861_17825"><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503910461861_21682"><span id="yui_3_16_0_ym19_1_1503910461861_17825">But I am having a hard time finding the call path that leads to this method being called...<br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503910461861_21882"><span id="yui_3_16_0_ym19_1_1503910461861_17825"><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503910461861_21877"><span id="yui_3_16_0_ym19_1_1503910461861_17825">I should be able to build all components involved (gstreamer, gst-python, gobject-instrospection, pyobject) from source so I can try things out given some pointers or guidance.</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503910461861_21878"><span id="yui_3_16_0_ym19_1_1503910461861_17825"><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503910461861_21879"><span id="yui_3_16_0_ym19_1_1503910461861_17825">Philippe.</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: lucida console, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Le Lundi 28 août 2017 11h34, Sebastian Dröge <sebastian@centricular.com> a écrit :<br></font></div>  <br><br> <div class="y_msg_container"><div dir="ltr">On Sat, 2017-08-26 at 21:18 +0000, philippe renon wrote:<div class="yqt1509535702" id="yqtfd11018"><br clear="none">> Hi,<br clear="none">> <br clear="none">> The following python3 code:<br clear="none">> <br clear="none">>     import gi<br clear="none">>     gi.require_version("Gst", "1.0")<br clear="none">>     from gi.repository import Gst<br clear="none">>     print(Gst.MessageType.get_name(Gst.MessageType.DEVICE_ADDED)) <br clear="none">> <br clear="none">> fails on windows 32 and 64 with this error:<br clear="none">> <br clear="none">>     OverflowError: Python int too large to convert to C long<br clear="none">> <br clear="none">>     The above exception was the direct cause of the following<br clear="none">> exception:<br clear="none">> <br clear="none">>     Traceback (most recent call last):<br clear="none">>       File "bug.py", line 4, in <module><br clear="none">>         print(Gst.MessageType.get_name(Gst.MessageType.DEVICE_ADDED))<br clear="none">>     SystemError: gi.FunctionInfo(get_name) returned a result with an<br clear="none">> error set<br clear="none">> <br clear="none">> The same is true for any GstMessageType above or equal to<br clear="none">> GST_MESSAGE_EXTENDED.<br clear="none">> <br clear="none">> My understanding of the issue is that, something, somewhere, is<br clear="none">> trying to map the Gst enum/flag to a C long.<br clear="none">> On Windows, according to [1], a long is a signed 32 bit integer<br clear="none">> (range is –2147483648 through 2147483647).<br clear="none">> But GST_MESSAGE_EXTENDED (and above enums) are too big to fit a<br clear="none">> Windows C long.<br clear="none">> GST_MESSAGE_EXTENDED = (1 << 31) = 2147483648 > 2147483647.<br clear="none">> <br clear="none">> I found a somewhat similar issue : <a shape="rect" href="https://bugzilla.gnome.org/show_bu" target="_blank">https://bugzilla.gnome.org/show_bu</a><br clear="none">> g.cgi?id=732633<br clear="none">> But this issue is related to signed vs unsigned (and is fixed in<br clear="none">> 1.12.2).<br clear="none">> <br clear="none">> Is that issue fixable ? If yes, where should I look : pyobject,<br clear="none">> gobject-introspection, ... ?</div><br clear="none"><br clear="none">Please file a bug about this. It's probably not fixable without changes<br clear="none">in the Python bindings (by using an unsigned int here instead of a<br clear="none">signed one) or ABI changes on the GStreamer side.<br clear="none"><br clear="none">-- <br clear="none">Sebastian Dröge, Centricular Ltd · <a shape="rect" href="https://www.centricular.com/" target="_blank">https://www.centricular.com</a></div>_______________________________________________<br clear="none">gstreamer-devel mailing list<br clear="none"><a shape="rect" ymailto="mailto:gstreamer-devel@lists.freedesktop.org" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br clear="none"><a shape="rect" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><div class="yqt1509535702" id="yqtfd61758"><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>