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

Crash on playlist migration to sandbox (Cog-01c38c94) #339

Closed
mag01 opened this issue Dec 11, 2022 · 7 comments
Closed

Crash on playlist migration to sandbox (Cog-01c38c94) #339

mag01 opened this issue Dec 11, 2022 · 7 comments
Assignees

Comments

@mag01
Copy link

mag01 commented Dec 11, 2022

Describe
Today I updated from Cog 91898e9 to 01c38c9 and upon relaunch the playlist was empty.
So I copied the Default.sqlite file (the only file in that directory) from ~/Library/Application Support/Cog to ~/Library/Containers/org.cogx.cog/Data/Library/Application Support/Cog (leaving no other files in the target directory) as per #288. However the app now crashes right after the launch, see the attached crash report Cog-01c38c94_crash.txt (part shown below).

Version information:*

  • macOS version: 10.15.7 (19H2026)
  • Cog version: 2728-g01c38c94
Process:               Cog [23584]
Path:                  /Applications/Cog.app/Contents/MacOS/Cog
Identifier:            org.cogx.cog
Version:               2728 (2728)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Cog [23584]
User ID:               501

Date/Time:             2022-12-11 01:32:01.154 +0100
OS Version:            Mac OS X 10.15.7 (19H2026)
Report Version:        12
Anonymous UUID:        F71DD4E8-4728-324C-87FA-4DFD103575F9


Time Awake Since Boot: 2200000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [23584]

Application Specific Information:
Crashing on exception: -[PlaylistEntry setTrack:]: unrecognized selector sent to instance 0x600000539360

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff2dbf0a17 __exceptionPreprocess + 250
1   libobjc.A.dylib                     0x00007fff65b08a9e objc_exception_throw + 48
2   CoreFoundation                      0x00007fff2dc6fe36 -[NSObject(NSObject) __retain_OA] + 0
3   CoreFoundation                      0x00007fff2db55190 ___forwarding___ + 1427
4   CoreFoundation                      0x00007fff2db54b68 _CF_forwarding_prep_0 + 120
5   Cog                                 0x000000010908d698 Cog + 243352
6   CoreData                            0x00007fff2d621039 developerSubmittedBlockToNSManagedObjectContextPerform + 201
7   CoreData                            0x00007fff2d620edf -[NSManagedObjectContext performBlockAndWait:] + 207
8   Cog                                 0x000000010908d097 Cog + 241815
9   Cog                                 0x000000010908e8e2 Cog + 248034
10  Cog                                 0x000000010908b3fc Cog + 234492
11  Cog                                 0x000000010908a56d Cog + 230765
12  Cog                                 0x000000010907d52b Cog + 177451
13  Cog                                 0x000000010906c294 Cog + 107156
14  CoreFoundation                      0x00007fff2db68b72 -[NSSet makeObjectsPerformSelector:] + 215
15  AppKit                              0x00007fff2ae06c47 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1485
16  AppKit                              0x00007fff2adfaa61 loadNib + 401
17  AppKit                              0x00007fff2adfa261 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 1268
18  AppKit                              0x00007fff2adf9c78 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
19  AppKit                              0x00007fff2adf9a51 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 446
20  AppKit                              0x00007fff2adeb5f6 NSApplicationMain + 505
21  libdyld.dylib                       0x00007fff66ca8cc9 start + 1
22  ???                                 0x0000000000000001 0x0 + 1

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.AppKit              	0x00007fff2b20a8c3 -[NSApplication _crashOnException:] + 106
1   com.apple.AppKit              	0x00007fff2b20a7a6 -[NSApplication reportException:] + 901
2   org.cogx.cog                  	0x00000001090ffec5 0x109052000 + 712389
3   com.apple.AppKit              	0x00007fff2b2ba2dd uncaughtErrorProc + 145
4   com.apple.CoreFoundation      	0x00007fff2dc69a28 __handleUncaughtException + 726
5   libobjc.A.dylib               	0x00007fff65b0aa51 _objc_terminate() + 90
6   org.cogx.cog                  	0x00000001090ffc57 0x109052000 + 711767
7   libc++abi.dylib               	0x00007fff63fdb887 std::__terminate(void (*)()) + 8
8   libc++abi.dylib               	0x00007fff63fde387 __cxa_rethrow + 99
9   libobjc.A.dylib               	0x00007fff65b08e1c objc_exception_rethrow + 37
10  com.apple.CoreData            	0x00007fff2d6211c8 developerSubmittedBlockToNSManagedObjectContextPerform + 600
11  com.apple.CoreData            	0x00007fff2d620edf -[NSManagedObjectContext performBlockAndWait:] + 207
12  org.cogx.cog                  	0x000000010908d097 0x109052000 + 241815
13  org.cogx.cog                  	0x000000010908e8e2 0x109052000 + 248034
14  org.cogx.cog                  	0x000000010908b3fc 0x109052000 + 234492
15  org.cogx.cog                  	0x000000010908a56d 0x109052000 + 230765
16  org.cogx.cog                  	0x000000010907d52b 0x109052000 + 177451
17  org.cogx.cog                  	0x000000010906c294 0x109052000 + 107156
18  com.apple.CoreFoundation      	0x00007fff2db68b72 -[NSSet makeObjectsPerformSelector:] + 215
19  com.apple.AppKit              	0x00007fff2ae06c47 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1485
20  com.apple.AppKit              	0x00007fff2adfaa61 loadNib + 401
21  com.apple.AppKit              	0x00007fff2adfa261 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 1268
22  com.apple.AppKit              	0x00007fff2adf9c78 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
23  com.apple.AppKit              	0x00007fff2adf9a51 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 446
24  com.apple.AppKit              	0x00007fff2adeb5f6 NSApplicationMain + 505
25  libdyld.dylib                 	0x00007fff66ca8cc9 start + 1

