Open kylehickinson opened 2 days ago
FWIW: I suspect the log warning ("...is trying to save an opaque image...") is not related to the crashes you're experiencing.
I happened across your issue report searching on that exact log text, which I'm seeing in a completely different app I'm writing. My app isn't crashing, but I do see the error message emitted any time UIImage's .jpegData(compressionQuality:)
method is called to create a JPEG image from a bitmap. It's probably just log noise new in iOS 18.2. Good luck with your debugging!
A new crash has appeared only for users currently using iOS 18.2 (which is in beta currently), the main stack trace lists the crashing function as
vFlatten_RGBA8888_GV_vec
on a background thread which is not called directly by Brave and there isn't other useful information about whats happening in the app at the time.There is one possible clue which is that with the latest Xcode we've seen warnings in the logs while debugging the app:
writeImageAtIndex:1012: :o:️ ERROR: 'Client' is trying to save an opaque image (1179x1965) with 'AlphaPremulLast'. This would unnecessarily increase the file size and will double (!!!) the required memory when decoding the image --> ignoring alpha.
Its possible that this "ignoring alpha" path in iOS calls to this vFlatten method and crashes
Crash Log
``` Incident Identifier: 9FD51F4F-9618-43B7-B18F-76337357685D Distributor ID: com.apple.AppStore Hardware Model: iPhone14,2 Process: Client [21213] Path: /private/var/containers/Bundle/Application/6C0E1386-3D44-4F7D-80D6-72BC4EDB14F2/Client.app/Client Identifier: com.brave.ios.browser Version: 1.71 (125) AppStoreTools: 16B39 AppVariant: 1:iPhone14,2:18 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.brave.ios.browser [2591] Date/Time: 2024-11-12 14:57:53.0757 +0100 Launch Time: 2024-11-12 14:57:19.4222 +0100 OS Version: iPhone OS 18.2 (22C5125e) Release Type: Beta Baseband Version: 4.20.01 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000127d10000 Exception Codes: 0x0000000000000001, 0x0000000127d10000 VM Region Info: 0x127d10000 is not in any region. Bytes after previous region: 25329665 Bytes before following region: 52461568 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL mapped file 126104000-1264e8000 [ 3984K] r--/rw- SM=COW Object_id=1ceb3700 ---> GAP OF 0x4a30000 BYTES mapped file 12af18000-12b9c8000 [ 10.7M] r--/r-- SM=ALI Object_id=64c632d0 Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [21213] Triggered by Thread: 3 Thread 0: 0 libsystem_kernel.dylib 0x00000001e1f55c7c pread + 8 1 libsqlite3.dylib 0x00000001bea763ec seekAndRead + 96 (sqlite3.c:44033) 2 libsqlite3.dylib 0x00000001be9ec338 unixRead + 208 (sqlite3.c:44125) 3 libsqlite3.dylib 0x00000001be9ff434 readDbPage + 180 (sqlite3.c:66910) 4 libsqlite3.dylib 0x00000001bea8051c getPageNormal + 548 (sqlite3.c:69519) 5 libsqlite3.dylib 0x00000001bea40f04 accessPayload + 564 (sqlite3.c:82042) 6 libsqlite3.dylib 0x00000001bea88d90 vdbeColumnFromOverflow + 628 (sqlite3.c:100728) 7 libsqlite3.dylib 0x00000001bea1a23c sqlite3VdbeExec + 37564 (sqlite3.c:103156) 8 libsqlite3.dylib 0x00000001bea106c0 sqlite3_step + 960 (sqlite3.c:97886) 9 CoreData 0x0000000197c05e14 _execute + 128 (NSSQLiteConnection.m:4597) 10 CoreData 0x0000000197c183a8 -[NSSQLiteConnection execute] + 1816 (NSSQLiteConnection.m:5071) 11 CoreData 0x0000000197c42030 newFetchedRowsForFetchPlan_MT + 500 (NSSQLPerformanceDefinitions.m:2693) 12 CoreData 0x0000000197c7adf4 _executeFetchRequest + 56 (NSSQLCore_Functions.m:5452) 13 CoreData 0x0000000197c417bc -[NSSQLFetchRequestContext executeRequestCore:] + 36 (NSSQLFetchRequestContext.m:533) 14 CoreData 0x0000000197c6663c -[NSSQLStoreRequestContext executeRequestUsingConnection:] + 240 (NSSQLStoreRequestContext.m:183) 15 CoreData 0x0000000197c66364 __52-[NSSQLDefaultConnectionManager handleStoreRequest:]_block_invoke + 60 (NSSQLConnectionManager.m:307) 16 CoreData 0x0000000197c6629c __37-[NSSQLiteConnection performAndWait:]_block_invoke + 48 (NSSQLiteConnection.m:743) 17 libdispatch.dylib 0x00000001979c3fa8 _dispatch_client_callout + 20 (object.m:576) 18 libdispatch.dylib 0x00000001979d37fc _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1104) 19 CoreData 0x0000000197c20e80 -[NSSQLiteConnection performAndWait:] + 176 (NSSQLiteConnection.m:740) 20 CoreData 0x0000000197c20d44 -[NSSQLDefaultConnectionManager handleStoreRequest:] + 248 (NSSQLConnectionManager.m:302) 21 CoreData 0x0000000197c20c14 -[NSSQLCoreDispatchManager routeStoreRequest:] + 228 (NSSQLCoreDispatchManager.m:60) 22 CoreData 0x0000000197c20a18 -[NSSQLCore dispatchRequest:withRetries:] + 172 (NSSQLCore.m:4044) 23 CoreData 0x0000000197c3a6c0 -[NSSQLCore executeRequest:withContext:error:] + 3744 (NSSQLCore.m:2995) 24 CoreData 0x0000000197c73ff4 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke.547 + 4232 (NSPersistentStoreCoordinator.m:3030) 25 CoreData 0x0000000197c41918 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 264 (NSPersistentStoreCoordinator.m:662) 26 CoreData 0x0000000197c49fe4 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1200 (NSPersistentStoreCoordinator.m:2804) 27 CoreData 0x0000000197c129e8 -[NSManagedObjectContext executeFetchRequest:error:] + 700 (NSManagedObjectContext.m:2234) 28 CoreData 0x0000000197c7b618 -[NSManagedObjectContext executeRequest:error:] + 316 (NSManagedObjectContext.m:1936) 29 CoreData 0x0000000197c7b404 NSManagedObjectContext.fetch(_:) + 84 (NSManagedObjectContext.swift:21) 30 Client 0x0000000100872e28 specialized static Readable.all(where:sortDescriptors:fetchLimit:fetchBatchSize:context:) + 264 31 Client 0x000000010089cb20 static RecentlyClosed.all() + 244 (RecentlyClosed.swift:48) 32 Client 0x000000010037b3f4 BrowserViewController.updateToolbarUsingTabManager(_:) + 3784 (BVC+TabManagerDelegate.swift:405) 33 Client 0x00000001003b9594 specialized BrowserViewController.webView(_:didFinish:) + 1944 (BVC+WKNavigationDelegate.swift:1085) 34 Client 0x00000001003ace58 BrowserViewController.webView(_:didFinish:) + 12 (/