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

Fix out of memory errors causing logic_error when using ManagedRandomAccessFile #471

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

adamreeve
Copy link
Contributor

When one of the ManagedRandomAccessFile methods called from C++ caused an OutOfMemoryException, the exception message was set to null in HandleException, but this caused a std::logic_error on the C++ side when trying to convert nullptr to std::string when constructing an arrow::Status in ManagedRandomAccessFile::GetResult. The error looks like:

ParquetSharp.ParquetException: St11logic_error (message: 'basic_string::_S_construct null not valid')

I've added a check for exception == nullptr to fix this.

I've also changed the TRYCATCH macro so that these errors are propagated out as an OutOfMemoryException again, and fixed the use of plain integers for status codes.

@adamreeve adamreeve merged commit 62ae832 into G-Research:master Jul 2, 2024
38 checks passed
@adamreeve adamreeve deleted the oom_handling_fix branch July 2, 2024 19:54
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

Successfully merging this pull request may close these issues.

2 participants