HappenApps / Quiver

Quiver documentation and issue tracker
2.26k stars 109 forks source link

3.2.1 crashes immediately #1216

Closed rbq closed 5 years ago

rbq commented 5 years ago

macOS: 10.14.1 Quiver: 3.2.1 (AppStore build)

Not sure what's going on here. Is the app supposed to access com.apple.launchservices.secure.plist?

loginwindow  -[PersistentAppsSupport applicationReady:] | App: Quiver, ready, updating active tracking timer
loginwindow  -[ApplicationManager checkInAppContext:refCon:eventData:] |      checked in app : Quiver
secinitd  Quiver[7924]: root path for bundle "<private>" of main executable "<private>"
secinitd  Quiver[7924]: AppSandbox request successful
launchservicesd  CHECKIN:0x0-0xf40f4 7924 com.happenapps.Quiver
loginwindow  -[ApplicationManager checkInAppContext:refCon:eventData:] |      checked in app : Quiver
Quiver  Current system appearance, (HLTB: 1), (SLS: 0)
Quiver  Unable to load Info.plist exceptions (eGPUOverrides)
Quiver  Post-registration system appearance: (HLTB: 1)
Quiver  NSApp cache appearance:
-NSRequiresAquaSystemAppearance: 0
-appearance: (null)
-effectiveAppearance: <NSCompositeAppearance: 0x6000020e1b30
 (
    "<NSAquaAppearance: 0x6000016c8e80>",
    "<NSAquaAppearance: 0x6000016c8e40>",
    "<NSSystemAppearance: 0x6000016c90c0>"
)>
loginwindow  -[PersistentAppsSupport applicationReady:] | App: Quiver, ready, updating active tracking timer
tccd  -[TCCDAccessIdentity staticCode]: static code for: identifier com.happenapps.Quiver, type: 0: 0x7fbf0ab07740 at /Applications/Quiver.app
Quiver          AEGetDescData of non-desc type 'reco' not a good idea
loginwindow  -[PersistentAppsSupport applicationQuit:] | for app:Quiver, _appTrackingState = 2
loginwindow  -[PersistentAppsSupport applicationQuit:] | App: Quiver, quit, updating active tracking timer
sandboxd  Sandbox: Quiver(7924) deny(1) file-read-data /Users/[…]/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist
Violation:       deny(1) file-read-data /Users/[…]/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist 
Process:         Quiver [7924]
Path:            /Applications/Quiver.app/Contents/MacOS/Quiver
Load Address:    0x108af7000
Identifier:      com.happenapps.Quiver
Version:         180 (3.2.1)
Code Type:       x86_64 (Native)
Parent Process:  launchd [1]
Responsible:     /Applications/Quiver.app/Contents/MacOS/Quiver [7924]
User ID:         502

Date/Time:       2018-11-28 08:22:54.490 GMT+1
OS Version:      Mac OS X 10.14.1 (18B75)
Report Version:  8

MetaData: {"path":"\/Users\/[…]\/Library\/Preferences\/com.apple.LaunchServices\/com.apple.launchservices.secure.plist","platform-binary":false,"vnode-type":"REGULAR-FILE","uid":502,"primary-filter":"path","summary":"deny(1) file-read-data \/Users\/[…]\/Library\/Preferences\/com.apple.LaunchServices\/com.apple.launchservices.secure.plist","pid":7924,"team-id":"SX9RS576TL","build":"Mac OS X 10.14.1 (18B75)","operation":"file-read-data","responsible-process-pid":7924,"signing-id":"com.happenapps.Quiver","platform_binary":"no","target":"\/Users\/[…]\/Library\/Preferences\/com.apple.LaunchServices\/com.apple.launchservices.secure.plist","normalized_target":["Users","[…]","Library","Preferences","com.apple.LaunchServices","com.apple.launchservices.secure.plist"],"flags":5,"errno":1,"file-flags":0,"profile-flags":0,"platform-policy":false,"primary-filter-value":"\/Users\/[…]\/Library\/Preferences\/com.apple.LaunchServices\/com.apple.launchservices.secure.plist","process-path":"\/Applications\/Quiver.app\/Contents\/MacOS\/Quiver","responsible-process-path":"\/Applications\/Quiver.app\/Contents\/MacOS\/Quiver","action":"deny","file-mode":420,"hardware":"Mac","rdev":0,"profile-in-collection":false,"process":"Quiver","container":"\/Users\/[…]\/Library\/Containers\/com.happenapps.Quiver\/Data"}

