Skip to content

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
@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