System Restart Upon Building in Xcode 11 - ios

I'm a beginner Swift developer and this is my first question in Stack Overflow. I've been working on an iOS SpriteKit game in Swift 5, Xcode 11 (updated from Xcode 10.3 as of a week ago). Aside increasing build times over the past few months, everything has been running smoothly.
About a week ago, running my application on any device or simulator began crashing my computer, forcing a restart with a large '!' icon in the background behind text explaining "There was an issue", with a normal startup and login process following. I would receive a dialog explaining "MacBook Pro experienced an issue and had to restart" and I was offered to report the crash to Apple (which I did).
This first occurred when I tried to archive a version of my app. I did research and found that deleting the DerivedData folder from User/Library/Developer/Xcode and the xcuserdata folder from both the project file and the workspace file contents prevented the crash after cleaning the build folder.
Then the same issue arose when I attempted to run my application on my iPhone 8. This time, performing the steps above solved nothing. This time, I analyzed the program instead of running it, which worked. Then, after a day, analyzing caused the system restart. So did a ton of other methods I tried. Up until now, all of the following actions result in a system restart after about 3-5 minutes of starting:
Building and running
Archiving
Analyzing
Building for Testing
In addition, I've tried the above methods after deleting said folders and cleaning the build folder. I've also tried them on the simulators, physical devices, and the Generic iOS Device. Nothing seems to be working.
Below is the system log that occurred during the crash. It is the one that my computer offered to send to Apple. I replaced a portion of the output with [...] as Stack Overflow detected some parts as spam. Willing to provide if needed.
I'm running macOS Mojave 10.14.6 on a 2017 MacBookPro. The latest occurence of this error occurs in Xcode Version 11.0 (11A420a), yet the forced restart issue also arose in Xcode 10.3 and Xcode 11 GM Seed 2.
If additional information is needed, I'll be happy to provide it.
Anonymous UUID: 44******-****-****-****-**********92
Sat Sep 21 21:31:12 2019
*** Panic Report ***
mp_kdp_enter() timed-out on cpu 0, NMI-ing
mp_kdp_enter() NMI pending on cpus: 0 2
mp_kdp_enter() timed-out during locked wait after NMI;expected 4 acks but received 3 after 9361562 loops in 1548000000 ticks
panic(cpu 0 caller 0xffffff80009ecea8): "thread_call group 'high' reached max thread cap (500): active: 1, blocked: 499, idle: 0"#/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4903.271.2/osfmk/kern/thread_call.c:221
Backtrace (CPU 0), Frame : Return Address
[...]
BSD process name corresponding to current thread: kernel_task
Mac OS version:
18G95
Kernel version:
Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64
Kernel UUID: C41337A1-0EC3-3896-A954-A1F85E849D53
Kernel slide: 0x0000000000600000
Kernel text base: 0xffffff8000800000
__HIB text base: 0xffffff8000700000
System model name: MacBookPro14,2 (Mac-CAD6701F7CEA0921)
System uptime in nanoseconds: 5389100927958
last loaded kext at 4928689757019: com.apple.filesystems.msdosfs 1.10 (addr 0xffffff7f841db000, size 69632)
last unloaded kext at 305554353504: com.apple.filesystems.msdosfs 1.10 (addr 0xffffff7f841db000, size 61440)
loaded kexts:
com.Cycling74.driver.Soundflower 2
com.valvesoftware.SteamInput 3083.39.62
com.apple.filesystems.msdosfs 1.10
com.apple.fileutil 20.036.15
[...]
com.apple.kec.pthread 1
com.apple.kec.corecrypto 1.0
com.apple.kec.Libm 1
EOF
Model: MacBookPro14,2, BootROM 198.71.1.0.0, 2 processors, Intel Core i5, 3.1 GHz, 8 GB, SMC 2.44f1
Graphics: kHW_IntelIrisGraphics650Item, Intel Iris Plus Graphics 650, spdisplays_builtin
Memory Module: BANK 0/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445364533303445422D45474347202020
Memory Module: BANK 1/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445364533303445422D45474347202020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x171), Broadcom BCM43xx 1.0 (7.77.61.2 AirPortDriverBrcmNIC-1305.8)
Bluetooth: Version 6.0.14d3, 3 services, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.0 Bus
USB Device: Flash Disk
USB Device: Apple T1 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.1
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.1

It looks like I figured it out on my own. I'm going to post the solution here in case any other Xcode developers run into the same issue.
It seems as though the problem lies in the project's directory. Because the entire Xcode project was on a USB disk drive, build times were slowing and restarts were occurring. To fix the issue, I simply created a copy of my project on my computer's drive and ran the program. Everything worked just fine. In fact, build times were much faster.

Related

Object Capture Command Line not working for me