Thread 1:
0   libsystem_pthread.dylib       	0x00007fff66eacb68 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	0x00007fff66eacb68 start_wqthread + 0

Thread 3:: Dispatch queue: APMExperimentWorkerQueue
0   libsystem_kernel.dylib        	0x00007fff66deb276 pread + 10
1   libsqlite3.dylib              	0x00007fff65c79b68 unixRead + 248
2   libsqlite3.dylib              	0x00007fff65cabe1d readDbPage + 221
3   libsqlite3.dylib              	0x00007fff65d62f02 getPageNormal + 418
4   libsqlite3.dylib              	0x00007fff65d79a61 checkTreePage + 225
5   libsqlite3.dylib              	0x00007fff65cdb951 sqlite3VdbeExec + 61249
6   libsqlite3.dylib              	0x00007fff65ccb55f sqlite3_step + 2367
7   org.cogx.cog                  	0x00000001093a7b5d 0x109052000 + 3496797
8   org.cogx.cog                  	0x00000001093a7a8b 0x109052000 + 3496587
9   org.cogx.cog                  	0x00000001093a2eb8 0x109052000 + 3477176
10  org.cogx.cog                  	0x0000000109324675 0x109052000 + 2958965
11  org.cogx.cog                  	0x0000000109324591 0x109052000 + 2958737
12  org.cogx.cog                  	0x000000010932dbc5 0x109052000 + 2997189
13  org.cogx.cog                  	0x000000010932db6d 0x109052000 + 2997101
14  org.cogx.cog                  	0x000000010932f207 0x109052000 + 3002887
15  libdispatch.dylib             	0x00007fff66c4e6c4 _dispatch_call_block_and_release + 12
16  libdispatch.dylib             	0x00007fff66c4f658 _dispatch_client_callout + 8
17  libdispatch.dylib             	0x00007fff66c54c44 _dispatch_lane_serial_drain + 597
18  libdispatch.dylib             	0x00007fff66c555d6 _dispatch_lane_invoke + 363
19  libdispatch.dylib             	0x00007fff66c5ec09 _dispatch_workloop_worker_thread + 596
20  libsystem_pthread.dylib       	0x00007fff66eada3d _pthread_wqthread + 290
21  libsystem_pthread.dylib       	0x00007fff66eacb77 start_wqthread + 15

Thread 4:
0   libsystem_pthread.dylib       	0x00007fff66eacb68 start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib       	0x00007fff66eacb68 start_wqthread + 0

Thread 6:
0   libsystem_pthread.dylib       	0x00007fff66eacb68 start_wqthread + 0

Thread 7:
0   libsystem_pthread.dylib       	0x00007fff66eacb68 start_wqthread + 0

