2

I upgraded Orion to 0.99.127-beta

I have 2 profiles. I can run the non-default profile, and that works fine.

When I launch the default profile, I can see some of the windows flash up, and then I get a crash report.

Running from the command line, this is the output:

❯ ./Orion
"CloudKit => fetchLatestChanges > enterSyncProcess"
2024-03-21 22:35:12.101 Orion[42832:12603743] Warning: Column selection is not supported in view-based table and outline views (<Orion.TableView: 0x127987400>).
2024-03-21 22:35:12.116 Orion[42832:12603743] It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out. If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug. This will be logged only once. This may break in the future.
"CloudKit => Devices - processQueuedSyncedItems > enterSyncProcess"
"CloudKit => TabGroups - processQueuedSyncedItems > enterSyncProcess"
"CloudKit => Tabs - processQueuedSyncedItems > enterSyncProcess"
"CloudKit => TabGroups - processQueuedSyncedItems > leaveSyncProcess"
"CloudKit => Devices - processQueuedSyncedItems > leaveSyncProcess"
"CloudKit => Tabs - processQueuedSyncedItems > leaveSyncProcess"
2024-03-21 22:35:19.075 com.apple.WebKit.Networking.Orion[42833:12603788] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/steve/Library/HTTPStorages/com.kagi.kagimacOS.2.PrivateBrowsing.c4ffae2c-4470-4beb-bf19-34b59ce24c4c.binarycookies
Passed ITP enabled state (0) does not match TCC setting (1)
2024-03-21 22:35:19.864 Orion[42832:12603743] *** Assertion failure in -[Orion.Toolbar _itemAtIndex:], NSToolbar.m:1387
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: index>=0 && index<[_currentItems count]'
*** First throw call stack:
(
0 CoreFoundation 0x0000000189c2c540 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x000000018971deb4 objc_exception_throw + 60
2 Foundation 0x000000018ad7639c -[NSCalendarDate initWithCoder:] + 0
3 AppKit 0x000000018d5b2538 -[NSToolbar _itemAtIndex:] + 168
4 AppKit 0x000000018d5b23a0 -[NSToolbar _removeItemAtIndex:notifyDelegate:notifyView:notifyFamilyAndUpdateDefaults:] + 52
5 AppKit 0x000000018ddc60ec -[NSToolbar _syncToChangedToolbar:itemRemoved:] + 128
6 AppKit 0x000000018ddc5ab0 _enumerateToolbarsInFamily + 272
7 AppKit 0x000000018ddc58ec -[NSToolbar _notifyFamily_DidRemoveItem:atIndex:] + 312
8 AppKit 0x000000018d5b2420 -[NSToolbar _removeItemAtIndex:notifyDelegate:notifyView:notifyFamilyAndUpdateDefaults:] + 180
9 Orion 0x0000000102637528 Orion + 4666664
10 libdispatch.dylib 0x0000000189926cb8 _dispatch_call_block_and_release + 32
11 libdispatch.dylib 0x0000000189928910 _dispatch_client_callout + 20
12 libdispatch.dylib 0x0000000189936fa8 _dispatch_main_queue_drain + 984
13 libdispatch.dylib 0x0000000189936bc0 _dispatch_main_queue_callback_4CF + 44
14 CoreFoundation 0x0000000189bf8ea4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
15 CoreFoundation 0x0000000189bb6760 __CFRunLoopRun + 1996
16 CoreFoundation 0x0000000189bb593c CFRunLoopRunSpecific + 608
17 HIToolbox 0x000000019417e448 RunCurrentEventLoopInMode + 292
18 HIToolbox 0x000000019417e284 ReceiveNextEventCommon + 648
19 HIToolbox 0x000000019417dfdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
20 AppKit 0x000000018d394ed0 _DPSNextEvent + 660
21 AppKit 0x000000018db7feec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
22 AppKit 0x000000018d38837c -[NSApplication run] + 476
23 AppKit 0x000000018d35f640 NSApplicationMain + 880
24 Orion 0x0000000102932514 Orion + 7791892
25 dyld 0x00000001897590e0 start + 2360
)
libc++abi: terminating due to uncaught exception of type NSException
[1] 42832 abort ./Orion