I am trying to make this to work but after building the command line app, I kept getting error when running https://developer.apple.com/documentation/realitykit/creating_a_photogrammetry_command-line_app
I am using MacBook-Air 2017 and Xcode 13.0 beta 4,
Example error:
2021-08-09 15:23:20.035254+0530 HelloPhotogrammetry[6390:70439] Metal API Validation Enabled
2021-08-09 15:23:23.280756+0530 HelloPhotogrammetry[6390:70439] [HelloPhotogrammetry] Error creating session: cantCreateSession("A GPU that is not in low power mode is required. https://developer.apple.com/documentation/metal/mtldevice/1433409-lowpower")
Program ended with exit code: 1
I am new to reality kit
Unfortunately only the newer Macs are compatible with the photogrammetry SDK.
It sounds like your Mac won't be as it's an Air from 2017. All M1 Macs are compatible and some of the more recent Intel Macs with boosted graphics.
You can see the minimal requierments at:
https://developer.apple.com/videos/play/wwdc2021/10076/ - 2:35
To sum it up, you need one of the following:
M1 Apple silicon computer
Intel x86_64 with 4GB AMD Graphics and 16GB Ram.
Either on of the two will work.
According to Apple documentation, Photogrammetry API supported only mac with following features.
All Apple Silicon Macs
Intel Mac's with 4GB AMD and 16GB RAM
So please make sure your mac is supported above conditions to run Photogrammetry API.

iOS App: React-Native <Image> loading stops loading after a period of time in App

We have built an iOS app using react-native and the react-native-tra k-player package along with the component. THe app was built successful and tested on the the iphpne 12 Max along with many other iphone models as the app is already available in the Apple Store under "Trop Rockit Radio". The app has an issue where after a period of time the component fails to load images into the app with a 'Netweork request failed' error. The app loads 1024x1024 pixel images every three or so minutes and is triggered whenever the react-native-track-player alerts that new metadata is received from our ShoutCast based radio station. Once the error occurred, we use the same device's webrrower to go to the web domain where the image database is held and the browser gets a 'Request timed out' error. This forces us to go into the iphone's setting and perform the 'Rest network settings' action. After the reset completes. everything starats working again for a while until the error occurs again.
Our image database comes from our website domain: rockitstudios.com and our music content from our ShoutCast provider.
Other symptoms include:
If we minimize the app, the music player part of the app stop playing too and the app's widgets are somewhat un-responsive.
When we built the app, we used the Xcode capability settings to enable backgroud audio, background pictures and backgroud processes so that the app works when minimized.
It almost seems that there is an iOS custodial monitoring process that is killing the Image loading process after being triggered by it, then the same custodial process seems to stop other active processes associated with the app. Is this the case? If so. how do we solve the proben?
This issue occurs for both the Cellular Data and the Wi-Fi networks, and occurs on multiple networks around the globe, so it is not limited to a single network at one location.
I'd be happy tp post code snippets of the area in question as necessary.
The same react-native app's code was also successfully built on the Android platform and does not have any issues it too is in the Google Play store under the same title.
our iOS development (react-native + Xcode) environment from react-native info):
IOS version 14.4
Xcode version 12.4
System:
OS: macOS 10.15.4
CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU # 2.60GHz
Memory: 481.24 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 15.5.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.5.2 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS
7.2
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: Not Found
Python: 2.7.16 - /usr/bin/python
npmPackages:
#react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: ^0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
UPDATE: We performed some more testing and troubleshooting. Given that most of our customers are using iOS 14.4 and recent iphones (iPhone 11 and 12). We let the app play until the image loading fails, then we used the iPnone's Safari brouwser to go to the domain where the image database fails, "https://rockitstudios.com" and the page stopped working and returned 'Reqest timed out' error. We also went to our other domains including: "https://nomps.com", "https", "https://rockitbroadcasting.com" and noticed all of these domains have the sme timeout issue. However, when going to sites like google.com, facebook.com. and other websites we have no request timeout issues. This tells us that we have a singe hosting service that is hosting all of our domain that is having the timeout issue on our hosting service. When performing the 'Reset Network Settings' in the iPhone's settings panel, all of these domains start working again and the App's image loading starts working. Is this an iOS 14.4 SSL/TSL issue? All of our domains have their SSL certificates in place. Any ideas on debugging this or has a known solution to this issue? Also, our Android apps do not have this issue. You can try the "Trop Rockit Radio" app in the Apple Store and see the issue first hand.
Had a similar issue in my React Native app. The app is pretty image heavy, and we could pretty consistently (but not all the time) reproduce a bug where the app successfully loaded ~100 network images but then all future image load requests would time out. You could sometimes make the app "snap out" of this state by toggling between WiFi/cellular, or backgrounding the app and returning. Quitting the app and restarting produced the same result again: about 100 images loaded and then nothing. iOS only - did not happen on Android.
After lots of digging the fix was server side: we disabled the HTTP/3 (with QUIC) setting on our Cloudflare instance.

Xcode 11.3 crashes on launch in macOS Catalina 10.15

I've updated my mac to Catalina 10.15 so I can install and work with the latest Xcode version. After installing the software from the App Store, when I click to start it, but it crashes and shows this error message:
Loading a plug-in failed: The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled.
I checked the console and I found:
Legacy client com.apple.dt.Xcode connecting to modern client. You can't mix modern clients with legacy clients. ClientConnect: 0x00007fedb3577170 identifier: com.apple.dt.Xcode pid: 773 type: Application>
And the System.log says:
Dec 20 00:38:08 MacBook-Pro com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.Xcode.837): Failed to bootstrap path: path = /Applications/Xcode.app/Contents/XPCServices/com.apple.dt.Xcode.SymbolicateXPCService.xpc, error = 129: The service was superseded by a later version
Dec 20 00:38:09 MacBook-Pro com.apple.xpc.launchd[1] (com.apple.AMPDeviceDiscoveryAgent): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Can you please tell me what's wrong? and how to solve that so I can run Xcode on my Mac?
Try to set the date of your Mac as October 1st, 2019.
After components has been installed, change the date to current again.

Getting Error Flashing Android Things with Starter Kit

I recently picked up an Android Things Kit at Google Developer Days India. I was trying to setup it up via my Mac. I downloaded the Android Things Setup Utility from the Android things console. I tried to run it and it started installing the firmware. It stopped saying "Exit Status 1". What am i doing wrong?
Android Things Setup Utility (version 1.0.16)
============================
This tool will help you install Android Things on your board and set up Wi-Fi.
What do you want to do?
1 - Install Android Things and optionally set up Wi-Fi
2 - Set up Wi-Fi on an existing Android Things device
1
What hardware are you using?
1 - Raspberry Pi 3
2 - NXP Pico i.MX7D
3 - NXP Pico i.MX6UL
2
You chose NXP Pico i.MX7D.
Looking for devices... This can take up to 3 minutes.
found device
Unzipping image...
Flashing Android Things. This will take a few minutes...
*Do not disconnect or interrupt!*
target reported max download size of 419430400 bytes
sending 'bootloader' (559 KB)...
OKAY [ 0.018s]
writing 'bootloader'...
OKAY [ 0.250s]
finished. total time: 0.268s
rebooting into bootloader...
OKAY [ 0.000s]
finished. total time: 0.000s
target reported max download size of 419430400 bytes
sending 'gpt' (33 KB)...
OKAY [ 0.004s]
writing 'gpt'...
OKAY [ 0.434s]
rebooting into bootloader...
OKAY [ 0.000s]
finished. total time: 0.439s
target reported max download size of 419430400 bytes
Error: error flashing android things: exit status 1
Stopping adb server...
Stopped adb server...
For my case, it is because MacOS does not provide mke2fs.
I found one in the unzipped image folder (android-things-setup-utility/quickstart-temp/unzipped/mke2fs).
And run mv android-things-setup-utility/quickstart-temp/unzipped/mke2fs /usr/local/bin
Hope this can help.

MonoDevelop fails when trying to debug on device

I'm trying to install the iOS app I'm developing on my device, but each time I try MonoDevelop crashes. First the CPU usage spikes and then it stops responding. It seems to be failing when the debugger tries to connect to the device. The application is installed on the device and I can use the app, but I need to see the application output.
I'm using the newest version of MonoDevelop and version 6.0.0 of MonoTouch. Are there any other users with the same experience who have solved this problem?
edit
this is the version information from monodevelop. I've had to treat it like code because else the stackoverflow editor would have made it unreadable.
MonoDevelop 3.1.1
Installation UUID: cf274ee7-dfe8-4ba8-b44c-2c7a0d9a45ab
Runtime:
Mono 2.10.9 (tarball)
GTK 2.24.10
GTK# (2.12.0.0)
Package version: 210090011
Apple Developer Tools:
Xcode 4.5.2 (1847)
Build 4G2008a
Monotouch: 6.0.6
Mono for Android: 4.4.55
Android SDK: /Users/.../Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.1 (API level 16)
4.2 (API level 17)
Java SDK: /usr
Xamarin.Mac: Not Installed
Build information:
Release ID: 30101000
Git revision: 5d928ec4f9d5864b4db04a1301b8a8649b43fb9d
Build date: 2012-12-14 19:11:30+0000
Xamarin addins: 80f2dcc8fe4ed316b3e77dde496fc33d90305047
Operating System:
Mac OS X 10.8.2
Darwin ---.local 12.2.0 Darwin Kernel Version 12.2.0
Sat Aug 25 00:48:52 PDT 2012
root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
I got that a lot in the past, while working with a library that wasn't available for the simulator. For me, it was (probably) related to usb link. What you should try:
Turn off itunes (that one is hard to do, you hear a lot of weird sounds around you when music is down)
Enable debugging over wifi (instead of USB) in monodevelop (Preferences>Debugger>iPhone Debugger)
It helped me, hope it'll help you
Not sure what the problem was in the end. OS X seemed to have gone corrupt and wouldn't even start properly any more. Besides the problems I had with MonoDevelop I also started having problems in different software. The solution was to do a full clean install of OS X. I have now been able to update MonoDevelop and MonoTouch and can once again debug apps on devices.
I'm sorry if my solution can't help any other people directly, but perhaps the answer Stephane Delcroix gave may help you!

Resources