<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 11, 2017 at 1:47 PM Vadim Chugunov <<a href="mailto:vadimcn@gmail.com">vadimcn@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">> Definitely seems CRT / Python related.  The call to fgets indicates that it's doing something involving a FILE*.  It's probably a FILE* that refers to a file created from within Python's copy of the CRT.</div><div class="gmail_msg"><br class="gmail_msg"></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg">Any idea where in the code would that be?  Would be nice to confirm.</div></div></blockquote><div><br></div><div>Maybe in ScriptInterpreterPython somewhere?  There's a couple of places where we use FILE* in that file, but it's not easy to tell by inspection whether the FILE*'s originate from something in Python.  </div><div><br></div><div>More likely perhaps is to try putting a breakpoint in PythonDataObjects.cpp line 983 (called when try to create a wrapper around a Python File object so we can reference it from C++) and Line 1010 (called when we try to create a Python file object out of a native file descriptor).  These are the two major API boundaries where we convert between native file descriptors and python file objects.</div></div></div>