Explore the core architecture of the operating system, including the kernel, memory management, and process scheduling.

Post

Replies

Boosts

Views

Activity

Unreal engine project on iOS crashing on open
Hi there, I have just recently had a go at trying to build an app using unreal engine. After much difficulty of finally getting the app to sign, build and deploy I am having issues with the app crashing immediately after opening it. I have had a look at the crash log to find it including EXC_BAD_ACCESS (SIGSEGV) which I've come to understand means it may be accessing a value that doesn't exist. I was unable to understand or figure out any of the rest of it to find any clues on how to solve my issue. If anyone could point me in the right direction as to why the app is crashing, it would be greatly appreciated. crash log
0
0
37
13h
Screen Sleep Issue When Removing Vision Pro
Hello VisionOS Developer Community, I am currently working on a demo application for VisionOS, tailored for the Vision Pro. In my application, I have implemented a feature to prevent the screen from sleeping using the following code: UIApplication.shared.isIdleTimerDisabled = true This works perfectly on iOS, ensuring the screen remains active regardless of other system settings. However, I've run into a snag with VisionOS. Even with isIdleTimerDisabled set to true, the screen still sleeps when I take off the Vision Pro.
0
0
24
1d
Screen Sleep Issue When Removing Vision Pro
Hello VisionOS Developer Community, I am currently working on a demo application for VisionOS, tailored for the Vision Pro. In my application, I have implemented a feature to prevent the screen from sleeping using the following code: UIApplication.shared.isIdleTimerDisabled = true This works perfectly on iOS, ensuring the screen remains active regardless of other system settings. However, I've run into a snag with VisionOS. Even with isIdleTimerDisabled set to true, the screen still sleeps when I take off the Vision Pro.
0
0
18
1d
Problem with event tap permission in Sequoia
I have a Mac app with a background-only helper app that needs to have Accessibility permission in order to use an event tap that can modify events. This has worked OK through Sonoma, but in the Sequoia beta it is failing to create the tap. C code to test the ability to create the event tap: static CGEventRef _Nullable DummyTap(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *userInfo) { return NULL; } static bool CanFilterEvents( void ) { CFMachPortRef thePort = CGEventTapCreate( kCGSessionEventTap, kCGTailAppendEventTap, kCGEventTapOptionDefault, // active filter, not passive listener CGEventMaskBit(kCGEventKeyDown), DummyTap, NULL ); bool madeTap = (thePort != NULL); if (madeTap) { CFMachPortInvalidate( thePort ); CFRelease( thePort ); } return madeTap; } So, on Sequoia, CanFilterEvents returns false in spite of Accessibility permission being granted in System Settings. CGPreflightPostEventAccess also returns false, but AXIsProcessTrusted returns true. I tried making a non-background-only test app, and when that has Accessibility permission, CanFilterEvents, CGPreflightPostEventAccess, and AXIsProcessTrusted all return true. Suggestions on what to try next?
0
0
44
1d
Does SystemMemoryReset related to my Application abnormal exit?
Hello, we are currently developing a VPN application. Recently, we have encountered several cases where the Network Extension process terminates unexpectedly. We cannot find any related crash logs on the device, but we can find system SystemMemoryReset logs. The timestamps in these logs closely match (with millisecond accuracy) the times when our VPN process terminated unexpectedly. We have a few questions: 1.How is the SystemMemoryReset event generated, and can this event be avoided? 2.When a SystemMemoryReset occurs, can it cause our VPN background process to be killed or the system to reboot? 3.If the background process can be killed, what conditions need to be met for this to happen, and what methods can we use to prevent the VPN background process from being killed? 4.Based on these logs, does our application have any related issues (the process name is CorplinkTunnel)? Do you have any suggestions for modifications? SystemMemoryReset-2024-06-25-232108.log SystemMemoryReset-2024-06-29-025353.log SystemMemoryReset-2024-07-01-024655.log
1
0
48
1d
URL links to default Apps
So I find that I am able to fire up Safari on my phone and I can type the following to get to the relative app: weather:// -> Weather App maps:// -> Maps App wallet:// -> Wallet App music:// -> Music App message:// -> Mail App messages:// -> Messages App Does anyone know a quick link like the ones above for Apple's Translate app? I would love to be able to easily open it via a link.
4
0
51
4d
Memory leak in ARC conversion, KVO involved
I'm trying to do a piecemeal conversion of a big macOS Objective-C++ code base to use Automatic Reference Counting (ARC), and started with a fairly complex modal dialog. I converted all the classes involved to use ARC. When the dialog closes, the window itself, and some of the controller objects, get deallocated as they should, but some do not. When I look at the memory debugging graph in Xcode, I see a bunch of things of the form NSKVONotifying_MyClassName. Here's an example: It does not look as though any of my objects have strong references to GRMorphController, so what am I to make of this?
2
0
105
4d
BLE Background mode for secure printing
Hi, We are developing an app for secure printing using a BLE RFID reader. What we'd like to accomplish is the ability for a user to walk away from the printer (BLE RFID reader) for any time period (10 mins, 1 hour, or 3 hours) with the app still running background mode but out of range from the RFID reader, and walks back to the printer (BLE RFID reader) and be able to connect to the reader thus enabling printing. We've noticed that when the phone is out of range from the BLE reader and phone auto-locks, the background scanning process is terminated after a few minutes. Is there a way to accomplish the above? Any help is appreciated. Thank you, Marlon
1
0
70
4d
Sequoia Group Container for Mac Catalyst Apps
Prior to Sequoia, Mac Catalyst Apps worked fine when using group folders that started with group. They now get an alert that the Mac Catalyst app is trying to access data from other applications. This may also impact some SwiftUI developers. According to this the documentation for the App Group Entitlements entitlement, on macOS we should begin use the Team Identifier instead of group. Should Mac Catalyst follow the macOS or iOS rules for com.apple.security.application-groups? If they should need to follow the macOS rules now, that creates several issues for developers. We would now need separate build targets to pick up the different Entitlements files. More distressing is that we would need to do some kind of migration process to get our files to the new location. There wouldn't be a transparent way to do so where the user wasn't warned about the application accessing files that don't belong to it. Any clarification on what Mac Catalyst developers should be doing to prepare for Sequoia would be greatly appreciated.
0
0
65
4d
Virtual serial ports
Hello, I want to add virtual serial ports to a macOS VM (host = Sonoma, guest = Sonoma). Here is what I tried so far: option 1 I create a VZVirtioConsoleDeviceConfiguration and I add a port to it, with a VZFileHandleSerialPortAttachment connected to two pipes: let consoleDeviceConfiguration = VZVirtioConsoleDeviceConfiguration() let guestPort = VZVirtioConsolePortConfiguration() guestPort.isConsole = false guestPort.name = "myserialport" let guestToHostPipe = Pipe() let hostToGuestPipe = Pipe() guestPort.attachment = VZFileHandleSerialPortAttachment( fileHandleForReading: hostToGuestPipe.fileHandleForReading, fileHandleForWriting: guestToHostPipe.fileHandleForWriting ) consoleDeviceConfiguration.ports[0] = guestPort // config is my VZVirtualMachineConfiguration config.consoleDevices = [consoleDeviceConfiguration] Then after the VZVirtualMachine is instantiated, I get the runtime VZVirtioConsoleDevice for my device and I set my service as its delegate. In the guest system, the device is created with the expected name (/dev/cu.myserialport) When I open it (e.g. screen /dev/cu.myserialport 9600), the consoleDevice(_:,didOpen:) delegate method is called as expected. Then I start sending data to hostToGuestPipe.fileHandleForWriting, but I get nothing in my guest system. option 2 Instead of using config.consoleDevices, I add a VZVirtioConsoleDeviceSerialPortConfiguration to config.serialPorts and I use the same scheme as above with a VZFileHandleSerialPortAttachment and two pipes. It works, but: I can't find a way to rename the devices (/dev/cu.virtio, /dev/cu.virtio1, etc) I can't detect when the endpoint is opened/closed. Am I missing something?
0
0
75
4d
iMac stuck on checking null
On any update, regardless if it’s Mojave or high sierra or catalina many Apple iMac owners were having issues with this- “iMac is stuck on Checking null, it won’t go any further. How do I fix this?”. I spoke to 4 representatives and no Apple representative could help with my issue. So here is a 100% solution. back up your iMac if you don’t want to lose anything. hold the power button until your iMac turns off ouch the power button and let go immediately and push and hold “COMMAND” and “R” until your utilities pop up. Erase and reinstall a new versio of your current macOS update. Let this finish and DO NOT sign into your Apple ID now. Accept the terms and cond and follow all the steps. Once you are in the computer you can sign in. now you may update your iMac to whichever update.
1
0
71
4d
UIDocument related hang in OS code
Hi A user of my app has contacted me about a crash they’re getting. They’ve sent me some logs (see attached) but I’m having difficulty working out what the cause is as it looks like it’s a watchdog timeout that’s occurring inside OS code, not my application. I also can’t reproduce the crash locally. App background info: The app logs peoples skydives, each log can contain a lot of data (rotation rates, acceleration, location, speeds, etc) and is stored in a separate file. These files can be stored in an iCloud container so the logs can be viewed from different devices. I use CoreData to maintain a database of key metadata so I can list the jumps in the UI even if the file for a jump isn’t on the device. Occasionally I have to delete this database and rebuild it by loading each jump log file and getting a fresh copy of the metadata. EG this can happen if a new version of the app requires an additional metadata field in the database. Crash info: The crash looks like it’s happening rebuilding the database, so the app will be trying to download and open each jump log and add the records to the database. I’ve noticed the following odd things about the crash log, which might be a good place to start: There’s a huge number of threads in the “”UIDocument File Access” dispatch queue that are blocked It looks like there's exactly 512 threads blocked in this queue. Which makes me think its hitting a limit. Any idea why they are blocked? I don’t know why there are so many, The database rebuild is done from an operation queue with a max concurrency of 10. So I would expect at most 10 jump logs to be being opened at one time There seams to be two common stack trace patterns. Eg compare thread 1 and thread 5 in crash log 1. In both crash logs the main thread is blocked, but in different bits of OS code in the two crash logs. It looks like this is the cause of the watchdog failure, but I’m not sure what the common cause could be. Any ideas / help would be really appreciated. Thanks Tom NOTE: I had to cut down the crash logs so they were small enough to upload. Crash log 1 small.txt Crash log 2 small.txt
0
0
58
4d
Trigger data transfer from watchOS when connectivity is restored
Hello, I have an iOS app and a companion watchOS app. Users record a workout on Apple Watch, the data for which is then transferred using both Watch Connectivity and Core Data + CloudKit (NSPersistentCloudKitContainer) to their iPhone, where it is processed and displayed. As users are recording the workout on their Apple Watch, when they finish and the transfer begins, their iPhone is often not reachable to immediately send the data using Watch Connectivity and they have no network connection (cellular or Wi-Fi). With Watch Connectivity I use transferFile from WCSession, which queues the file for transfer. With Core Data + Cloudkit I save the data and the export is queued. An undetermined amount of time may pass until the user returns to their iPhone or connects to Wi-Fi and most of the time neither of the transfer methods actually transfers the data until the user opens the watchOS app into the foreground, at which point the transfer happens immediately for both methods. I've tried a number of things already, without success, such as: Using sendMessage from WCSession to send an immediate message to the watchOS app when the iOS app returns to the foreground to try and wake the watchOS app up so it can complete the data transfer. On the watchOS app, after attempting to transfer the data, using downloadTask from URLSession to queue a background task to download something, in the hope that it would wake the watchOS app when network connectivity was restored and enable it to complete the data transfer. On the watchOS app, instead of saving the data using NSPersistentCloudKitContainer, using CKRecord and CKDatabase directly to save the data using userInitiated as the quality of service, in the hope that it would be exported once network connectivity was restored. Is there a way to trigger the watchOS app to transfer the data using Watch Connectivity or Core Data + CloudKit in the background when reachabillity or network connectivity is restored, even if the app may have been suspended by watchOS? Many Thanks, Alex
1
0
91
4d
Missing Developer Kit Error(Code=34)
sudo kmutil create -n boot -B /usr/share/file/magic/kernelcache -k /Library/Extensions Error Domain=KMErrorDomain Code=34 "Missing Developer Kit: As of macOS 13.0, you will need to install a KDK matching your build 23F79 to rebuild kernel collections." UserInfo={NSLocalizedDescription=Missing Developer Kit: As of macOS 13.0, you will need to install a KDK matching your build 23F79 to rebuild kernel collections.} I'm using KDK 14.5(23F5074a) on macOS 14.5(23F79), and trying to build kernel collection. It seems the kernel debug kit for macOS 14.5(23F79) is not supported. Is there any replacement for macOS 14.5(23F79)?
0
0
76
5d
Screen Time crash issue in iOS 18 Beta 2
Hi Apple The screen time issue is still going on in iOS 18 Beta 2. I have submitted my report in feedback but there is no response yet. There is no other way of accessing the screen time settings. It just crashes. If I try to go to the locked out app, the only option that actually works is the OK button. You can’t dismiss or extend for 15 minutes. Whoever going through this issue please report in feedback
1
3
207
5d
Cannot boot MacOS after booting Windows on an external drive.
I recently installed Windows on an external SSD using my MB Pro. I can perfectly boot into Windows, but every time I try to boot into MacOS it doesn’t work. I type in my password, the bar loads about 1/15th of the way and then freezes just before the screen goes black. I tried booting into MacOS directly from Windows, from the holding the “option” key and choosing MacintoshHD, and from the recovery screen. I kinda want to be able to switch between these two OS easily without losing all by data, so any suggestions?
1
0
77
5d
AirPod sound
I hate that when I turn my head I moves the sound toward facing forward. When I turn my head I want the sound to be the same. I understand why you did it but make it a feature you can turn off #betauser
0
0
63
5d
iOS 16 Crash (EXC_BAD_ACCESS (KERN_INVALID_ADDRESS))
I have a project with 2-5k daily online users, but have only 5 users that have this crashes. They all have iOS 16 installed Attached logs from FireBase First Log: Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x1c20 objc_msgSend + 32 1 UIKitCore 0x9bd754 -[UIView _backing_traitCollectionDidChange:] + 64 2 UIKitCore 0x169754 -[UIView _traitCollectionDidChangeInternal:] + 628 3 UIKitCore 0x1692b4 -[UIView _wrappedProcessTraitCollectionDidChange:forceNotification:] + 156 4 UIKitCore 0x169424 -[UIView _wrappedProcessTraitCollectionDidChange:forceNotification:] + 524 5 UIKitCore 0x927e8 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 96 6 UIKitCore 0x90cac -[UIView _processDidChangeRecursivelyFromOldTraits:toCurrentTraits:forceNotification:] + 212 7 UIKitCore 0x43d0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1732 8 QuartzCore 0x97fc CA::Layer::layout_if_needed(CA::Transaction*) + 500 9 QuartzCore 0x1ceb0 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 148 10 QuartzCore 0x2e234 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 444 11 QuartzCore 0x63630 CA::Transaction::commit() + 652 12 UIKitCore 0x3c49c4 -[_UISceneLifecycleMultiplexer collectBackingStores] + 28 13 UIKitCore 0x3c4988 __35-[UIWindowScene _prepareForSuspend]_block_invoke + 40 14 UIKitCore 0x3026dc -[_UIContextBinder purgeContextsWithPurgeAction:afterPurgeAction:] + 388 15 UIKitCore 0x21053c -[UIWindowScene _prepareForSuspend] + 80 16 UIKitCore 0x20ebb8 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 752 17 UIKitCore 0x20e810 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244 18 UIKitCore 0x20e650 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 336 19 FrontBoardServices 0x366c -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 420 20 FrontBoardServices 0x34a8 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 144 21 FrontBoardServices 0x6c24 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168 22 FrontBoardServices 0x6b40 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 340 23 libdispatch.dylib 0x3f88 _dispatch_client_callout + 20 24 libdispatch.dylib 0x7a08 _dispatch_block_invoke_direct + 264 25 FrontBoardServices 0x10d40 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 52 26 FrontBoardServices 0x108dc -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 27 FrontBoardServices 0x13184 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 28 CoreFoundation 0xd5f24 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 29 CoreFoundation 0xe22fc __CFRunLoopDoSource0 + 176 30 CoreFoundation 0x661c0 __CFRunLoopDoSources0 + 244 31 CoreFoundation 0x7bb7c __CFRunLoopRun + 836 32 CoreFoundation 0x80eb0 CFRunLoopRunSpecific + 612 33 GraphicsServices 0x1368 GSEventRunModal + 164 34 UIKitCore 0x3a1668 -[UIApplication _run] + 888 35 UIKitCore 0x3a12cc UIApplicationMain + 340 36 Vostok 0x1e36ec main + 10 (main.swift:10) 37 ??? 0x1ac74c960 (Missing) All this crashed happened on background Can't reproduce on own iPhone, because haven't 16 iOS
0
0
51
6d