Thread 0 (id: 262099):
0   libsystem_kernel.dylib          0x00007fff647e836a __ulock_wait + 10
1   libdispatch.dylib               0x00007fff6465f68b _dispatch_thread_event_wait_slow + 33
2   libdispatch.dylib               0x00007fff6466ac8a __DISPATCH_WAIT_FOR_QUEUE__ + 294
3   libdispatch.dylib               0x00007fff6466a8cf _dispatch_sync_f_slow + 171
4   LaunchServices                  0x00007fff38b05bf1 _LSPreferences::with(_LSPreferences::SecurityContext const*, void (void const*) block_pointer) + 321
5   LaunchServices                  0x00007fff38b0575b _LSPreferences::With(_LSPreferences::SecurityContext const*, void (void const*) block_pointer) + 85
6   LaunchServices                  0x00007fff38b2adc8 _LSWithMutableInsecurePreferences + 122
7   LaunchServices                  0x00007fff38b2ad0c _LSPrefsInit(long*) + 376
8   LaunchServices                  0x00007fff38b34be4 _LSPrefsGetApplicationCapabilityIsDisabled + 45
9   LaunchServices                  0x00007fff38b32864 prepareApplicationCapabilityIsDisabledValue(_LSOnDemandContext&, FSNode*, __CFString const*, unsigned int, __FileCache*, __CFString const*, NSError* __autoreleasing*) + 567
10  LaunchServices                  0x00007fff38b43135 prepareExternalGPUIsPreferredValue(_LSOnDemandContext&, FSNode*, __FileCache*, __CFString const*, NSError* __autoreleasing*) + 33
11  LaunchServices                  0x00007fff38afdb3d LSPropertyProviderPrepareValues(__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**) + 646
12  CoreServicesInternal            0x00007fff4bf6fd61 prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**) + 360
13  CoreServicesInternal            0x00007fff4bf71a95 _FSURLCopyResourcePropertyForKeyInternal(__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char) + 214
14  CoreFoundation                  0x00007fff374d6187 CFURLCopyResourcePropertyForKey + 101
15  IOSurface                       0x00007fff39fa1861 _iosConnectInitalize + 3538
16  libsystem_pthread.dylib         0x00007fff6489dd14 __pthread_once_handler + 66
17  libsystem_platform.dylib        0x00007fff64893acb _os_once_callout + 18
18  libsystem_pthread.dylib         0x00007fff6489dcaf pthread_once + 56
19  IOSurface                       0x00007fff39fa26ae IOSurfaceClientGetPropertyMaximum + 37
20  CoreImage                       0x00007fff37f721cd __iosurface_limits_block_invoke + 19
21  libdispatch.dylib               0x00007fff6465edcf _dispatch_client_callout + 8
22  libdispatch.dylib               0x00007fff64660515 _dispatch_once_callout + 20
23  CoreImage                       0x00007fff37f721b8 iosurface_limits + 80
24  CoreImage                       0x00007fff37f711f0 -[CIImage initWithCGImage:options:] + 1093
25  CoreImage                       0x00007fff37f70d91 +[CIImage imageWithCGImage:options:] + 59
26  CoreUI                          0x00007fff4c4b9960 CUIRenderer::CreateImageByApplyingEffectsToImage(CUIDescriptor const*, long, __CFArray const*, CGImage*, double, unsigned char, unsigned char, CGBlendMode&, bool) const + 1960
27  CoreUI                          0x00007fff4c4b8b46 CUIRenderer::CreateImage(CGRect, long, CUIDescriptor const*, unsigned char, CGImage**, long long*, unsigned char*, CGBlendMode*) const + 5844
28  CoreUI                          0x00007fff4c4b71ad CUIRenderer::DrawImage(CGRect, long, CUIDescriptor const*) const + 147
29  CoreUI                          0x00007fff4c4c627e CUICoreThemeRenderer::DrawMenuTitle(CUIDescriptor const*, CUIReturnInfo&) + 814
30  CoreUI                          0x00007fff4c4a9661 CUIRenderer::Draw(CGRect, CGContext*, __CFDictionary const*, __CFDictionary const**) + 1719
31  CoreUI                          0x00007fff4c4a8f78 CUIDraw + 278
32  HIToolbox                       0x00007fff36799a01 _HIThemeCUIDrawWithOptions + 64
33  HIToolbox                       0x00007fff367999a6 _HIThemeCUIDrawWithRenderer + 173
34  HIToolbox                       0x00007fff36798d0b _HIThemeDrawAppleMenuTitle + 500
35  HIToolbox                       0x00007fff367957aa HIMenuBarView::DrawOnce(CGRect, CGRect, bool, bool, CGContext*) + 1044
36  HIToolbox                       0x00007fff367952ae HIMenuBarView::DrawSelf(short, __HIShape const*, CGContext*) + 574
37  HIToolbox                       0x00007fff36794cf2 HIMenuBarView::DrawWithoutCustomization(short, __HIShape const*, CGContext*) + 82
38  HIToolbox                       0x00007fff36794c8a HIMenuBarView::DrawingDelegateHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 258
39  HIToolbox                       0x00007fff36762b79 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1502
40  HIToolbox                       0x00007fff36761eb6 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 371
41  HIToolbox                       0x00007fff36761d3c SendEventToEventTargetWithOptions + 45
42  HIToolbox                       0x00007fff367947fd HIView::SendDraw(short, OpaqueGrafPtr*, __HIShape const*, CGContext*) + 337
43  HIToolbox                       0x00007fff36794261 HIView::RecursiveDrawComposited(__HIShape const*, __HIShape const*, unsigned int, HIView*, CGContext*, unsigned char, double) + 585
44  HIToolbox                       0x00007fff367944af HIView::RecursiveDrawComposited(__HIShape const*, __HIShape const*, unsigned int, HIView*, CGContext*, unsigned char, double) + 1175
45  HIToolbox                       0x00007fff36793cb3 HIView::DrawComposited(short, OpaqueGrafPtr*, __HIShape const*, unsigned int, HIView*, CGContext*) + 865
46  HIToolbox                       0x00007fff36793940 HIView::Render(unsigned int, CGContext*) + 54
47  HIToolbox                       0x00007fff36793041 WindowData::PrepareForVisibility() + 153
48  HIToolbox                       0x00007fff367b87fb _ShowHideWindows + 285
49  HIToolbox                       0x00007fff36792a78 ShowHide + 35
50  HIToolbox                       0x00007fff36782f35 MBWindows::GetWindowOnDisplay(unsigned int, unsigned char) + 289
51  HIToolbox                       0x00007fff36782ce3 MenuBarInstance::ForEachWindowDo(unsigned char, bool (OpaqueWindowPtr*, unsigned int) block_pointer) + 167
52  HIToolbox                       0x00007fff36782a06 MenuBarInstance::UpdateWindowBoundsAndResolution() + 158
53  HIToolbox                       0x00007fff367827e5 MenuBarInstance::Show(MenuBarAnimationStyle, unsigned char, unsigned char, unsigned char, unsigned char) + 273
54  HIToolbox                       0x00007fff367b8431 MenuBarInstance::UpdateAggregateUIMode(MenuBarAnimationStyle, unsigned char, unsigned char, unsigned char) + 827
55  HIToolbox                       0x00007fff3679f173 MenuBarInstance::ForEachMenuBarDo(void (MenuBarInstance*) block_pointer) + 47
56  HIToolbox                       0x00007fff367b8099 UpdateAllAggregateUIModes(MenuBarAnimationStyle, unsigned char) + 126
57  HIToolbox                       0x00007fff367b7ff5 SetSystemUIMode + 168
58  AppKit                          0x00007fff34a1a14c -[NSApplication finishLaunching] + 735
59  AppKit                          0x00007fff34a19afb -[NSApplication run] + 253
60  AppKit                          0x00007fff34a093f7 NSApplicationMain + 780
61  libdyld.dylib                   0x00007fff646ad08d start + 1
62  Quiver                          0x0000000000000001

