Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFix segfault in file_finder.cpp #3581
Conversation
phaethonfire
added some commits
Aug 5, 2013
This comment has been minimized.
This comment has been minimized.
|
Kind of weird that github is showing all my old commits... I may have done things out of order in branching and merging. 7 commits for one line change... lol. |
GalenEvil
merged commit f378698
into
CleverRaven:master
Oct 12, 2013
1 check was pending
default
Merged build started.
Details
This comment has been minimized.
This comment has been minimized.
|
did not notice that o.O Doesn't seem to be changing any more than that one line though so it should be safe |
phaethonfire
deleted the
phaethonfire:fix-file-finder
branch
Oct 14, 2013
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.
phaethonfire commentedOct 12, 2013
At rutime, I was getting a segfault. A backtrace showed this:
(gdb) backtrace
#0 0x00007fff8a736162 in closedir ()
#1 0x00000001001a8b5a in file_finder::get_files_from_path (extension=@0x7fff5fbfa4f8, root_path=@0x7fff5fbfa4f0, recursive_search=true) at file_finder.cpp:73
#2 0x000000010084182c in get_tileset_names (dir_path=@0x7fff5fbfb738) at options.cpp:851
#3 0x00000001008447ef in initOptions () at options.cpp:315
#4 0x00000001004b38cb in main (argc=0, argv=0x7fff5fbff978) at main.cpp:66
stepping through showed this:
68 subdir = opendir(subpath.c_str());
(gdb)
69 if (subdir)
(gdb)
73 closedir(subdir);
(gdb)
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00007fff8a736162 in closedir ()
(gdb) p subdir
$1 = (DIR *) 0x0
Moving the closedir command inside the brackets fixes the error.