Post

Replies

Boosts

Views

Activity

My iOS app that I created since 2011, crashes on M4 machine (M1 is fine!)
A user gave me the crash log on his M4 machine when he first launches the app. I have M1 and my app works fine, which begs the question, why M4 has the crash! This is my app the I developed since 2011 until now. Any hints will be appreciated or anyone has similar issues like to share? ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Incident Identifier: DA1CEECB-28D4-40A9-8F0C-7125812084F4 CrashReporter Key: FB8A5DBB-7140-D370-AC72-EC158266383C Hardware Model: Mac16,3 Process: Stocks Live [5506] Path: /private/var/folders/*/Stocks Live.app/Stocks Live Identifier: com.cinnamonmobile.StocksLive Version: 34.2 (34.2.0) AppStoreTools: 16B39 AppVariant: 1:MacFamily20,1:18 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.cinnamonmobile.StocksLive [2018] Date/Time: 2024-11-27 12:41:48.0456 -0500 Launch Time: 2024-11-27 12:41:47.5710 -0500 OS Version: macOS 15.1.1 (24B2091) Release Type: User Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Subtype: KERN_MEMORY_ERROR at 0x0000000120034000 Exception Codes: 0x000000000000000a, 0x0000000120034000 VM Region Info: 0x120034000 is in 0x120034000-0x120038000; bytes after start: 0 bytes before end: 16383 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL CoreAnimation 120030000-120034000 [ 16K] rw-/rwx SM=PRV ---> mapped file 120034000-120038000 [ 16K] r--/rw- SM=COW Object_id=14630bfe CoreAnimation 120038000-12003c000 [ 16K] r--/r-- SM=PRV Termination Reason: SIGNAL 10 Bus error: 10 Terminating Process: exc handler [5506] Triggered by Thread: 0 Kernel Triage: decmpfs - (arg = 0x80000001) compressor is not registered APFS - (arg = 0x200040) Pagein of compressed inode failed VM - (arg = 0x190000002d) Filesystem pagein returned an error in vnode_pagein VM - (arg = 0x0) Page has error bit set Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 CoreFoundation 0x18803f48c __CFStringCreateImmutableFunnel3 + 716 1 FincancialCoreFrameWork 0x10358d3c4 -[MOStringDocument loadFromContents:ofType:error:] + 156 2 UIKitCore 0x1ba34a67c __32-[UIDocument readFromURL:error:]_block_invoke + 104 3 libdispatch.dylib 0x187e20658 _dispatch_client_callout + 20 4 libdispatch.dylib 0x187e2fdb0 _dispatch_async_and_wait_invoke + 92 5 libdispatch.dylib 0x187e20658 _dispatch_client_callout + 20 6 libdispatch.dylib 0x187e2ef68 _dispatch_main_queue_drain + 980 7 libdispatch.dylib 0x187e2eb84 _dispatch_main_queue_callback_4CF + 44 8 CoreFoundation 0x1880f8e60 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 9 CoreFoundation 0x1880b8a4c __CFRunLoopRun + 1996 10 CoreFoundation 0x1880b7bc4 CFRunLoopRunSpecific + 588 11 HIToolbox 0x193529f64 RunCurrentEventLoopInMode + 292 12 HIToolbox 0x19352fd54 ReceiveNextEventCommon + 636 13 HIToolbox 0x19352feb8 _BlockUntilNextEventMatchingListInModeWithFilter + 76 14 AppKit 0x18bbe398c _DPSNextEvent + 660 15 AppKit 0x18c523ddc -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688 16 AppKit 0x18bbd6a64 -[NSApplication run] + 480 17 AppKit 0x18bbad2e8 NSApplicationMain + 888 18 AppKit 0x18bdfb7f4 _NSApplicationMainWithInfoDictionary + 24 19 UIKitMacHelper 0x1a28f8b38 UINSApplicationMain + 972 20 UIKitCore 0x1b99de3a8 UIApplicationMain + 148 21 Stocks Live 0x102bcc058 0x102bc4000 + 32856 22 dyld 0x187c50274 start + 2840 Thread 1:: Dispatch queue: UIDocument File Access 0 libsystem_kernel.dylib 0x187f93b8c __ulock_wait + 8 1 libdispatch.dylib 0x187e21048 _dlock_wait + 56 2 libdispatch.dylib 0x187e20dfc _dispatch_thread_event_wait_slow + 56 3 libdispatch.dylib 0x187e2ffc4 __DISPATCH_WAIT_FOR_QUEUE__ + 368 4 libdispatch.dylib 0x187e2fb70 _dispatch_sync_f_slow + 148 5 UIKitCore 0x1ba351384 -[UIDocument(UIDocumentInternal) _performBlock:synchronouslyOnQueue:] + 76 6 UIKitCore 0x1ba347ff0 __40-[UIDocument openWithCompletionHandler:]_block_invoke + 588 7 libdispatch.dylib 0x187e1e8f8 _dispatch_call_block_and_release + 32 8 libdispatch.dylib 0x187e20658 _dispatch_client_callout + 20 9 libdispatch.dylib 0x187e27c60 _dispatch_lane_serial_drain + 744 10 libdispatch.dylib 0x187e28768 _dispatch_lane_invoke + 380 11 libdispatch.dylib 0x187e337e8 _dispatch_root_queue_drain_deferred_wlh + 288 12 libdispatch.dylib 0x187e33034 _dispatch_workloop_worker_thread + 540 13 libsystem_pthread.dylib 0x187fcf3d8 _pthread_wqthread + 288 14 libsystem_pthread.dylib 0x187fce0f0 start_wqthread + 8 Thread 2: 0 libsystem_pthread.dylib 0x187fce0e8 start_wqthread + 0 Thread 3: 0 libsystem_pthread.dylib 0x187fce0e8 start_wqthread + 0
3
0
275
Nov ’24
Gradient rendering issue with alpha set to something other than one
Gradients with colors that have alpha are not rendered correctly anymore. I made a simple project to illustrate that. Just create Objective C project and paste this code inside the ViewController. `#import <UIKit/UIKit.h> @interface CustomView : UIView @property (nonatomic, strong) NSArray<NSNumber *> *colorsArray; // The color components array // Custom initializer that accepts an NSArray of color components (instancetype)initWithFrame:(CGRect)frame colors:(NSArray<NSNumber *> *)colorsArray; @end @implementation CustomView // Custom initializer (instancetype)initWithFrame:(CGRect)frame colors:(NSArray<NSNumber *> *)colorsArray { self = [super initWithFrame:frame]; if (self) { _colorsArray = colorsArray; // Store the colors array } return self; } (void)drawRect:(CGRect)rect { // Get the current context CGContextRef context = UIGraphicsGetCurrentContext(); // Convert NSArray to a C-style array of CGFloats size_t count = self.colorsArray.count; CGFloat colors[count]; for (size_t i = 0; i < count; i++) { colors[i] = [self.colorsArray[i] floatValue]; } // Create a color space CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); // Create the gradient with the passed colors CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, colors, NULL, count / 4); // Define the start and end points of the gradient CGPoint startPoint = CGPointMake(rect.origin.x, rect.origin.y); CGPoint endPoint = CGPointMake(rect.origin.x, rect.origin.y + rect.size.height); // Draw the rectangle with the gradient CGContextSaveGState(context); CGContextAddRect(context, rect); CGContextClip(context); CGContextDrawLinearGradient(context, gradient, startPoint, endPoint, 0); CGContextRestoreGState(context); // Release resources CGGradientRelease(gradient); CGColorSpaceRelease(colorSpace); } @end @interface ViewController : UIViewController @end @implementation ViewController (void)viewDidLoad { [super viewDidLoad]; // Get the screen bounds CGRect screenBounds = [UIScreen mainScreen].bounds; // Define the size of each custom view CGFloat customViewWidth = screenBounds.size.width * 0.75; CGFloat customViewHeight = screenBounds.size.height * 0.75; // Define a dynamic set of colors for the first custom view (red to blue) NSArray<NSNumber *> *colorsArray1 = @[ @1.0, @0.0, @0.0, @1.0, // Red @0.0, @0.0, @1.0, @1.0 // Blue ]; // TODO: This is the bug, there is no transparency NSNumber *alpha = @0.0;// this is the ***** bug **** // Define a dynamic set of colors for the second custom view (green to yellow) NSArray<NSNumber *> *colorsArray2 = @[ @0.0, @1.0, @0.0, alpha, // Green @1.0, @1.0, @0.0, @1.0 // Yellow ]; // Calculate the position for the first view (centered horizontally and vertically, with slight offset) CGRect frame1 = CGRectMake((screenBounds.size.width - customViewWidth) / 2 - customViewWidth * 0.25, (screenBounds.size.height - customViewHeight) / 2 - customViewHeight * 0.25, customViewWidth, customViewHeight); CustomView *customView1 = [[CustomView alloc] initWithFrame:frame1 colors:colorsArray1]; // Calculate the position for the second view (slightly shifted from the first view to partially overlap) CGRect frame2 = CGRectMake((screenBounds.size.width - customViewWidth) / 2 + customViewWidth * 0.25, (screenBounds.size.height - customViewHeight) / 2 + customViewHeight * 0.25, customViewWidth, customViewHeight); CustomView *customView2 = [[CustomView alloc] initWithFrame:frame2 colors:colorsArray2]; // Set autoresizing so they adjust with the screen size customView1.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; customView2.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; // Add the custom views to the view controller's view [self.view addSubview:customView1]; [self.view addSubview:customView2]; } @end`
3
0
282
Oct ’24
Xcode 11.3 running on Mac 10.14.6 (18G95) can't compile on devices
My project is huge and I started getting compilation errors all of a sudden on devices (compiling for simulators are fine). So I made a new empty project with one line of code that compiles fine on the simulator but can't on the device. Here is the code:- (void)viewDidLoad { [super viewDidLoad]; // This line compiles fine on simulator but not on device. float s = roundf(233.33); } Error is:- Implicitly declaring library function 'roundf' with type 'float (float)'
0
0
492
Jul ’20