Thread 1 (id: 262143):
0   libsystem_kernel.dylib          0x00007fff647e75be __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff6489e435 start_wqthread + 13

Thread 2 (id: 262144):
0   libsystem_kernel.dylib          0x00007fff647e6bce __open + 10
1   Foundation                      0x00007fff3986293c -[NSData(NSData) initWithContentsOfFile:options:maxLength:error:] + 203
2   Foundation                      0x00007fff3986a8b3 +[NSDictionary(NSDictionary) newWithContentsOf:immutable:] + 115
3   Foundation                      0x00007fff3986a82d +[NSDictionary(NSDictionary) dictionaryWithContentsOfURL:] + 45
4   LaunchServices                  0x00007fff38b74ad5 invocation function for block in _LSPreferences::load() + 292
5   libdispatch.dylib               0x00007fff6466a5c8 _dispatch_block_async_invoke2 + 83
6   libdispatch.dylib               0x00007fff6465edcf _dispatch_client_callout + 8
7   libdispatch.dylib               0x00007fff6466bd14 _dispatch_lane_concurrent_drain + 1033
8   libdispatch.dylib               0x00007fff64665c5c _dispatch_lane_invoke + 516
9   libdispatch.dylib               0x00007fff646610e7 _dispatch_queue_override_invoke + 422
10  libdispatch.dylib               0x00007fff6466cd26 _dispatch_root_queue_drain + 325
11  libdispatch.dylib               0x00007fff6466d4bd _dispatch_worker_thread2 + 90
12  libsystem_pthread.dylib         0x00007fff6489e70e _pthread_wqthread + 619
13  libsystem_pthread.dylib         0x00007fff6489e435 start_wqthread + 13
14  Quiver                          0x0000000054485244