Thread 8:: Dispatch queue: com.google.firebase.crashlytics.mac.binary-images
0   libsystem_kernel.dylib        	0x00007fff66decbe6 write + 10
1   org.cogx.cog                  	0x00000001091033cc 0x109052000 + 725964
2   org.cogx.cog                  	0x000000010910336c 0x109052000 + 725868
3   org.cogx.cog                  	0x000000010910346e 0x109052000 + 726126
4   org.cogx.cog                  	0x0000000109103889 0x109052000 + 727177
5   org.cogx.cog                  	0x00000001090f2060 0x109052000 + 655456
6   libdispatch.dylib             	0x00007fff66c4e6c4 _dispatch_call_block_and_release + 12
7   libdispatch.dylib             	0x00007fff66c4f658 _dispatch_client_callout + 8
8   libdispatch.dylib             	0x00007fff66c54c44 _dispatch_lane_serial_drain + 597
9   libdispatch.dylib             	0x00007fff66c555d6 _dispatch_lane_invoke + 363
10  libdispatch.dylib             	0x00007fff66c5ec09 _dispatch_workloop_worker_thread + 596
11  libsystem_pthread.dylib       	0x00007fff66eada3d _pthread_wqthread + 290
12  libsystem_pthread.dylib       	0x00007fff66eacb77 start_wqthread + 15

Thread 9:: com.google.firebase.crashlytics.MachExceptionServer
0   libsystem_kernel.dylib        	0x00007fff66decbe6 write + 10
1   org.cogx.cog                  	0x00000001091041e6 0x109052000 + 729574
2   org.cogx.cog                  	0x000000010910225d 0x109052000 + 721501
3   libsystem_pthread.dylib       	0x00007fff66eb1109 _pthread_start + 148
4   libsystem_pthread.dylib       	0x00007fff66eacb8b thread_start + 15

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x00007f8ce08bba00  rbx: 0x00006000028eb390  rcx: 0xf3cdccff9ac300cc  rdx: 0x0000000000000001
  rdi: 0x00007ffee6bac750  rsi: 0x0000000000000824  rbp: 0x00007ffee6bacbc0  rsp: 0x00007ffee6bacbb0
   r8: 0x0000000000000800   r9: 0x00007f8ce08bc224  r10: 0x0000000000000024  r11: 0x00007ffee6bac298
  r12: 0x00007fff65afbd10  r13: 0x0000600000d507e0  r14: 0x00007fff65afbe40  r15: 0x000060000117c000
  rip: 0x00007fff2b20a8c3  rfl: 0x0000000000010202  cr2: 0x000000010ef72000
  
Logical CPU:     2
Error Code:      0x00000000
Trap Number:     6
@kode54
Copy link
Collaborator

kode54 commented Dec 11, 2022

I guess you'll have to use whatever really old version you were previously using, save the playlist to an .m3u, and then delete the sqlite file and import the M3U into the new version.

@mag01
Copy link
Author

mag01 commented Dec 11, 2022

Can you publish the last non-sandboxed build at your website?
It seems there are only sandboxed builds (and even for those, some downloads don't work).

@kode54
Copy link
Collaborator

kode54 commented Dec 11, 2022

Try 1148, the last build for Mountain Lion.

@kode54
Copy link
Collaborator

kode54 commented Dec 11, 2022

My bad. Use this version instead:

2275: https://cogcdn.cog.losno.co/Cog-0997ca2c.zip

@mag01
Copy link
Author

mag01 commented Dec 11, 2022

Thanks. I managed to get the playlist into the sandboxed build. Metadata is lost so I'll have to recover it via "Reload info" but the list is there at least.

@kode54
Copy link
Collaborator

kode54 commented Dec 11, 2022

The new version should be background loading the metadata all on its own when you've fully added the playlist. It will take a while, depending on your storage. Observe the status bar for progress information.

Well, and you'll need to add Sandbox paths for any root folders you've included in the playlist, otherwise the info load will just fail.

@mag01
Copy link
Author

mag01 commented Dec 11, 2022

I didn't see that happening initially so I initiated it manually.
It looks like it could be the sandbox restrictions issue because at the time of the 1st playlist loading the app didn't have any paths permitted yet - and thus it probably failed.
Now I tried the whole playlist import again (e.g. when those paths are allowed) and yes - then it worked.

@mag01 mag01 closed this as completed Dec 14, 2022
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