I've tried removing extensions by renaming the folder, as described on the Technical Information page, and that doesn't help.

The default profile does have around 200 tabs across several windows. I have power-saving mode set, so they're mostly inactive.

The default profile loads properly without error after the upgrade.

Version 0.99.127-beta (WebKit 619.1.1)

Sonoma (14)

    if I erase ~/Library/Application Support/Orion/Defaults/browser_state.plist then the default profile starts up correctly, except of course without any of the tabs / windows that should be open.

    So I suspect there's something in this plist which is causing the new Orion beta some problems.

    • dino replied to this.

      SteveA can you please share crash report? you can find that under ~/Library/Logs/DiagnosticReports

      Sure, I'll get the crash report shortly.

      Meanwhile, I can reproduce the problem with a different profile simply by opening 12 windows, then quitting Orion. Then running Orion. When it tries to restore the 12 windows, it crashes. 11 windows is fine, 12 or more crashes.

        I tried to drag the .ips file to upload it as an attachment here, but I get an error "Uploading files of this type is not allowed."

          (see .zip file in comment below)

            I added it as a code block in the editor. I hope that works. Otherwise I can upload it somewhere else.

              the forum accepts zip files, so I zipped the ips file.

                SteveA what web-extensions you are using? can you list them here, as the issue looks like related to web-extension toolbar items

                  I had been using google translate and bitwarden. Now, there are no extensions.

                  When I was first debugging the issue, I thought it might be extensions, so I renamed the "Extensions" folder, as explained in the Technical Information page "Start Orion without any extensions active" section.

                    Were you able to reproduce the issue by opening 12 windows and restarting? This seems to be the determining factor for me. I can produce a video if it will help?

                    • dino replied to this.

                      SteveA opening 12 windows didn't work for me, so there must be some other factor too, which will be needed to match to reproduce the issue

                      makes sense. I'll try and make a clean reproduction.

                      I've resolved the problem.

                      I'll try to explain how. Before upgrading to the latest beta, I had my browser set up with "Use Vertical Tabs". However, I think something had gone wrong, because my 4 pinned tabs were laid out in a vertical stack of icons at the top of the tabs panel, rather than as they ought to be in a horizontal row of icons at the top.

                      On upgrading, Orion would crash immediately after launch, as described above.

                      I managed to get Orion running on this profile by erasing windows from the browser_state.plist file. When I had 11 or fewer windows, Orion would run.

                      Then, while it was running, I changed the sidebar setting to "Use Horizontal Tabs". Changing this resolved the issue, and I could have 12 or more tabs, and successfully re-open Orion.

                      When I set the sidebar settings back to "Use Vertical Tabs", the pinned tabs were restored to the usual layout. I was able to restore my original browser_state.plist file, and Orion is working as expected.

                      So, what I think happened is that something to do with the pinned tabs and sidebar got messed up before I upgraded. This interacted poorly with the upgraded code. Flipping the tab orientation fixed what got messed up, so things could work as expected.

                      Looking at changes in the com.kagi.kagimacOS.plist file, the most significant change between when the pinned tabs appeared incorrectly and I was getting crashes, and when the pinned tabs appeared correctly, is in the Pinned Tabs section. It changed from a dict of UUIDs/URLs to an array of dicts {id: uuid, url: urlstring}.

                      I wonder if this change in the format of saved preferences caused the weird pinned tabs layout, and this in turn caused the layout issue with more than 11 windows?

                      Anyway, my own problem is now resolved. Thanks so much for looking into it so far.

                      I have another profile that is still showing the problems above: pinned tabs shown in a horizontal stack, and cannot deal with more than 11 windows on restart.

                      Is there anything that would be useful to pull out of the various .plist files and send to you?

                      At some point I'll want to start using this profile again, so I'll do the "flip tabs orientation" trick to fix it. Until then, I can reproduce the problem.

                      Then again, maybe it's only a problem for me, and not worth more investigation. Either way, let me know if I can provide something useful.

                      • dino replied to this.

                        SteveA I think that would be good if you can send preference and browsing_state plist files from your custom profile, so will try with those (both don't contain any sensitive data, but will still recommend sending those over DM on discord)

                        8 days later
                        No one is typing