Xcode 12 quit unexpectedly in Mac OS 10.15.4 - ios

Xcode 12 quit unexpectedly in Mac OS 10.15.4.
The document “Main.storyboard” had an issue that was found and repaired.
This may be due to an SCM operation such as merging. Please save the document to fix the issue.
Multiple resources have the same name: groupTableViewBackgroundColor.
Date/Time: 2020-09-26 08:18:54 +0530
End time: 2020-09-26 08:26:49 +0530
OS Version: Mac OS X 10.15.4 (Build 19E266)
Architecture: x86_64h
Report Version: 29
Data Source: Stackshots
Shared Cache: 0x2fb4000 01EE95E0-91B0-354A-BD0A-C761305CD75D
Command: Xcode
Path: /Applications/Xcode 12.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 12.0 (17219)
Build Version: 2
Product Build Version: 12A7209
Project Name: IDEFrameworks
Source Version: 17219000000000000
Parent: launchd [1]
PID: 2432
Event: hang
Duration: 475.00s
Duration Sampled: 1.99s (process was unresponsive for 473 seconds before sampling)
Steps: 20 (100ms sampling interval)
Hardware model: MacBookAir7,2
Active cpus: 4
Time Awake Since Boot: 5700s
Fan speed: 1234 rpm
--------------------------------------------------
Timeline format: stacks are sorted chronologically
Use -i and -heavy to re-report with count sorting
--------------------------------------------------
Heaviest stack for the main thread of the target process:
20 <truncated backtrace>
20 __psynch_mutexwait + 10 (libsystem_kernel.dylib + 12386) [0x7fff6a22a062]
*20 psynch_mtxcontinue + 0 (pthread + 9566) [0xffffff7f82d6e55e]
Process: Xcode [2432]
UUID: BEF84410-992D-3871-AD2A-C8C9AB4BD25C
Path: /Applications/Xcode 12.app/Contents/MacOS/Xcode
Architecture: x86_64
Parent: launchd [1]
UID: 501
Sudden Term: Tracked
Footprint: 490.54 MB
Start time: 2020-09-26 08:26:47 +0530
End time: 2020-09-26 08:26:48 +0530
Num samples: 20 (1-20)
CPU Time: 0.022s (52.9M cycles, 37.5M instructions, 1.41c/i)
Note: Unresponsive for 473 seconds before sampling
Note: 4 idle work queue threads omitted

I had exactly the same problem.
Good news, I found the solution!
Short story:
You need to find the Views that have tableCellGroupedBackgroundColor as their color and change it.
tip: This color was used by the tableView cells as a background color, look there first.
Long story:
After updating to Xcode 12.2 every time I opened Main.storyboard, the same message was displayed as yours.
Assuming it is a color incompatibility (tableCellGroupedBackgroundColor in our case), I opened Main.storyboard as Source Code (right click on the Main.storyboard -> Open As -> Source Code) and searched for "tableCellGroupedBackgroundColor".
I noticed that this color appeared several times in the "resources" at the end of the file, while it should appear only once.
This is probably why Xcode displays the error message.
Looking above, I noticed that the specific color was in the background color in tableView cells.
So I reopened Main.storyboard as Interface Builder (right click on the Main.storyboard -> Open As -> Interface builder-Storyboard) and changed the background color in all tableView cells to Default.
pro tip: You can delete the colors from the Source code directly, by deleting the lines that refers the colors to the Views.
That's it!
After that everything works perfectly again!

I have a similar issue with additional infos. In xCode 12, and 12.2 beta, my main storyboard appear after many minutes and I get:
The document “Main.storyboard” had 15 issues that were found and repaired.
The save popup also shows:
This may be due to an SCM operation such as merging. Please save the document to fix the issues.
The errors are of 3 types for me:
1- Multiple resources have the same name: darkTextColor.
2- Multiple resources have the same name: groupTableViewBackgroundColor.
3- Multiple resources have the same name: tableCellGroupedBackgroundColor.
It asks to save in order to repair but it does not repair at all.
There are no warning in the environment either before or after the save.
When the project finally loads, if I edit it for a while then it stops responding and I have to force xCode to quit. If I load my app in xCode 11.7 it shows instantly and work fine. If one of our users upgrades to IOS14 with the working version of the app it crashes in some views however if I compile with xCode12, even with storyboard file that I cannot open, and I publish on IOS14 the apps work well and the broken views shows up.
When I debug in xCode 12 and navigate to a broken view the app/xCode stops but no warning or error are displayed. I tried to change and remove this line in the storyboard file without success:

Related

Long loading time for map

I'm facing with issue related to long loading time of the empty map from Here-SDK-iOS.
I opened sample project and looks like it freeze for some time, the code for initialisation is next:
override func loadView() {
super.loadView()
NSLog("%#", ">>>>>>>>>> Load View \(Date())")
}
override func viewDidLoad() {
super.viewDidLoad()
mapView = MapView(frame: view.bounds)
view.addSubview(mapView)
mapView.mapScene.loadScene(mapScheme: .normalDay, completion: self.onLoadScene)
mapView.gestures.tapDelegate = self
NSLog("%#", ">>>>>>>>>> View Did Load \(Date())")
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
mapView.handleLowMemory()
}
func onLoadScene(_ error: MapError?) {
guard error == nil else {
print("Error: Map scene not loaded, \(String(describing: error))")
return
}
// Configure the map.
let camera = mapView.camera
camera.lookAt(point: GeoCoordinates(latitude: 52.518043, longitude: 13.405991),
distanceInMeters: 1000 * 10)
}
The log:
2021-06-25 08:45:27.500549+0300 testDrawing[50019:31547554] >>>>>>>>>> Load View 2021-06-25 05:45:27 +0000
...
2021-06-25 08:45:31.301998+0300 testDrawing[50019:31547554] >>>>>>>>>> View Did Load 2021-06-25 05:45:31 +0000
As u can see there is about 4 sec to init the map with initial location. Note: I use freemium account for testing.
I also can see additional warnings like
[WARN ] harp-sdk - Ignore adding invalid observer
[WARN] ResponseFromJsonBuilder - Absent value,
response=olp::authentication::IntrospectAppResult, field=description
[INFO ] harp-sdk - Adding data source
[INFO ] Storage.LevelDB - Cleared other DB in folder: "/Users//Library/Developer/CoreSimulator/Devices/61082972-C4BE-42E2-9696-0D2458D475D5/data/Containers/Data/Application/74E993BF-7111-4E08-A27F-A7F62B3ADA1D/Library/Caches/v1/sSR8TFucGSrS94S4sDvrsA/analyticsData/events.sqlite
[INFO] ThreadPoolTaskScheduler - Starting thread 'OLPSDKPOOL_0'
The most time consuming operation - is Cleared other DB in folder- about 3 sec.
Can anyone advice what's the reason for this behaviour.
---- UPDATE -----
I also receiving random crash
version = heresdk-explore-ios-4.7.5.0.5737
---- UPDATE -----
Few mode tech details:
For issue «freeze on start":
tested on Mac with M1 and simulator (12 Pro, iOS 14.5) and on device 12 Pro iOS 14.5.
On device lag a bit smaller - 1-3 sec, on simulator - up to 7 sec.
heresdk-explore-ios-4.7.5.0.5737
heresdk-navigate-ios-4.7.6.0.5863
For "crash on start":
12 Pro, iOS 14.5 both
heresdk-explore-ios-4.7.5.0.5737
---- UPDATE ----
Hi, the crash with analytics service must be fixed in upcoming release. The most time consuming operation - is Cleared other DB in folder- about 3 sec. There is no evidence that this operation consumes 3 sec, probably something happen after this operation. – Hsilgos
#Hsilgos,
Yes, there is no evidence that exactly this operation consume 3 sec - it's just a guess from my side (when I remove sdk - everything works instantly, so this is simple check).
Here few screenshots from profiler:
Here is the trace file
Here u can see that HARP.SDK.RENDERER (map renderer I guess) eat a lot of resource, and looks like MainThread is waiting until it's done.
Again - this is just a guess.
Another point for improvement - add support for running fat on arm64 Darwin simulator on M1. For not I need to use Rosetta ( - this disappointing....
---- UPDATE ----
Issue with drawing performance - example (when around 200 items are drawn at once, to be more precise - one-by-one - there is no API for batch drawing):
Look at second drawing area - the performance issue is more visible there
The HERE SDK team announced today that it is planned to add explicit support for M1 arm64 simulator builds. It is not clear yet when and how this will happen, but since it is missing right now, running a simulator on an Apple M1 processor will slow things down a bit in comparison to real devices. However, for me, running simulator on M1 is still faster than running a simulator on a non-M1, just because the M1 is incredibly fast and my non-M1 MacBook has not the fastest setup.
Also, the analytics crash seems to be a known issue. So, hopefully, we can see a fix for both soon.

Rendering Exception on iOS using Gluon/JavaFXPorts

After trying out some apps on iOS with Gluon I noticed some rendering bugs.
Firstly the JavaFX LineChart behaves incorrectly. The lines are displaced and the shadows don't show up correctly. I didn't examine this further but this might be related to the following problem.
The more important thing is that there is an exception while rendering the Gluon demo App called DoodleTrace. After painting the line (about 20cm long on the iPad) I get an exception in the rendering Thread:
(Note: iPad 3 running iOS 7)
Triggered once (after about 20 cm):
va.lang.IllegalArgumentException: Upload requires 1793077 elements, but only 1102848 elements remain in the buffer
at com.sun.prism.impl.BaseTexture.checkUpdateParams(BaseTexture.java)
at com.sun.prism.es2.ES2Texture.update(ES2Texture.java)
at com.sun.prism.impl.BaseContext.flushVertexBuffer(BaseContext.java)
at com.sun.prism.impl.ps.BaseShaderContext.setRenderTarget(BaseShaderContext.java)
at com.sun.prism.impl.BaseContext.setRenderTarget(BaseContext.java)
at com.sun.prism.impl.BaseGraphics.<init>(BaseGraphics.java)
at com.sun.prism.impl.ps.BaseShaderGraphics.<init>(BaseShaderGraphics.java)
at com.sun.prism.es2.ES2Graphics.<init>(ES2Graphics.java)
at com.sun.prism.es2.ES2Graphics.create(ES2Graphics.java)
at com.sun.prism.es2.ES2SwapChain.prepare(ES2SwapChain.java)
at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
at com.sun.javafx.tk.RenderJob.run(RenderJob.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java)
at java.lang.Thread.run(Thread.java)
Outstanding resource locks detected:
ES2 Vram Pool: 3,457,040 used (0.6%), 91,324,416 target (17.0%), 536,870,912 max
7 total resources being managed
average resource age is 28.4 frames
0 resources at maximum supported age (0.0%)
3 resources marked permanent (42.9%)
1 resources have had mismatched locks (14.3%)
1 resources locked (14.3%)
6 resources contain interesting data (85.7%)
0 resources disappeared (0.0%)
Triggered on every touch event after the above exception occurred:
java.lang.IllegalArgumentException: Upload requires 1793077 elements, but only 1102848 elements remain in the buffer
at com.sun.prism.impl.BaseTexture.checkUpdateParams(BaseTexture.java)
at com.sun.prism.es2.ES2Texture.update(ES2Texture.java)
at com.sun.prism.impl.BaseContext.flushVertexBuffer(BaseContext.java)
at com.sun.prism.impl.ps.BaseShaderContext.setRenderTarget(BaseShaderContext.java)
at com.sun.prism.impl.BaseContext.setRenderTarget(BaseContext.java)
at com.sun.prism.impl.BaseGraphics.<init>(BaseGraphics.java)
at com.sun.prism.impl.ps.BaseShaderGraphics.<init>(BaseShaderGraphics.java)
at com.sun.prism.es2.ES2Graphics.<init>(ES2Graphics.java)
at com.sun.prism.es2.ES2Graphics.create(ES2Graphics.java)
at com.sun.prism.es2.ES2SwapChain.createGraphics(ES2SwapChain.java)
at com.sun.prism.es2.ES2SwapChain.createGraphics(ES2SwapChain.java)
at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
at com.sun.javafx.tk.RenderJob.run(RenderJob.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java)
at java.lang.Thread.run(Thread.java)

Xcode error while openning file

Today i tried to open .xcworkspace file on my project but i got some error like this
Process: Xcode [740]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.2 (6776)
Build Info: IDEFrameworks-6776000000000000~11
App Item ID: 497799835
App External ID: 811890240
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [740]
User ID: 501
Date/Time: 2015-04-07 13:45:47.945 +0700
OS Version: Mac OS X 10.10.2 (14C1514)
Report Version: 11
Anonymous UUID: 97BA685B-5788-8D8E-FA49-9E2A21F38165
Time Awake Since Boot: 7300 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
DVTUndoManager for delegate:<IBStoryboardDocument 0x7f7f5cb6a200>
ProductBuildVersion: 6C131e
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): enableUndoRegistration: IBDocumentUndoManager 0x7f7f6616fe50 is in invalid state, enableUndoRegistration may only be invoked with matching call to disableUndoRegistration
UserInfo: (null)
Hints:
0: DVTUndoManager for delegate:<IBStoryboardDocument: 0x7f7f5cb6a200>
I also reinstalled xcode again and clear catch but it didn't work out.
Anyone know how to fix this?
Thanks!
in his case, open with right Click on .xcworkspace * & click on - Show package Content & then Remove unnecessary things from that opened folder & then try to open again .xcworkspace, you will successfully open it.
If above answer did not fix your issue as it did not in my case.
Follow the below steps to fix this issue,(Note:- this will have the Autolayout issues, which you can fix easily)
Edit your storyboard as Source code.
Locate useAutolayout="YES", change its value to useAutolayout="NO" and save the file.
Now open the Storyboard in Interface Builder mode.
You will be shown a pop up dialog with message "The document "Main.storyboard" had xx internal inconsistencies that were found and repaired". click on show details and copy and save the "contrain ids(object ID)" in different file.
"This constraint is not in the referencing constraints for its first item []: object ID Fo7-pW-aKi
This constraint's [object ID ElL-p9-pfY] second item is not in the document
This constraint's [object ID FQa-9e-EhA] second item is not in the document
This constraint is not in the referencing constraints for its first item []: object ID WPb-Rv-3fE
This constraint's [object ID 1oW-wk-Zzu] second item is not in the document
This constraint is not in the referencing constraints for its first item []: object ID 5Px-Ng-H66
This constraint is not in the referencing constraints for its first item []: object ID iKL-sX-B40
This constraint's [object ID 6EU-Hv-AiV] second item is not in the document
This constraint's [object ID ElL-p9-pfY] second item is not in the document
This constraint's [object ID FQa-9e-EhA] second item is not in the document
"
Click on "OK" button.
The storyboard is loaded successfully.
7.Now again open the storyboard in Source code mode. now find and delete all the "contrain ids(object ID)"(saved in step 4) and then save the file.
Now open the Storyboard in in Interface Builder mode. it opens successfully without any issue but in locked mode(u won't be able to modify anything)
To unlock storyboard choose a locking level from the Editor > Localization Locking menu and choose Reset Locking Controls.this will unlock the storyboard.
Fix some of the auto-layout issues and you good to go.

Xcode - is it possible to debug crashes in the Interface Builder's Live Rendering process (IBDesignable)?

Question
Is it possible to set breakpoints and debug code executed by Xcode / Interface Builder's Live Rendering? That is, I am using the IBDesignable and IBInspectable attributes to affect the view as it is rendered in an interface builder storyboard, and would like to be able to debug "IB crashed" errors. I don't recall this from the WWDC session, other than the section on prepareForInterfaceBuilder.
Context
I recently started seeing a number of errors reporting that IB crashed when attempting to render my code. I ultimately traced it to an otherwise innocent line of code in layoutSubviews in one of my views that was linked from the storyboard. The specific problem that IB - when rendering live views, called layoutSubviews before setting all the view's child view properties (which seems like a separate problem, in and of itself). This contrasted with the simulator and device, in which the views were set ahead of the first call to layoutSubviews. Long story short though, it involved diffing a bunch of files to find the offending change. Suffice to say, I could have found the problem quickly if it were possible to set breakpoints and trap the crash.
Has anyone figured out how to debug and/or generally trap these problems, or is that access not yet available?
I watched the WWDC video again (§411 #22:00 or so). You have to
edit a view in IB, and set its custom class to a class in your codebase
set breakpoints as desired in your custom class
select the view in IB, then select Editor -> "Debug Selected Views" (at bottom)
Oddly, in my tests today, it is creating my view via (initWith)Frame instead of (initWith)Coder. This causes subsequent constraint configuration logic to fail as the sub views have not been set (as they would had 'withCoder been called).
(tools note: Xcode 8.2, macOS Sierra)
I had a very different failure than yours: I had a crash in code that resulted in an IB error in Xcode:
error: IB Designables: Failed to update auto layout status: The agent crashed
To debug this on macOS Sierra, open Console.app, and open "User Reports" in the right sidebar. Find the "IBDesignablesCocoaTouch*" crashes, and select the applicable one. This gave me the code-level info I needed to diagnose it.
Crashed Thread: 0
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [0]
Application Specific Information:
CoreSimulator 375.21 - Device: IBSimDeviceTypeiPad2x - Runtime: iOS 10.3 (14E8301) - DeviceType: IBSimDeviceTypeiPad2x
Thread 0 Crashed:
0 libswiftUIKit.dylib 0x000000021a2ddead _TToFE5UIKitCSo7UIImagecfT24imageLiteralResourceNameSS_S0_ + 205
1 libswiftUIKit.dylib 0x000000021a2ddcef _TFE5UIKitCSo7UIImageCfT24imageLiteralResourceNameSS_S0_ + 79
2 com.company.App 0x0000000216df74ad _TZFC10App21ControlsP33_F7118662B6663018C7DD0DEBB6FDD87511buttonImagefT8forStateOS_25State_CSo7UIImage + 109 (Controls.swift:121)
…
(In my case, Interface Builder was failing to load an image literal. I had to implement this workaround: xcode 6 IB_DESIGNABLE- not loading resources from bundle in Interface builder)

Error 255 in Xcode 4.5 compiling with LLVM 4.1

I'm trying to compile my project with the latest xcode + sdk 6.0
when the building is almost done, I got this error:
2012-09-26 16:52:24.714 ibtoold[5603:b03] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-2840/Framework/Document/IBDocument.m:1514
Details: Some objects didn't get the ibBeginArchivingDocument:withContext: callback. A class has probably overridden the method without calling through to super.
Object: <IBCocoaTouchDocument: 0x40072df00>
Method: -willArchiveWithContext:
Thread: <NSThread: 0x40010a260>{name = (null), num = 1}
Hints: None
Backtrace: 0 0x000000010550e44c -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DVTFoundatio
1 0x000000010550e2a5 _DVTAssertionFailureHandler (in DVTFoundatio
2 0x0000000104b35245 -[IBDocument willArchiveWithContext:] (in IDEInterfaceBuilderKi
3 0x00000001086407d6 (in IDEInterfaceBuilderCocoaTouchIntegratio
4 0x0000000108640c3a (in IDEInterfaceBuilderCocoaTouchIntegratio
5 0x0000000104b44745 __47-[IBDocument compiledPackageWithOptions:error:]_block_invoke_0 (in IDEInterfaceBuilderKi
6 0x0000000104b5b9a1 -[IBDocument assertIfArbitrationIsScheduledDuring:] (in IDEInterfaceBuilderKi
7 0x0000000104b44710 -[IBDocument compiledPackageWithOptions:error:] (in IDEInterfaceBuilderKi
8 0x0000000104a46f90 (in ibtool
9 0x0000000104a440e8 (in ibtool
10 0x0000000104a43c5f (in ibtoold
11 0x0000000104a43b53 (in ibtoold
12 0x0000000104a50165 (in ibtoold
13 0x0000000104a43684 (in ibtoold
14 0x0000000104a448f1 (in ibtoold
15 0x0000000104a42524 (in ibtoold
16 0x000000000000000 Command /Applications/Xcode4.5SDK6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 255
Only for a XIB I'll not able to build with success...have you got the solution?
thanks!
Dario
Note: I edited this a few times as new ideas came to mind so its a bit jerky I know.
1)Look at the command line tool 'ibtool' - there is a man page - and you can try manually to translate the xib file and maybe validate it (I've not used this in years and years)
2) Other ideas (but failing those, you should burn a DTS Incident - you get 2 per year - and try to get some help from an Apple engineer):
clean your project
delete the cached data (Organizer->Projects->Derived Data tap 'Delete...'
insure that for this XIB the proper versioning is set (select XIB, 3rd Xcode tab on right, File options:
close the project
quit Xcode
reopen Xcode, then the product
try again
If this does not do it, use the DTS incident, or post on the internal Apple lists - the ones you have to login for - and maybe someone there knows of an issue
3) If you are truly desperate, make a copy of your xib file. Then start deleting objects, the easiest first, and try to build. At some point it may compile. Then re-add the other objects back.
4) If 3 does not do it, blow the xib file away, create a new one, and essentially reconstruct what you have.
EDIT: (update in comments by original poster)
5) Reboot the machine and try again.
"Clean" my project solved my problem. I'm using XCode 4.5.
The following steps work for me.
Thanks David for steps #1 to #4
Clean my project build
Delete the cached data (Organizer->Projects->Derived Data tap 'Delete...'
Close the project
Quit Xcode (I did stop at this step and tried to reopen Xcode but the error remains)
Restart my computer. (Tried to open Xcode afterwards but the same build error still happens)
Make a copy of Xcode (I put the copy at ~/Desktop)
Delete the original copy at /Applications
Put the copy of Xcode back to /Applications
Done

Resources