Repository navigation
Directory walkers: don't crash on symlinks / unreadable entries (OF #8545) - #667
Merged
Merged
Conversation
…rt uncaught exceptions instead of abort (#8545)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs openframeworks/openFrameworks#8545
PG crashes with no message when it hits an addon directory it can't stat/iterate. On Windows that shows up as
0xC0000409(STATUS_STACK_BUFFER_OVERRUN) because MSVC'sabort()after an uncaught exception uses__fastfail; on macOS/Linux it'slibc++abi: terminating due to uncaught exception ... filesystem_error(exit 134).Changes
error_codeoverloads / cacheddirectory_entrytype,skip_permission_denied,increment(ec):getFilesRecursively(x2),getPropsRecursively, dll walker,getFoldersRecursively,getLibsRecursively,dirList,folderList,containsSourceFiles(Utils.cpp)ofAddon::getFrameworksRecursivelymainwraps generation intry/catchand prints the exception (andfilesystem_errorpaths) viamessageErrorinstead of aborting, so any remaining case says which file it was.Tested (macOS, addon with dylib version symlinks + extras)
.dylibversion symlinks (issue layout)libs/loop -> ..)Too many levels of symbolic links)Permission denied)Generated vcxproj / xcodeproj still contain the addon sources,
avcodec.lib, and all dylibs; dangling link skipped.The exact Windows trigger from the issue (valid file symlinks only) doesn't reproduce on macOS, so it still needs a re-test on Windows with
-a ofxHapPlayer— if anything still throws it will now print the path instead of a silent0xC0000409.