Skip to content
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

Recent Documents are broken under High Sierra #2396

Closed
skurfer opened this issue Sep 26, 2017 · 9 comments
Closed

Recent Documents are broken under High Sierra #2396

skurfer opened this issue Sep 26, 2017 · 9 comments

Comments

@skurfer
Copy link
Member

skurfer commented Sep 26, 2017

Once again, we’ll have to figure out how to get this working.

The Console just shows <private>. I’m sure this is just Apple’s way of saying “use the public API instead”, right?

@skurfer
Copy link
Member Author

skurfer commented Sep 26, 2017

Of course the Xcode console has a bit more to say:

2017-09-26 16:19:18.972723-0400 Quicksilver[35769:1443206] [General] *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (SFLListItem) for key (NS.objects); the class may be defined in source code or a library that is not linked
2017-09-26 16:19:18.974290-0400 Quicksilver[35769:1443206] [General] (
	0   CoreFoundation                      0x00007fff328f20fb __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fff591dec76 objc_exception_throw + 48
	2   Foundation                          0x00007fff34a1b23f -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:] + 0
	3   Foundation                          0x00007fff34a1b3bc -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:] + 381
	4   Foundation                          0x00007fff34906474 _decodeObjectBinary + 2856
	5   Foundation                          0x00007fff34907510 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1779
	6   Foundation                          0x00007fff3490b367 -[NSArray(NSArray) initWithCoder:] + 202
	7   Foundation                          0x00007fff349062c1 _decodeObjectBinary + 2421
	8   Foundation                          0x00007fff34907510 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1779
	9   Foundation                          0x00007fff34906934 -[NSDictionary(NSDictionary) initWithCoder:] + 202
	10  Foundation                          0x00007fff349062c1 _decodeObjectBinary + 2421
	11  Foundation                          0x00007fff34905848 _decodeObject + 243
	12  Foundation                          0x00007fff349b0144 +[NSKeyedUnarchiver unarchiveObjectWithFile:] + 148
	13  QSCore                              0x00000001004ac037 recentDocumentsForBundle + 423
	14  QSCore                              0x00000001004b04be -[QSFileSystemObjectHandler loadChildrenForObject:] + 2894
	15  QSCore                              0x00000001004a7bed -[QSObject(Hierarchy) loadChildren] + 93
	16  QSCore                              0x00000001004a85cd -[QSObject(Accessors) children] + 93
	17  QSInterface                         0x00000001005bf6c6 -[QSSearchObjectView(Browsing) browse:] + 342
	18  QSInterface                         0x00000001005bf4f7 -[QSSearchObjectView(Browsing) moveRight:] + 103
	19  QSInterface                         0x00000001005ba7a7 -[QSSearchObjectView handleSlashEvent:] + 279
	20  QSInterface                         0x00000001005b9ac3 -[QSSearchObjectView keyDown:] + 627
	21  AppKit                              0x00007fff307bc915 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 5040
	22  AppKit                              0x00007fff307bb148 -[NSWindow(NSEventRouting) sendEvent:] + 497
	23  QSEffects                           0x000000010045c83c -[QSWindow sendEvent:] + 1004
	24  AppKit                              0x00007fff3061c95f -[NSApplication(NSEvent) sendEvent:] + 2751
	25  Quicksilver                         0x0000000100002778 -[QSApp sendEvent:] + 2440
	26  AppKit                              0x00007fff2fe7e28d -[NSApplication run] + 812
	27  AppKit                              0x00007fff2fe4d3fe NSApplicationMain + 804
	28  Quicksilver                         0x000000010002b3a3 main + 195
	29  libdyld.dylib                       0x00007fff59dcd145 start + 1
	30  ???                                 0x0000000000000003 0x0 + 3
)

@skurfer
Copy link
Member Author

skurfer commented Sep 26, 2017

So, it seems like this one-liner should fix it

[NSKeyedUnarchiver setClass:[SFLListItem class] forClassName:@"SFLListItem"];

but the build fails.

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_SFLListItem", referenced from:
      objc-class-ref in QSObject_FileHandling.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The header is included in QSFoundation, so I’m not sure what to make of this.

@tiennou
Copy link
Member

tiennou commented Sep 26, 2017

It means the linker cannot resolve the needed reference from anything we link to.

Looking at the header, I guess /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList (which we ought to pull in because CoreServices) doesn't define that class anymore, or it was moved somewhere else.

@pjrobertson
Copy link
Member

pjrobertson commented Sep 27, 2017 via email

@skurfer
Copy link
Member Author

skurfer commented Sep 28, 2017

The SFLListItem is a private class that I got with ‘classdump’ and pulled it into the QS Code.
No wonder it’s broken, they’ve most likely changed the interface in High Sierra.

Yeah, I saw that. From recently updated .sfl files, it doesn’t look like the interface or class name has changed. It’s just not there any more. class-dump no longer shows any mention of that class. I also tried checking otool -L SharedFileList to see if it could be getting included from another file. No luck finding it. Any other ideas?

@tiennou
Copy link
Member

tiennou commented Sep 28, 2017

Does nm reports interesting (C) symbols maybe ? It really seems like that class is no more on High Sierra…

@skurfer
Copy link
Member Author

skurfer commented Oct 16, 2017

I found a fix for this. The items are just dictionaries now and we can get the data using the public API for NSURL.

A pull request is coming, but I want to try to fix one last thing: URLs for Recent/Favorite Servers don’t get resolved unless the filesystem is currently mounted. (The NSURLBookmarkResolutionWithoutMounting doesn’t seem to make a difference.)

@pjrobertson
Copy link
Member

pjrobertson commented Oct 22, 2017 via email

@skurfer
Copy link
Member Author

skurfer commented Oct 22, 2017

Yeah, that’s what I did. I think we have three different techniques in there for different OS versions now.

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

No branches or pull requests

3 participants