-
Notifications
You must be signed in to change notification settings - Fork 8
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
10 MB write to stream crashes Python #20
Comments
FYI, this will be more efficient (and maybe avoid the crash?) if an object that supports the buffer protocol is passed instead of a list. data_writer.write_bytes(10000000 * b'\x00') But we should still fix the crash. |
Bug was introduce by pywinrt/pywinrt@9564a99. Returning |
Thank you for looking into this! FWIW, winrt actually doesn't allow passing in a bytes object as you suggest (although it does seem to resolve the issue with winsdk). winrt gives the following error:
I only mention this in case the goal is to provide an identical drop-in replacement for winrt. |
This changes generated code for *pass array* parameters to only allow objects that implement the Python buffer protocol. This also fixes freeing com_array before use. Issue: pywinrt/python-winsdk#20
Hi, when is your ETA on pushing out a new release with the fix? I had another bug filed from a user of my package concerned about winrt being unmaintained, and this is the only blocker for me to switch over. Thanks! |
I've been putting off doing a release because there have been some breaking changes and I haven't decided yet if the tradeoffs of the performance improvements are worth the breaking changes yet or not. Hopefully I can find some time to come back to this again soonish. |
Should be fixed in v1.0.0b8. Note that |
Simple repro on Windows 11 Python 3.9 64-bit:
This works fine with winrt. Try doing 100 MB if that doesn't repro.
Event Viewer log:
The text was updated successfully, but these errors were encountered: