Xcode 11 beta crashes when starting in Virtual machine - crash

i have just downloaded Xcode 11 beta and installed in a vm environment. When trying to start a new playground or project, xcode quits with following error code. Any idea how to solve ?
Process: Xcode [426]
Path: /Applications/Xcode-beta.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 11.0 (14855.18)
Build Info: IDEFrameworks-14855018000000000~13
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [426]
User ID: 501
Date/Time: 2019-06-08 08:13:37.785 -0700
OS Version: Mac OS X 10.14.5 (18F132)
Report Version: 12
Anonymous UUID: CB32DBDA-4F6E-4212-F810-C52C80FFD0CD
Link to full error:
https://pastebin.com/fFhcadtZ

This should probably be a comment, not an answer, but I lack the reputation to do so. Here is the xcode developer who developed the minimap indicating that while the minimap indeed does require metal, xcode should not crash when metal is not available. Hopefully he implements a patch to fail gracefully in one of the next builds. As of right now, there is no workaround. The reply to the thread:
defaults write http://com.apple .dt.Xcode DVTTextShowMinimap -bool NO
does not prevent the crash, as mentioned there.

It is fixed in XCode 11 beta 2, available on developer.apple.com !!!
June 17 2019.
You don't need MacOS Catalina, only Mojave 10.14.4 and up (current is 10.14.5).
I used VMware on Windows to install Mojave and XCode beta 2.

I attempted the same with Parallels (with tools installed), and also observed a crash. I suspect the problem is with the virtualization software lacking support for Metal. Notice the stack trace on the main thread:
0 com.apple.dt.SourceEditor 0x0000000120ccb5cb specialized
static MinimapMetalLinesLayer.defaultDevice() + 491 1
com.apple.dt.SourceEditor 0x0000000120cc959c
MinimapMetalLinesLayer.init() + 284
The "Minimap" is a new feature in Xcode 11, it's a birds eye view of the source code in a column on the right (similar to Sublime text edit). Also notice the mention of Metal, Apple's graphics API. To test this theory, I opened Xcode 10 (in the same VM) and attempted to build one of Apple's examples. I got the following error, which seems to confirm my suspicion that Parallels is unable to support apps using Metal.
2019-06-09 09:15:17.875253-0400 HelloTriangle[652:7547] *** Assertion
failure in -[AAPLViewController viewDidLoad],
/Users/ZestyMeta/Downloads/UsingARenderPipelineToRenderPrimitives/Application/AAPLViewController.m:27
2019-06-09 09:15:17.875403-0400 HelloTriangle[652:7547] Failed to set
(contentViewController) user defined inspected property on (NSWindow):
Metal is not supported on this device
I haven't attempted installing macOS Catalina / Xcode 11 in VirtualBox, VMWare, et al. but unless they support Metal then this crash will happen there as well. If you're testing out Catalina (which is required for SwiftUI on macOS), unfortunately it seems the solution at this time is to install on a spare device or dual boot.

Related

IntelliJ IDEA Ultimate is extremly slow on mac M1

I'm using Mac Air M1 and trying to run IntelliJ Ultimate.
I've read some issues on JetBrains YouTrack and it seems that a lot of people are pretty satisfied with their experience. So, I think something is wrong with my environment and I can't find out what
Steps I've done:
Rebooted my Mac
Invalidated Caches & Restarted IDE
Reinstalled IntelliJ
Deleted "Caches" and "Application Support/JetBrains" directories and then reinstalled IDE
Checked if I'm using a default Java Runtime version
Checked if I'm using Intel version of IDE
Disabled Antialiasing
Closed "heavy" apps like Google Chrome
Installed Atom Material Icons plugin
Downloaded prebuilt shared indexes
Modified .vmoptions and added
-Dsun.java2d.opengl=true
-Dsun.java2d.opengl.fbobject=false
Disabled Smooth scrolling
I'm not using external display, mac is connected to power outlet
Here is my environment:
IntelliJ:
IntelliJ IDEA 2022.1 (Ultimate Edition)
Build #IU-221.5080.210, built on April 12, 2022
Runtime version: 11.0.14.1+1-b2043.25 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.1
GC: G1 Young Generation, G1 Old Generation
Memory: 1024M
Cores: 8
Non-Bundled Plugins:
com.mallowigi (64.0.0)
Dart (221.5588)
io.flutter (66.0.4)
Kotlin: 221-1.6.20-release-285-IJ5080.210
Mac:
Model Name: MacBook Air
Chip: Apple M1
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 8 GB
OS: macOS Monterey Version 12.1
Related YouTrack topics
https://youtrack.jetbrains.com/issue/IDEA-268203
https://youtrack.jetbrains.com/issue/JBR-3237
https://youtrack.jetbrains.com/issue/JBR-2732
UPDATE #1:
Moved issue to JetBrains YouTrack: https://youtrack.jetbrains.com/issue/IDEA-293523/IntelliJ-IDEA-Ultimate-is-extremly-slow-on-mac-M1
You can see the memory usage of your application and increase it accordingly if required. In my case, it was slow because of low memory.
Enable the memory indicator by checking it (View -> Appearance -> Status Bar Widgets -> Memory Indicator). With this, now you can see memory usage details in the bottom right corner of your Intellij IDE.
Increase the memory if it's exhausted more than 80% of available memory by following: Click on Help -> Change Memory Settings -> <>)
Try EAP version of IntelliJ IDEA 2022.2, which runs on JBR 17 with Metal framework.
I had the same issue with same MBA.
I changed the runtime to OpenJDK 18 and now it is totally smooth :)
Help -> Find action -> Choose boot runtime for the IDE
I experimented with a few other JDKs, maybe Azul was the fastest.
Also, I have updated Xmx:
Help -> Edit Custom VM Options and updated to 2048m
To me, seems like the issue is resolved now or at least way better.
I download the M1 version for intellij ultimate and I have a incredible improve in performance.
BTW: I have a macbook pro 13' with 16gb ram and 1TB ssd
intellij environment
IntelliJ IDEA 2022.1.1 (Ultimate Edition)
Build #IU-221.5591.52, built on May 10, 2022
Licensed to ********************
Subscription is active until ********.
Runtime version: 11.0.14.1+1-b2043.45 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 1024M
Cores: 8
Registry:
*************
Non-Bundled Plugins:
monokai-pro (1.8.1)
com.vincentp.gruvbox-theme (0.5.4)
com.intellij.plugins.macoskeymap (221.5591.19)
com.github.rmatafonov.cucumber-scenarios-indexer (1.1.0)
com.github.chencn.yamlandprops (1.0.5)
net.lagerwey.cucumber-kotlin (2022.1.0)
dev.eltonsandre.intellij.spring.assistant.plugin (1.5.2)
Kotlin: 221-1.6.21-release-337-IJ5591.52
From dive deep into community i found this reddit post https://www.reddit.com/r/IntelliJIDEA/comments/q05b29/intellij_idea_for_m1_macbook/ its basicly tells you to install Rosetta2, also battery-consuming, I think it just best if you use mac mini setup(not a macos user, but wish to anw)

Is it possible to install Xcode 10.2 on High Sierra (10.13.6)?

I recently upgraded iOS in my iPhone device to 12.2 (to provide support of latest versions for my app "Match4app"), and this does not appear to be compatible with Xcode 10.1. Should I update Xcode to 10.2 ?
In my Mac with High Sierra, when I click "Update" for Xcode, 10.2 is not available.
I have found this link:
https://support.apple.com/en-us/HT209606
With this comment:
"Xcode 10.2
Released March 25, 2019
Kernel
Available for: macOS High Sierra 10.13.6 or later"
How can I install Xcode 10.2 with High Sierra in order to test iOS 12.2 ?
Note: Upgrading to Mojave or Catalina is NOT an option in my old Mac (though I will try to install the macOS Catalina Patcher soon (http://dosdude1.com/catalina/) ).
Yes it's possible. Follow these steps:
Download Xcode 10.2 via this link (you need to be signed in with your Apple Id): https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_10.2/Xcode_10.2.xip and install it
Edit Xcode.app/Contents/Info.plist and change the Minimum System Version to 10.13.6
Do the same for Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/Info.plist (might require a restart of Xcode and/or Mac OS to make it open the simulator on run)
Replace Xcode.app/Contents/Developer/usr/bin/xcodebuild with the one from 10.1 (or another version you have currently installed, such as 10.0).
If there are problems with the simulator, reboot your Mac
You don't need to run Xcode 10.2 for iOS 12.2 support. You just need access to the appropriate folder in DeviceSupport.
A possible solution is
Download Xcode 10.2 from a direkt link (not from App Store).
Rename it for example to Xcode102.
Put it into /Applications. It's possible to have multiple Xcode versions in the same directory.
Create a symbolic link in Terminal.app to have access to the 12.2 device support folder in Xcode 10.2
ln -s /Applications/Xcode102.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/12.2\ \(16E226\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
You can move Xcode 10.2 to somewhere else but then you have to adjust the path.
Now Xcode 10.1 supports devices running iOS 12.2
Download xcode 10.2 from below link
https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_10.2/Xcode_10.2.xip
Edit: Minimum System Version* to 10.13.6 in Info.plist at below paths
Xcode.app/Contents/Info.plist
Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/Info.plist
Replace: Xcode.app/Contents/Developer/usr/bin/xcodebuild from Xcode 10
****OR*****
you can install disk image of 12.2 in your existing xcode to run on 12.2 devices
Download disk image from here
https://github.com/xushuduo/Xcode-iOS-Developer-Disk-Image/releases/download/12.2/12.2.16E5191d.zip
And paste at Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Note: Restart the Xcode
Based on responses and comments below, the following was the simple solution for my issue and THIS WORKED. Now my app, Match4app, is fully compatible with latest iOS versions!
Download Xcode 10.2 from a direct link (not from App Store). (Estimated Size: ~6Gb)
From the downloaded version just copy/paste the DeviceSupport/12.2 directory into "Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport"
You can discard the downloaded version now (we just need the small 12.2 directory!)
None of the above helped for me.
I was able to install Mojave using this link here:
http://dosdude1.com/mojave/
This patch worked beautifully and without a hitch
Proof:
here's Mojave running on my (unsupported) 2011 Mac-mini
Cracked it. Just #Damnum steps and then follow the path to run xcode. Bad way but running like a charm.
Double click to /Applications/Xcode102.app/Contents/MacOS/Xcode

Could not launch Mac OS X 10.7 application archived with RestKit

I'm a newbie for RestKit and developing Mac OS X application.
I'm trying to develop Mac OS X application using the RestKit.
I can run the app on debug mode of Xcode.
But I could not run the app on production mode (It means archived application).
Launch the app, this error will be occurred.
TestRestKit cannot be opened because of a problem.
Check with the developer to make sure TestRestKit works with version of Mac OS X.
You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS X.
Click Report to see more detailed information and send a report to Apple.
And I checked the system log, then I find these logs.
May 14 12:41:01 black-umbrella [0x0-0x26b26b].jp.co.test.TestRestKit[30585]: dyld: Library not loaded: #executable_path/../Frameworks/RestKit.framework/Versions/A/RestKit
May 14 12:41:01 black-umbrella [0x0-0x26b26b].jp.co.test.TestRestKit[30585]: Referenced from: /Users/tfmagician/Desktop/TestRestKit.app/Contents/MacOS/TestRestKit
May 14 12:41:01 black-umbrella [0x0-0x26b26b].jp.co.fuller.TestRestKit[30585]: Reason: image not found
May 14 12:41:02 black-umbrella com.apple.launchd.peruser.501[235] ([0x0-0x26b26b].jp.co.fuller.TestRestKit[30585]): Job appears to have crashed: Trace/BPT trap: 5
So I noticed the warning when the app is archiving.
Check dependencies
Warning: Installation Directory starts with #executable_path but Skip Install is disabled.
I was followed this documentation to install RestKit.
https://github.com/RestKit/RestKit/wiki/Installing-RestKit-in-Xcode-4.x
Xcode version is 4.3.2, and I'm using master branch of RestKit.
Please help me and I would be glad if I can get any idea about this problem.
In the target's Build Phases
Click Add Build Phase (bottom right), Add Copy Files and add this:

Cocoa app with ffmpeg dylibs crashes on Mac OSX 10.5 (but not 10.6 or 10.7)

I've built a Cocoa project in Xcode that integrates the ffmpeg dylibs. It runs fine on Mac OSX 10.6 and 10.7 but it crashes on 10.5. I'm compiling on 10.6. Any suggestions? Thanks!
Here's how I've compiled it:
./configure --disable-static --enable-shared --disable-outdev=sdl
--enable-runtime-cpudetect --disable-bzlib --disable-libfreetype --disable-libopenjpeg --enable-zlib --arch=x86_64 --sysroot=/Developer/SDKs/MacOSX10.6.sdk --extra-cflags="-isysroot /Developer/SDKs/MacOSX10.6.sdk -DMACOSX_DEPLOYMENT_TARGET=10.5
-mmacosx-version-min=10.5"
Here's the crash report:
Process: MyApp [27963]
Path: /Applications/MyApp.app/Contents/MacOS/MyApp
Identifier: com.mycompany.MyApp
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [66]
Interval Since Last Report: 123326 sec
Crashes Since Last Report: 2
Per-App Interval Since Last Report: 0 sec
Per-App Crashes Since Last Report: 2
Date/Time: 2011-11-06 15:29:51.154 -0500
OS Version: Mac OS X 10.5.8 (9L31a)
Report Version: 6
Anonymous UUID: D86EA304-DCDA-4855-9124-69FE8C5BDE1B
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0
Dyld Error Message:
Library not loaded: #rpath/libavcodec.dylib
Referenced from: /Applications/MyApp.app/Contents/MacOS/../Frameworks/MyEngine.framework/Versions/A/MyEngine
Reason: no suitable image found. Did find:
/Applications/MyApp.app/Contents/Frameworks/MyEngine.framework/Versions/A/Libraries/libavcodec.dylib: unknown required load command 0x80000022
I believe the problem you're running into is that libavcodec isn't fully 64-bit compatible under 10.5. I'm not 100% certain of this though.
64-bit support wasn't fully fleshed out in 10.5 and so for most of my own 64-bit-native apps, I have to explicitly tell the O.S. to run the 32-bit versions of my binary when running under 10.5.
To do this, go into your Info.plist file and add in these flags:
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>i386</key>
<string>10.5.0</string>
<key>ppc</key>
<string>10.5.0</string>
<key>x86_64</key>
<string>10.6.0</string>
</dict>
This will ensure your app runs in 32-bit mode on Leopard machines and 64-bit mode (if appropriate) on your 10.6 & newer machines.
Binaries compiled on 10.6 don't work on earlier OS X versions because 10.6 adds new dyld load commands that are not supported (did not exist) in 10.5 and earlier.
Although you are trying to add -mmacosx-version-min=10.5 to the flags which is commendable, you did not add it to the linking step, so the linker will still produce a dyld for 10.6.
The above is the reason for the error, but you may further get into trouble for using 10.6 SDK - you should really use 10.5 SDK if you want to target Leopard. Using 10.6 SDK may work on 10.5 if no 10.6-specific features are used, but it will crash if they are used since the compiler won't warn about them at compile time as they are expected to exist.

Simple-OpenNI for Processing fatal errors with the Kinect

I have been using SimpleOpenNI, a wrapper for Processing, all summer now. I use it for the Kinect to make games and demos. Last week, I have been getting a fatal error in my processing window and none of the SimpleOpenNI projects will work. Here is the error:
SimpleOpenNI Version 0.20
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x72e8f955, pid=4596, tid=4624
JRE version: 6.0_24-b07
Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode windows-x86 )
Problematic frame:
C [OpenNI.dll+0xf955]
An error report file with more information is saved as:
C:\Users\mss042\Desktop\processing-1.5.1\hs_err_pid4596.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
It appears as if the new OpenNI/NITE/SensorKinect drivers do not work with the SimpleOpenNI wrapper. I have tried it with people using the old drivers and everything still works. Problem is, you cannot download the old drivers off of the websites so I cannot test if it's that or not. You can see everything I've downloaded from the simpleopenni site: http://code.google.com/p/simple-openni/
Any help with this error would be appreciated. Thanks.
Mike
It looks like there's a problem with OpenNI.dll. Make sure that:
You have the dll (It should be in Program Files where you've installed OpenNI)
Make sure you've got the Environment Variables for the Open NI paths and that the paths are correct, otherwise, you might have the .dll file, but the .jnilib wouldn't know where it is.
Had a Kinect Workshop in Uni, and my colleagues using Windows all had issues with the drivers,
so I'm just passing on what they did:
Even though they had 64-bit versions of Windows they used the 32-bit version, and used Brekel OpenNI Kinect Auto Installer - Developer Edition v1.3.2.3.exe(direct link via developkinect.com) after reading this message:
Comment 4 by tijmenva...#gmail.com, Oct 21, 2011 Hey all I have Solved
the unsatisfied link dll error on windows 7 64 bits by installing java
runtime (jre-7u1-windows-i586.exe)and (Brekel OpenNI Kinect Auto
Installer - Developer Edition v1.3.2.3.exe) I uninstalled everything
and than it worked :)
hope this helpes
in Issue#17 on the SimpleOpenNI project issues page.
Another colleague used Synapse and OSC in Processing instead of SimpleOpenNI, but she had loads of errors with the drivers (basically spent a few good hours uninstalling/installing different versions). In her case, uninstalling any previous partial or complete drivers from the machine and deleting any registry entries related to PrimeSense(Sensor, Nite) and OpenNI, then using the installers from the links on the Synapse page, worked for her.
HTH
This is a long shot, but that exact error is also given if the Kinect USB and/or power supply simply becomes unplugged. Thought it was worth mentioning as it is not obvious from the error message itself and it may help someone out if they kicked their power supply and started searching for the above exception :)