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
Crash Fixes #1015
Crash Fixes #1015
Conversation
if (![source respondsToSelector:@selector(entryCanBeIndexed:)] || [source entryCanBeIndexed:[self info]]) { | ||
[self saveIndex]; | ||
} else { | ||
// NSLog(@"not caching %@", [self name]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an else
which does...nothing? :p
It looks pretty much like what we talked about :-) |
Yeah, pretty much what we said, except we didn't say anything about having to remove empty OK, I've made those tidy ups. |
Yeah, well..."leave the code a little bit cleaner than you found it" or something like that :-) |
Crashes like crazy for me. :-) No mention of it in the crash report, but if I let the debugger catch it, it’s in
|
@@ -436,7 +436,7 @@ - (void)saveIndex { | |||
|
|||
// Lock the 'contents' mutablearray so that it cannot be changed whilst it's being written to file | |||
@synchronized(contents) { | |||
NSArray *writeArray = [[[self contents] arrayByPerformingSelector:@selector(dictionaryRepresentation)] copy]; | |||
NSArray *writeArray = [contents arrayByPerformingSelector:@selector(dictionaryRepresentation)]; | |||
[writeArray writeToFile:[[path stringByAppendingPathComponent:key] stringByAppendingPathExtension:@"qsindex"] atomically:YES]; | |||
[writeArray release]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line is the problem. writeArray
is an autoreleased object, so it shouldn't be explicitly released, right? Looks like you removed this line over on the original pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, yeah I think you're right. This'll fix the problems for this pull. Hopefully, the actual changes I've made will fix the problem… in general :)
See the extra commit in this pull that fixes the couple of problems
OK, good. It builds now (and doesn’t crash), though I fear for the future of I also see that the catalog doesn’t disappear from the prefs during a rescan. I’m running with it now, so I’ll keep an eye out for issues. |
I'm still seeing the catalog disappear at times, but that wasn't introduced by this. Haven't run into any problems since using it. Should we merge? |
Yes please? :) |
Merged. In the future, we should probably squash commits and open a new pull request if we have a commit that prevents QS from building or running. |
This builds on #986.
See that pull request for the full discussion. @HenningJ might be interested with the solution that I've used (his solution)