-
Notifications
You must be signed in to change notification settings - Fork 285
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
don't pass / to imageNamed:
#2003
Conversation
Probably not, but I don’t know what all uses that. (Maybe nothing.)
Yup. Might only be actions that do that, but still… |
OK, but you're not logging when the slash is removed there because...? It's a category and you can't add an NSMutableSet instance variable? Once that's answered I think it's OK to go (after I've tested it of course ;-D ) |
Mainly because I don’t think it ever will be. I went through the code, and it’s only called from two places. One passes hard-coded strings with no So, I’ve reverted changes in Cleaned up this branch and force-pushed. |
Cool, in that case I’ll test it and hopefully merge it :) On 13 Rhag 2014, at 19:19, Rob McBroom notifications@github.com wrote:
|
Hmm... ok, so the plot thickens! I put a breakpoint in the if() statement you created, and had a look at some of the places that are calling it. In |
@skurfer - not sure if you missed my post here. It's not in the same place as the first, sorry. |
I did, and I’ve been thinking about it. Just haven’t had time to investigate. My gut tells me those examples are wrong twice over: A full path isn’t a valid way to refer to an icon, and |
OK, I think you're probably right. I'd done what I'd done for the 1Password plugin because I wanted to refer to an icon by path in the Info.plist (see here) Should we therefore change the QSPlugin ... or is there another way I should be doing that? QSResourceAdditions? or something? |
In that case, yeah, you could use Apparently, if the image was in your plug-in, you could put the file’s name as the icon. I didn’t know that until looking though the code after your comment. We could maybe allow it to take a full path, but for now, there’s another way to do it, so it seems low priority. For the problem at hand, should we just get this out as a band-aid, since it’s causing so many crashes? |
Absolute paths shouldn't be used for icons
OK, yeah. I'm happy with this then. I've added another commit that changes that one path, and have done a quick grep but couldn't find any more icons that use a slash in the name Edit: So I'm happy for this to be merged and released. If you're happy with my commit, go ahead and merge :) |
OK hold on that. Even using QSResoruceAdditions still doesn't seem to work. I get the 'sanitizing image...' message. I'm currently investigating |
False alarm - everything is fine. I was just running an older QS version |
Yeah, looks good. I’ll try to merge and release later today. Thanks! |
Thanks for putting up with my being picky ;-) |
FYI when you're ready to merge/release - we'll need to decide on the QS hosting issue first. (See my QSDev groups post) |
This is responsible for the majority of crashes on Yosemite. Hope this works. I’m going to have a couple of users try it.
The fix is based on a clue in the release notes. I made a small project that threw a bunch of strings at
[NSImage imageNamed:]
and including a/
definitely throws the exception. Couldn’t find any other problematic characters.