Thread 3 (id: 262154):
0   Foundation                      0x00007fff39823a10 -[NSPlaceholderString initWithBytes:length:encoding:] + 129
1   Foundation                      0x00007fff3983de45 -[NSFileManager stringWithFileSystemRepresentation:length:] + 86
2   Foundation                      0x00007fff3983ddae -[NSSearchPathEnumerator nextObject] + 887
3   CoreFoundation                  0x00007fff37505aa9 -[NSEnumerator countByEnumeratingWithState:objects:count:] + 51
4   Foundation                      0x00007fff3983d838 NSSearchPathForDirectoriesInDomains + 585
5   LaunchServices                  0x00007fff38b3d3a5 -[_LSDefaults userPreferencesURL] + 26
6   LaunchServices                  0x00007fff38b3d358 -[_LSDefaults preferencesFileURL] + 23
7   LaunchServices                  0x00007fff38b74a87 invocation function for block in _LSPreferences::load() + 214
8   libdispatch.dylib               0x00007fff6466a5c8 _dispatch_block_async_invoke2 + 83
9   libdispatch.dylib               0x00007fff6465edcf _dispatch_client_callout + 8
10  libdispatch.dylib               0x00007fff6466bd14 _dispatch_lane_concurrent_drain + 1033
11  libdispatch.dylib               0x00007fff64665c5c _dispatch_lane_invoke + 516
12  libdispatch.dylib               0x00007fff646610e7 _dispatch_queue_override_invoke + 422
13  libdispatch.dylib               0x00007fff6466cd26 _dispatch_root_queue_drain + 325
14  libdispatch.dylib               0x00007fff6466d4bd _dispatch_worker_thread2 + 90
15  libsystem_pthread.dylib         0x00007fff6489e70e _pthread_wqthread + 619
16  libsystem_pthread.dylib         0x00007fff6489e435 start_wqthread + 13
17  Quiver                          0x0000000054485244

Thread 4 (id: 262170):
0   libsystem_kernel.dylib          0x00007fff647e75be __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff6489e435 start_wqthread + 13

Binary Images:
       0x108af7000 -        0x108be1fff  com.happenapps.Quiver (3.2.1 - 180) <c7b9b222-1cf8-3c50-a400-f3970d4bd4b1> /Applications/Quiver.app/Contents/MacOS/Quiver
    0x7fff34a06000 -     0x7fff35826ff3  com.apple.AppKit (6.9 - 1671.10.106) <179a5f4a-6467-31bd-93f2-cc27e046221e> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    0x7fff3675a000 -     0x7fff36a61ff7  com.apple.HIToolbox (2.1.1) <0b91f11c-0895-3a7b-9a3b-2b6b1267ea1a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
    0x7fff37491000 -     0x7fff378defe7  com.apple.CoreFoundation (6.9 - 1560.12) <b5bdc307-6c89-3de0-b4b9-4c2c650e4528> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff37f6f000 -     0x7fff38298fff  com.apple.CoreImage (14.1.0 - 710.2.240) <caee3aaa-0781-311a-b987-72c7332c1a3f> /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
    0x7fff38afb000 -     0x7fff38cc6fff  com.apple.LaunchServices (934 - 934) <fd3d313d-997b-388b-b208-29774cddf897> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
    0x7fff39816000 -     0x7fff39be4fff  com.apple.Foundation (6.9 - 1560.12) <b5dc275c-12c9-320a-a117-c8fe9034931a> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x7fff39f9f000 -     0x7fff39fa9ff7  com.apple.IOSurface (255.1 - 255.1) <538f0257-a408-36af-ab1e-1d7037d6359e> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
    0x7fff4bf6c000 -     0x7fff4bf9dfff  com.apple.CoreServicesInternal (357 - 357) <2d012eb3-83bf-3e51-a2be-41af26f2ddf0> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal
    0x7fff4c485000 -     0x7fff4c5b1fff  com.apple.coreui (2.1 - 498.46) <7637c723-b16d-3001-b3ac-0612349d1cc5> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
    0x7fff6465b000 -     0x7fff64695ff7  libdispatch.dylib (1008.220.2) <d8b56783-152a-34a8-94e9-8e6bae049384> /usr/lib/system/libdispatch.dylib
    0x7fff64696000 -     0x7fff646c5fff  libdyld.dylib (635.2) <1b79a5ce-125f-301f-a441-c1869573aed0> /usr/lib/system/libdyld.dylib
    0x7fff647e5000 -     0x7fff6480cff7  libsystem_kernel.dylib (4903.221.2) <0e882078-7330-3b49-aa5d-3cdb5645a4e5> /usr/lib/system/libsystem_kernel.dylib
    0x7fff64892000 -     0x7fff6489bfef  libsystem_platform.dylib (177.200.16) <b75b04ad-69fe-3ade-84d2-c17972fc8f49> /usr/lib/system/libsystem_platform.dylib
    0x7fff6489c000 -     0x7fff648a6fff  libsystem_pthread.dylib (330.220.2) <4958273c-4273-3501-8137-e44249e10d9c> /usr/lib/system/libsystem_pthread.dylib
ReportCrash  Saved crash report for Quiver[7924] version 3.2.1 (180) to Quiver_2018-11-28-082255_[…].crash
ylian commented 5 years ago

That's a weird crash. I don't know anything about com.apple.launchservices.secure.plist. It's the system that calls it. But even so, sandbox violations are just warnings, and normally don't crash the app.

Does this happen every time you open Quiver? Maybe try to delete and reinstall the app. Maybe the system got confused by recent releases. Make sure you use the latest version 3.2.1 (Build 180).

If you had any debug build you downloaded onto your machine, make sure to delete those as well.

rbq commented 5 years ago

Does this happen every time you open Quiver?

Yes, just tried it a dozen times, even after rebooting. But it's showing a small window for a fraction of a section each time, something about “loading library” and something like “index[…]” below. It disappears to quickly to read.

Maybe try to delete and reinstall the app.

Done—trashed and deleted permanently.

Make sure you use the latest version 3.2.1 (Build 180).

Yes, after reinstalling it's definitely the latest AppStore release.

Could it have something to do with an additional notebook file I'm using? I migrated my old previous snippet collection over using a little script

ylian commented 5 years ago

@rbq That could be. If no sensitive information is in the notebook, you can send it to me so I can test. Otherwise, send me some screenshots of the note contents (right click on .qvnotebook and show package contents). Email: ylian@happenapps.com

ylian commented 5 years ago

@rbq You mentioned that you saw the "Loading library" window before the crash, so it's highly likely an issue with the note files. I looked briefly at your script, and one thing stood out: note.updated_at is missing. That could be the culprit.

ylian commented 5 years ago

@rbq I just checked my code and I am sure that's the problem. I will change my code to guard against this edge case. So this will be fixed in 3.2.2 from my end.

rbq commented 5 years ago

Thanks a lot!

I added the updated_at field, but that didn't change anything—see this sample notebook, which is the result of the script (with all but one note removed).

ylian commented 5 years ago

@rbq You may need to remove the following two files, since they are likely corrupted from the crash:

~/Library/Containers/com.happenapps.Quiver/Data/Library/Application\ Support/Quiver/cache.db
~/Library/Containers/com.happenapps.Quiver/Data/Library/Application\ Support/Quiver/index-v2.dat

Then open Quiver, (with your updated library), it should work.

ylian commented 5 years ago

I also submitted 3.2.2 with the fix on my end. Should be available today.

rbq commented 5 years ago

Removing the cache/index files didn't work, just the same crash, over and over. Both files are immediately recreated though.

While I was already snooping around, I had a look at the contents of cache.db, listing only my (iCloud) library and its three notebooks in the respective tables, but not the converted notebook. I also had a look at library.plist, where sharedNotebooks contains 0 items.

Anyway, I'll check out 3.2.2 as soon as it gets through the review and let you know.

ylian commented 5 years ago

Let me check your notebook. I could be wrong.

ylian commented 5 years ago

@rbq Just tried your sample notebook, no problem loading on 3.2.1. But if I remove the updated_at field, the app crashes immediately.

Is it possible that some of the notes in your notebook still don't have this field? Or you could just wait for 3.2.2.

ylian commented 5 years ago

I can also send you a 3.2.2 build right now: https://www.dropbox.com/s/7jogjjxmph08igd/Quiver%203.2.2%20Build%20181.zip?dl=0

Please let me know if this build works.

rbq commented 5 years ago

Yay, it works!!!1 Thanks so much!