iOS 15 Crash when initialize NSAttributedString with HTML string - html

I have an extension to convert HTML string to NSAttributedString.
After iOS 15 is released, I've seen a lot of crashes from my user. All those crashes are on iOS 15 and occur on the main thread.
Here is a typical crash report from Crashlytics.
Crashed: com.apple.main-thread
0 libsystem_platform.dylib 0x1f29d60c0 _os_unfair_lock_recursive_abort + 36
1 libsystem_platform.dylib 0x1f29d0a10 _os_unfair_lock_lock_slow + 304
2 Foundation 0x183d5e730 -[NSProcessInfo(NSProcessInfoHardwareState) isLowPowerModeEnabled] + 68
3 WebCore 0x192011004 <redacted> + 56
4 CoreFoundation 0x182535ee8 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
5 CoreFoundation 0x1825d1b9c ___CFXRegistrationPost_block_invoke + 52
6 CoreFoundation 0x1825a4f54 _CFXRegistrationPost + 456
7 CoreFoundation 0x18254bd54 _CFXNotificationPost + 716
8 Foundation 0x183d50028 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96
9 Foundation 0x183dc89d4 NSProcessInfoNotifyPowerState + 188
10 Foundation 0x183d5e768 -[NSProcessInfo(NSProcessInfoHardwareState) isLowPowerModeEnabled] + 124
11 WebCore 0x191595118 <redacted> + 96
12 WebCore 0x19201116c WebCore::LowPowerModeNotifier::LowPowerModeNotifier(WTF::Function<void (bool)>&&) + 52
13 WebCore 0x192f36c4c WebCore::Page::Page(WebCore::PageConfiguration&&) + 1848
14 WebKitLegacy 0x1a605ae34 -[WebView(WebPrivate) _commonInitializationWithFrameName:groupName:] + 3060
15 WebKitLegacy 0x1a605a214 -[WebView(WebPrivate) _initWithFrame:frameName:groupName:] + 116
16 UIFoundation 0x18d306028 -[NSHTMLReader _loadUsingWebKit] + 832
17 UIFoundation 0x18d30715c -[NSHTMLReader attributedString] + 32
18 UIFoundation 0x18d2c04e8 _NSReadAttributedStringFromURLOrData + 8420
19 UIFoundation 0x18d2be378 -[NSAttributedString(NSAttributedStringUIFoundationAdditions) initWithData:options:documentAttributes:error:] + 156
20 MyAppExtensions 0x108aa0fc4 _hidden#912_ + 4374482884 (__hidden#360_:4374482884)
21 MyAppExtensions 0x108aa0894 NSAttributedString.init(htmlString:font:useDocumentFontSize:) + 36 (__hidden#925_:36)
22 MyAppName 0x1045eca18 {foo_class}.convertHTML(_:) + 670 (xxxx.swift:670)
23 MyAppName 0x1045e5c58 {foo_class}.some_function_3 + 620 (xxxx.swift:620)
24 MyAppName 0x1045e4760 {foo_class}.some_function_2 + 212 (xxxx.swift:212)
25 MyAppName 0x1045e4200 {foo_class}.some_function_1 + 138 (xxxx.swift:138)
.
.
.
42 UIKitCore 0x184b5e1d0 _UIGestureRecognizerSendTargetActions + 116
43 UIKitCore 0x184b2705c _UIGestureRecognizerSendActions + 284
44 UIKitCore 0x184b60580 -[UIGestureRecognizer _updateGestureForActiveEvents] + 636
45 UIKitCore 0x184b186fc _UIGestureEnvironmentUpdate + 1988
46 CoreFoundation 0x18254c570 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
47 CoreFoundation 0x18251b854 __CFRunLoopDoObservers + 572
48 CoreFoundation 0x1825168ec __CFRunLoopRun + 1052
49 CoreFoundation 0x18252a3c8 CFRunLoopRunSpecific + 600
50 GraphicsServices 0x19dd3b38c GSEventRunModal + 164
51 UIKitCore 0x184ed00bc -[UIApplication _run] + 1100
52 UIKitCore 0x184c4dbe8 UIApplicationMain + 2124
53 libswiftUIKit.dylib 0x199afe184 UIApplicationMain(_:_:_:_:) + 104
54 MyAppName 0x1043a5894 main + 7 (main.swift:7)
55 dyld 0x106b81a24 start
The following is code of converting HTML to NSAttributedString:
extension NSAttributedString {
convenience public init(htmlString html: String, font: UIFont? = nil, useDocumentFontSize: Bool = true) throws {
let options: [NSAttributedString.DocumentReadingOptionKey: Any] = [
.documentType: NSAttributedString.DocumentType.html,
.characterEncoding: String.Encoding.utf8.rawValue
]
guard let data = html.data(using: .utf8, allowLossyConversion: true) else {
self.init(string: "")
return
}
guard let fontFamily = font?.familyName else {
try self.init(data: data, options: options, documentAttributes: nil)
return
}
let attr = try NSMutableAttributedString(data: data, options: options, documentAttributes: nil)
let fontSize: CGFloat? = useDocumentFontSize ? nil : font!.pointSize
let range = NSRange(location: 0, length: attr.length)
attr.enumerateAttribute(.font, in: range, options: .longestEffectiveRangeNotRequired) { attrib, range, _ in
if let htmlFont = attrib as? UIFont {
let traits = htmlFont.fontDescriptor.symbolicTraits
var descrip = htmlFont.fontDescriptor.withFamily(fontFamily)
if (traits.rawValue & UIFontDescriptor.SymbolicTraits.traitBold.rawValue) != 0 {
descrip = descrip.withSymbolicTraits(.traitBold)!
}
if (traits.rawValue & UIFontDescriptor.SymbolicTraits.traitItalic.rawValue) != 0 {
descrip = descrip.withSymbolicTraits(.traitItalic)!
}
attr.addAttribute(.font, value: UIFont(descriptor: descrip, size: fontSize ?? htmlFont.pointSize), range: range)
}
}
self.init(attributedString: attr)
}
Btw, I'm using Xcode 12.5 to archive the release build.

Discussion about this crash in the apple developer forum here:
You might need to avoid using NSAttributedString(data: , options: [.documentType: NSAttributedString.DocumentType.html] itself and parse the HTML string to generate attribute string by yourself. Perhaps,you can use some open-source projects on GitHub such as DTCoreText.

Related

Parsing data with e.parameters

I'm receiving the data from the JavaScript client in the format of:
type ContactDetails struct {
Email string
Subject string
Message string
Color1 []string
Color2 []string
}
The data had been sent from the PostForm as:
Post from website! r.PostFrom = map[color1:[my color 1 - 1 my color 1 - 2] color2:[my color 2 - 1 my color 2 - 2] email:[my email] message:[my message] subject:[my subject]]
So, I thought the best way to handle it the Google Apps script is using e.parameters not e.parameter, pls correct me if this is wrong approach.
In my GAS web app, only first field in both color1 and color2 had been posted in the related spreadsheet columns, though I expected to see array of 2 elements in each.
Sure, "Result of the code" is what I see after executed the codes in the question, "Expected result" is what I was expecting the code in the question will give as an output. The "Targeted final result" is the final result I'm working to approach, I think if I fixed the code to give the "Expected result", then it should not be difficult to tune it to generate the final output as needed in the format of "Targeted final result"
My GAS script is:
function doPost(e){
output = handleResponse(e)
}
function handleResponse(e) {
var result, message;
// Prevent concurrent access overwriting data
// we want a public lock, one that locks for all invocations
var lock = LockService.getPublicLock();
lock.waitLock(1000); // wait 1 seconds before conceding defeat.
// As we are passing JSON in the body, we need to unpairse it
var jsonString = e.postData.getDataAsString();
e.parameters = JSON.parse(jsonString);
try {
// next set where we write the data - you could write to multiple/alternate destinations
var doc = SpreadsheetApp.openById(FILE_Id);
var sheet = doc.getSheetByName(DATA_SHEET);
// we'll assume header is in row 1 but you can override with header_row in GET/POST data
var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
var lastRow = sheet.getLastRow()
var nextRow = lastRow + 1; // get next row
var row = [];
if(lastRow < 10){
RefID = "PRF.00" + lastRow
} else {
if(lastRow < 100){
RefID = "PRF.0" + lastRow
} else {
RefID = "PRF." + lastRow
}
}
// loop through the header columns
for (i in headers){
if (headers[i] == "Ref"){ // special case if you include a 'Timestamp' column
row.push(RefID);
} else { // else use header name to get data
if (headers[i] == "Timestamp"){ // special case if you include a 'Timestamp' column
row.push(new Date());
} else { // else use header name to get data
row.push(e.parameters[headers[i]]);
}
}
}
// more efficient to set values as [][] array than individually
sheet.getRange(nextRow, 1, 1, row.length).setValues([row]);
// return json success results
result = true;
message = link;
} catch(e){
// if error return this
result = false;
message = e;
} finally { //release lock
lock.releaseLock();
var output = JSON.stringify({"result":result, "message": message});
}
return output;
}
I'm publishing my GAS a:
If info about my client side is required, here the details:
I'm using GO lang as below;
// go build -ldflags "-H=windowsgui"
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
"text/template"
"github.com/zserge/lorca"
)
// ContactDetails ...
type ContactDetails struct {
Email string
Subject string
Message string
Color1 []string
Color2 []string
}
// ReturnedResult ...
type ReturnedResult struct {
Result bool `json:"result"`
Message string `json:"message"`
}
func index(w http.ResponseWriter, r *http.Request) {
tmpl := template.Must(template.ParseFiles("forms.html"))
if r.Method != http.MethodPost {
tmpl.Execute(w, nil)
return
}
r.ParseForm()
details := ContactDetails{
Email: r.FormValue("email"),
Subject: r.FormValue("subject"),
Message: r.FormValue("message"),
Color1: r.Form["color1"], // as "color1" is array,
Color2: r.Form["color2"], // as "color2" is array,
}
fmt.Printf("Post from website! r.PostFrom = %v\n", r.PostForm)
sheetID := "AKfycbxfMucXOzX15tfU4errRSAa9IzuTRbHzvUdRxzzeYnNA8Ynz8LJuBuaMA/exec"
url := "https://script.google.com/macros/s/" + sheetID + "/exec"
bytesRepresentation, err := json.Marshal(details)
if err != nil {
log.Fatalln(err)
}
resp, err := http.Post(url, "application/json", bytes.NewBuffer(bytesRepresentation))
if err != nil {
log.Fatalln(err)
}
// read all response body
data, _ := ioutil.ReadAll(resp.Body)
// close response body
resp.Body.Close()
webReturn := ReturnedResult{}
if err := json.Unmarshal([]byte(data), &webReturn); err != nil {
panic(err)
}
fmt.Println(webReturn.Message)
//tmpl.Execute(w, struct{ Success bool }{webReturn.Result})
tmpl.Execute(w, webReturn)
}
func main() {
// Start Host goroutine
go func() {
http.HandleFunc("/", index)
http.ListenAndServe(":8090", nil)
}()
// Start UI
ui, err := lorca.New("http://localhost:8090/index", "", 480, 320)
if err != nil {
log.Fatal(err)
}
defer ui.Close()
<-ui.Done()
}
With the html in the below template forms.html
<title>Form Submittal</title>
<h1>Contact</h1>
<form method="POST">
<label>Email:</label><br />
<input type="text" name="email"><br />
<label>Subject:</label><br />
<input type="text" name="subject"><br />
<label>Message:</label><br />
<textarea name="message"></textarea><br />
<table>
<tr>
<td><input type="text" name="color1" /></td>
<td><input type="text" name="color2" /></td>
</tr>
<tr>
<td><input type="text" name="color1" /></td>
<td><input type="text" name="color2" /></td>
</tr>
<table>
<input type="submit">
</form>
{{if .Result}}
<div id='foo'>
<a href={{.Message}}>Download PDF file</a>
</div>
<h1></h1>
<script>
// setTimeout(function () {document.querySelector('#foo').style.display='none'}, 5000);
</script>
{{end}}
The console output data is:
Post from website! r.PostFrom = map[color1:[my color 1 - 1 my color 1 - 2] color2:[my color 2 - 1 my color 2 - 2] email:[my email] message:[my message] subject:[my subject]]
Details = {my email my subject my message [my color 1 - 1 my color 1 - 2] [my color 2 - 1 my color 2 - 2]}
bytesRepresentation = [123 34 69 109 97 105 108 34 58 34 109 121 32 101 109 97 105 108 34 44 34 83 117 98 106 101 99 116 34 58 34 109 121 32 115 117 98 106 101 99 116 34 44 34 77 101 115 115 97 103 101 34 58 34 109 121 32 109 101 115 115 97 103 101 34 44 34 67 111 108 111 114 49 34 58 91 34 109 121 32 99 111 108 111 114 32 49 32 45 32 49 34 44 34 109 121 32 99 111 108 111 114 32 49 32 45 32 50 34 93 44 34 67 111 108 111 114 50 34 58 91 34 109 121 32 99 111 108 111 114 32 50 32 45 32 49 34 44 34 109 121 32 99 111 108 111 114 32 50 32 45 32 50 34 93 125]
In order to achieve your goal of "Expected result", how about the following modification? In this case, please modify handleResponse() of your Google Apps Script as follows.
From:
row.push(e.parameters[headers[i]]);
To:
var temp = e.parameters[headers[i]];
row.push(Array.isArray(temp) ? temp.join(",") : temp);
// Or if you want to ensure empty objects are excluded from the .join(), you can use:
// row.push(Array.isArray(temp) ? (temp.filter(value => Object.keys(value).length !== 0)).join(",") : temp);
Note:
When you modified the script of Web Apps, please redeploy the Web Apps as new version. By this, the latest script is reflected to the Web Apps. Please be careful this.

Encoding troubles with python, mysql and utf8mb4

I get the following warnings, when trying to save a simple dataframe to mysql.:
C:...\anaconda3\lib\site-packages\pymysql\cursors.py:170: Warning: (1366, "Incorrect string value: '\x92\xE9t\xE9)' for column 'VARIABLE_VALUE' at row 518")
result = self._query(query)
And
C:...anaconda3\lib\site-packages\pymysql\cursors.py:170: Warning:
(3719, "'utf8' is currently an alias for the character set UTF8MB3,
but will be an alias for UTF8MB4 in a future release. Please consider
using UTF8MB4 in order to be unambiguous.") result =
self._query(query)
Environment info : I use Mysql8, python3.6 (pymysql 0.9.2, sqlalchemy 1.2.1)
I visited posts like the one linked bellow, none of which seem to give a solution as to how to avoid this warning.
MySQL “incorrect string value” error when save unicode string in Django -> Indication is to use UTF8
N.B : The Collation in the table within mysql doesn't seem to be set to the one I specified in the create_db function within the Connection class.
The executable code:
import DataEngine.db.Connection as connection
import random
import pandas as pd
if __name__ == "__main__":
conn = connection.Connection(host="host_name", port="3306", user="username", password="password")
conn.create_db("raw_data")
conn.establish("raw_data")
l1 = []
for i in range(10):
l_nested = []
for j in range(10):
l_nested.append(random.randint(0, 100))
l1.append(l_nested)
df = pd.DataFrame(l1)
conn.save(df, "random_df")
df2 = conn.retrieve("random_df")
print(df2)
So the dataframe that is persisted in the database is :
index 0 1 2 3 4 5 6 7 8 9
0 0 11 57 75 45 81 70 91 66 93 96
1 1 51 43 3 64 2 6 93 5 49 40
2 2 35 80 76 11 23 87 19 32 13 98
3 3 82 10 69 40 34 66 42 24 82 59
4 4 49 74 39 61 14 63 94 92 82 85
5 5 50 47 90 75 48 77 17 43 5 29
6 6 70 40 78 60 29 48 52 48 39 36
7 7 21 87 41 53 95 3 31 67 50 30
8 8 72 79 73 82 20 15 51 14 38 42
9 9 68 71 11 17 48 68 17 42 83 95
My Connection class
import sqlalchemy
import pymysql
import pandas as pd
class Connection:
def __init__(self: object, host: str, port: str, user: str, password: str):
self.host = host
self.port = port
self.user = user
self.password = password
self.conn = None
def create_db(self: object, db_name: str, charset: str = "utf8mb4", collate:str ="utf8mb4_unicode_ci",drop_if_exists: bool = True):
c = pymysql.connect(host=self.host, user=self.user, password=self.password)
if drop_if_exists:
c.cursor().execute("DROP DATABASE IF EXISTS " + db_name)
c.cursor().execute("CREATE DATABASE " + db_name + " CHARACTER SET=" + charset + " COLLATE=" + collate)
c.close()
print("Database %s created with a %s charset" % (db_name, charset))
def establish(self: object, db_name: str, charset: str = "utf8mb4"):
self.conn = sqlalchemy.create_engine(
"mysql+pymysql://" + self.user + ":" + self.password + "#" + self.host + ":" + self.port + "/" + db_name +
"?charset=" + charset)
print("Connection with database : %s has been established as %s at %s." % (db_name, self.user, self.host))
print("Charset : %s" % charset)
def retrieve(self, table):
df = pd.read_sql_table(table, self.conn)
return df
def save(self: object, df: "Pandas.DataFrame", table: str, if_exists: str = "replace", chunksize: int = 10000):
df.to_sql(name=table, con=self.conn, if_exists=if_exists, chunksize=chunksize)
Some elements that might help:
Well, hex 92 and e9 is not valid utf8mb4 (UTF-8). Perhaps you were expecting ’été, assuming CHARACTER SETs cp1250, cp1256, cp1257, or latin1.
Find out where that text is coming from, and let's decide whether it is valid latin1. Then we can fix the code to declare that the client is really using latin1, not utf8mb4? Or we can fix the client to use UTF-8, which would probably be better in the long run.

CoreData: annotation: Failed to load optimized model error on google map sdk iOS 11

My code run on iOS 10.3 correctly. but on iOS 11 on simulator or my iPhone get this error:
CoreData: annotation: Failed to load optimized model at path '/Users/imohammadi/Library/Developer/CoreSimulator/Devices/054E361B-16B2-43D6-9708-A59401DE29B8/data/Containers/Bundle/Application/71EBDC7D-4708-4349-A54B-08E3F6E38D48/iAtlas.app/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo'
When app run for first time, google map run correctlly, but after close and run again, app wants to load tiles from caches and crash by error.
downgrade GoogleMaps 2.2 and upgrade to last version cocoapods not solved error.
All log is here:
["/Users/imohammadi/Library/Developer/CoreSimulator/Devices/054E361B-16B2-43D6-9708-A59401DE29B8/data/Containers/Data/Application/71371217-5D6D-4BC1-97C4-4ED1FEBDF8EF/Documents"]
2017-10-22 15:39:11.908262+0330 iAtlas[19195:648732] [MC] Lazy loading NSBundle MobileCoreServices.framework
2017-10-22 15:39:11.909174+0330 iAtlas[19195:648732] [MC] Loaded MobileCoreServices.framework
2017-10-22 15:39:11.927694+0330 iAtlas[19195:648732] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/imohammadi/Library/Developer/CoreSimulator/Devices/054E361B-16B2-43D6-9708-A59401DE29B8/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
CoreData: annotation: Failed to load optimized model at path '/Users/imohammadi/Library/Developer/CoreSimulator/Devices/054E361B-16B2-43D6-9708-A59401DE29B8/data/Containers/Bundle/Application/F46E955A-F5B6-42A8-B435-3A488DB69C55/iAtlas.app/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo'
CoreData: annotation: Failed to load optimized model at path '/Users/imohammadi/Library/Developer/CoreSimulator/Devices/054E361B-16B2-43D6-9708-A59401DE29B8/data/Containers/Bundle/Application/F46E955A-F5B6-42A8-B435-3A488DB69C55/iAtlas.app/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo'
CoreData: annotation: Failed to load optimized model at path '/Users/imohammadi/Library/Developer/CoreSimulator/Devices/054E361B-16B2-43D6-9708-A59401DE29B8/data/Containers/Bundle/Application/F46E955A-F5B6-42A8-B435-3A488DB69C55/iAtlas.app/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo'
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 19195, TID: 649127, Thread name: com.google.Maps.LabelingBehavior, Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 iAtlas 0x000000010f3049a4 GMSIsApplicationInBackground + 53
5 iAtlas 0x000000010f2f2bfa -[GMSForegroundDispatchQueue initWithName:targetQueue:] + 269
6 iAtlas 0x000000010f3d2a6e _ZN7gmscore6vector4text8GlyphSetC2ERKNS_4base10reffed_ptrINS0_16TextureAtlasPoolEEEPU28objcproto17OS_dispatch_queue8NSObjectPK8__CTFontff + 344
7 iAtlas 0x000000010f3d1ed8 _ZN7gmscore6vector4text10GlyphCache11GetGlyphSetEPK8__CTFontf + 214
8 iAtlas 0x000000010f3cf98e _ZN7gmscore6vector4text6GLText14PrefetchGlyphsERKNS_4base10reffed_ptrINS1_10GlyphCacheEEERKNSt3__16vectorItNS9_9allocatorItEEEEPK8__CTFontf + 22
9 iAtlas 0x000000010f3cfa91 _ZN7gmscore6vector4text6GLText14PrefetchGlyphsERKNS_4base10reffed_ptrINS1_10GlyphCacheEEEPK8__CTLinebf + 207
10 iAtlas 0x000000010f32775f _ZN7gmscore6vector12GLPointLabel22PrefetchGlyphsForGroupEPNS0_12GLLabelGroupE + 181
11 iAtlas 0x000000010f327687 _ZN7gmscore6vector12GLPointLabel14PrefetchGlyphsEv + 33
12 iAtlas 0x000000010f3966aa _ZN7gmscore6vector16LabelingBehavior23CreatePendingOperationsERKNSt3__13setINS_4base10reffed_ptrINS0_7GLLabelEEENS2_4lessIS7_EENS2_9allocatorIS7_EEEESE_SE_NS0_13LabelDrawModeE + 1096
13 iAtlas 0x000000010f39601d _ZN7gmscore6vector16LabelingBehavior14RunLabelingJobERKNS_4base10reffed_ptrINS1_11LabelingJobEEE + 357
14 iAtlas 0x000000010f395eaa ___ZN7gmscore6vector16LabelingBehavior14CommitInternalEPNS_8renderer14EntityRendererE_block_invoke + 22
15 Foundation 0x0000000113fad948 __NSThreadPerformPerform + 334
16 CoreFoundation 0x0000000114bac2b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 CoreFoundation 0x0000000114c4bd31 __CFRunLoopDoSource0 + 81
18 CoreFoundation 0x0000000114b90c19 __CFRunLoopDoSources0 + 185
19 CoreFoundation 0x0000000114b901ff __CFRunLoopRun + 1279
20 CoreFoundation 0x0000000114b8fa89 CFRunLoopRunSpecific + 409
21 Foundation 0x0000000113f67e5e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 274
22 iAtlas 0x000000010f3d1165 -[GMSx_GTMSimpleWorkerThread main] + 337
23 Foundation 0x0000000113f758ac __NSThread__start__ + 1197
24 libsystem_pthread.dylib 0x00000001162f36c1 _pthread_body + 340
25 libsystem_pthread.dylib 0x00000001162f356d _pthread_body + 0
26 libsystem_pthread.dylib 0x00000001162f2c5d thread_start + 13
2017-10-22 15:39:13.649828+0330 iAtlas[19195:649127] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 19195, TID: 649127, Thread name: com.google.Maps.LabelingBehavior, Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 iAtlas 0x000000010f3049a4 GMSIsApplicationInBackground + 53
5 iAtlas 0x000000010f2f2bfa -[GMSForegroundDispatchQueue initWithName:targetQueue:] + 269
6 iAtlas 0x000000010f3d2a6e _ZN7gmscore6vector4text8GlyphSetC2ERKNS_4base10reffed_ptrINS0_16TextureAtlasPoolEEEPU28objcproto17OS_dispatch_queue8NSObjectPK8__CTFontff + 344
7 iAtlas 0x000000010f3d1ed8 _ZN7gmscore6vector4text10GlyphCache11GetGlyphSetEPK8__CTFontf + 214
8 iAtlas 0x000000010f3cf98e _ZN7gmscore6vector4text6GLText14PrefetchGlyphsERKNS_4base10reffed_ptrINS1_10GlyphCacheEEERKNSt3__16vectorItNS9_9allocatorItEEEEPK8__CTFontf + 22
9 iAtlas 0x000000010f3cfa91 _ZN7gmscore6vector4text6GLText14PrefetchGlyphsERKNS_4base10reffed_ptrINS1_10GlyphCacheEEEPK8__CTLinebf + 207
10 iAtlas 0x000000010f32775f _ZN7gmscore6vector12GLPointLabel22PrefetchGlyphsForGroupEPNS0_12GLLabelGroupE + 181
11 iAtlas 0x000000010f327687 _ZN7gmscore6vector12GLPointLabel14PrefetchGlyphsEv + 33
12 iAtlas 0x000000010f3966aa _ZN7gmscore6vector16LabelingBehavior23CreatePendingOperationsERKNSt3__13setINS_4base10reffed_ptrINS0_7GLLabelEEENS2_4lessIS7_EENS2_9allocatorIS7_EEEESE_SE_NS0_13LabelDrawModeE + 1096
13 iAtlas 0x000000010f39601d _ZN7gmscore6vector16LabelingBehavior14RunLabelingJobERKNS_4base10reffed_ptrINS1_11LabelingJobEEE + 357
14 iAtlas 0x000000010f395eaa ___ZN7gmscore6vector16LabelingBehavior14CommitInternalEPNS_8renderer14EntityRendererE_block_invoke + 22
15 Foundation 0x0000000113fad948 __NSThreadPerformPerform + 334
16 CoreFoundation 0x0000000114bac2b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 CoreFoundation 0x0000000114c4bd31 __CFRunLoopDoSource0 + 81
18 CoreFoundation 0x0000000114b90c19 __CFRunLoopDoSources0 + 185
19 CoreFoundation 0x0000000114b901ff __CFRunLoopRun + 1279
20 CoreFoundation 0x0000000114b8fa89 CFRunLoopRunSpecific + 409
21 Foundation 0x0000000113f67e5e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 274
22 iAtlas 0x000000010f3d1165 -[GMSx_GTMSimpleWorkerThread main] + 337
23 Foundation 0x0000000113f758ac __NSThread__start__ + 1197
24 libsystem_pthread.dylib 0x00000001162f36c1 _pthread_body + 340
25 libsystem_pthread.dylib 0x00000001162f356d _pthread_body + 0
26 libsystem_pthread.dylib 0x00000001162f2c5d thread_start + 13
2017-10-22 15:39:15.284603+0330 iAtlas[19195:649136] [BoringSSL] Function boringssl_context_get_peer_sct_list: line 1754 received sct extension length is less than sct data length
2017-10-22 15:39:15.562982+0330 iAtlas[19195:649136] [BoringSSL] Function boringssl_context_get_peer_sct_list: line 1754 received sct extension length is less than sct data length
2017-10-22 15:39:16.191452+0330 iAtlas[19195:648732] Google Maps SDK for iOS version: 2.4.30121.0
2017-10-22 15:39:16.195285+0330 iAtlas[19195:649136] TIC Read Status [1:0x0]: 1:57
2017-10-22 15:39:16.195452+0330 iAtlas[19195:649136] TIC Read Status [1:0x0]: 1:57
This issue was reported in Google issue tracker:
https://issuetracker.google.com/issues/64504919
As I can see, the issue was marked as fixed today (October 24, 2017). The Google rep wrote
We believe that this issue should be solved in the Maps iOS SDK v2.5 release. If this issue still occurs, please let us know.
It looks like you have to update your SDK to the latest version 2.5 in order to solve the problem.
UPDATE
It looks like the issue wasn't solved in version 2.5, the bug was reopened in Google issue tracker.

Mix Ide mac Crash on launch

i have issues to install Mix, i updated everything and still have the same issue :
Process: Mix-ide [29364]
Path: /usr/local/Cellar/cpp-ethereum/1.2.4/Mix-ide.app/Contents/MacOS/Mix-ide
Identifier: .
Version: ??? (mix )
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Mix-ide [29364]
User ID: 501
Date/Time: 2016-05-03 16:09:56.394 +0200
OS Version: Mac OS X 10.11.4 (15E65)
Report Version: 11
Anonymous UUID: 13C99257-E029-CFC4-7857-A40E5D5F192E
Sleep/Wake UUID: 56AA9A03-8627-4D70-87F0-8D3C65C820CA
Time Awake Since Boot: 97000 seconds
Time Since Wake: 5700 seconds
System Integrity Protection: enabled
Crashed Thread: 3 QThread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY
Thread 0:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libethereum.dylib 0x0000000113024880 0x112f4b000 + 891008
1 libethereum.dylib 0x0000000112fdeb9d dev::eth::ChainParams::genesisBlock() const + 1081
2 libethereum.dylib 0x0000000112f9264c dev::eth::BlockChain::genesis() const + 164
3 libethereum.dylib 0x0000000112f921db dev::eth::BlockChain::init(dev::eth::ChainParams const&, std::__1::basic_string, std::__1::allocator > const&) + 171
4 libethereum.dylib 0x0000000112f91e9f dev::eth::BlockChain::BlockChain(dev::eth::ChainParams const&, std::__1::basic_string, std::__1::allocator > const&, dev::WithExisting, std::__1::function const&) + 979
5 . 0x000000010d03afbd dev::mix::MixBlockChain::MixBlockChain(std::__1::basic_string, std::__1::allocator > const&, std::__1::unordered_mapdev::FixedHash<20u, dev::eth::Account, std::__1::hashdev::FixedHash<20u >, std::__1::equal_todev::FixedHash<20u >, std::__1::allocatorstd::__1::pair<dev::FixedHash<20u const, dev::eth::Account> > > const&) + 99
6 . 0x000000010d03b864 dev::mix::MixClient::resetState(std::__1::unordered_mapdev::FixedHash<20u, dev::eth::Account, std::__1::hashdev::FixedHash<20u >, std::__1::equal_todev::FixedHash<20u >, std::__1::allocatorstd::__1::pair<dev::FixedHash<20u const, dev::eth::Account> > > const&, dev::SecureFixedHash<32u> const&) + 490
7 . 0x000000010d03b51c dev::mix::MixClient::MixClient(std::__1::basic_string, std::__1::allocator > const&) + 300
8 . 0x000000010cfd96da dev::mix::ClientModel::init(QString) + 446
9 . 0x000000010d073cc8 0x10cfcc000 + 687304
10 . 0x000000010d074aea dev::mix::ClientModel::qt_metacall(QMetaObject::Call, int, void) + 112
11 org.qt-project.QtQml 0x00000001123c540b 0x112248000 + 1561611
12 org.qt-project.QtQml 0x00000001123c3ec0 0x112248000 + 1556160
13 org.qt-project.QtQml 0x00000001123c326b QV4::QObjectMethod::callInternal(QV4::CallData) const + 1099
14 org.qt-project.QtQml 0x00000001123d8656 QV4::Runtime::callProperty(QV4::ExecutionEngine, int, QV4::CallData) + 1206
15 ??? 0x0000000118c5af7e 0 + 4710575998
16 org.qt-project.QtQml 0x000000011236fb59 0x112248000 + 1211225
17 org.qt-project.QtQml 0x0000000112467894 QQmlJavaScriptExpression::evaluate(QV4::CallData, bool*) + 644
18 org.qt-project.QtQml 0x000000011240e26d QQmlBoundSignalExpression::evaluate(void) + 829
19 org.qt-project.QtQml 0x000000011240e975 0x112248000 + 1862005
20 org.qt-project.QtQml 0x00000001124482f5 QQmlNotifier::emitNotify(QQmlNotifierEndpoint, void) + 741
21 org.qt-project.QtCore 0x00000001129891a7 QMetaObject::activate(QObject, int, int, void) + 199
22 org.qt-project.QtQml 0x000000011247d5fd 0x112248000 + 2315773
23 org.qt-project.QtQml 0x0000000112404049 QQmlComponentPrivate::complete(QQmlEnginePrivate, QQmlComponentPrivate::ConstructionState) + 73
24 org.qt-project.QtQml 0x0000000112402269 QQmlComponentPrivate::completeCreate() + 41
25 org.qt-project.QtQml 0x0000000112403a22 QQmlComponent::create(QQmlContext) + 114
26 org.qt-project.QtQml 0x000000011246fcbf QQmlApplicationEnginePrivate::_q_finishLoad(QObject) + 111
27 org.qt-project.QtQml 0x0000000112470292 QQmlApplicationEngine::load(QUrl const&) + 34
28 . 0x000000010d033cb1 dev::mix::MixApplication::MixApplication(int&, char) + 115
29 . 0x000000010d033789 main + 42
30 libdyld.dylib 0x00007fff91fe15ad start + 1
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff97dfdefa kevent_qos + 10
1 libdispatch.dylib 0x00007fff930df165 _dispatch_mgr_invoke + 216
2 libdispatch.dylib 0x00007fff930dedcd _dispatch_mgr_thread + 52
Thread 2:: QQmlThread
0 libsystem_kernel.dylib 0x00007fff97dfd07a __select + 10
1 org.qt-project.QtCore 0x00000001129aaf43 qt_safe_select(int, fd_set, fd_set, fd_set, timespec const) + 547
2 org.qt-project.QtCore 0x00000001129abe75 QEventDispatcherUNIXPrivate::doSelect(QFlagsQEventLoop::ProcessEventsFlag, timespec*) + 709
3 org.qt-project.QtCore 0x00000001129ad2b7 QEventDispatcherUNIX::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 231
4 org.qt-project.QtCore 0x000000011294ffe5 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 421
5 org.qt-project.QtCore 0x000000011278a843 QThread::exec() + 115
6 org.qt-project.QtQml 0x0000000112481e89 0x112248000 + 2334345
7 org.qt-project.QtCore 0x000000011278e2fa 0x112765000 + 168698
8 libsystem_pthread.dylib 0x00007fff9979199d _pthread_body + 131
9 libsystem_pthread.dylib 0x00007fff9979191a _pthread_start + 168
10 libsystem_pthread.dylib 0x00007fff9978f351 thread_start + 13
the whole error below :
<script src="https://gist.github.com/louisCharpentier/7f1348f6e1ae234814d9b31d426341dd.js"></script>
i ve already uninstall and re install, nothing as worked so far.
if you have any answer, thank you

Exception when undoing deletion of managed objects: "Illegal attempt to establish a relationship between objects in different contexts"

I have received some reports from customers with this exception:
'Illegal attempt to establish a relationship 'titleBox' between objects in different contexts
0 CoreFoundation 0x96a856ca __raiseError + 410
1 libobjc.A.dylib 0x921535a9 objc_exception_throw + 56
2 CoreFoundation 0x96ad0a21 -[NSException raise] + 17
3 ExceptionHandling 0x998d44c5 -[NSExceptionHandler _handleException:mask:] + 1877
4 ExceptionHandling 0x998d3d52 NSExceptionHandlerExceptionRaiser + 228
5 libobjc.A.dylib 0x921535a9 objc_exception_throw + 56
6 CoreData 0x92da3278 _PFManagedObject_coerceValueForKeyWithDescription + 1768
7 CoreData 0x92db9e8f _sharedIMPL_setvfk_core + 159
8 CoreData 0x92da2a56 -[NSManagedObject(_PFDynamicAccessorsAndPropertySupport) _setGenericValue:forKey:withIndex:flags:] + 54
9 CoreData 0x92dbd689 -[NSManagedObject(_NSInternalMethods) _maintainInverseRelationship:forProperty:oldDestination:newDestination:] + 505
10 CoreData 0x92dbd321 -[NSManagedObject(_NSInternalMethods) _didChangeValue:forRelationship:named:withInverse:] + 961
11 CoreData 0x92dbcf4b -[NSManagedObjectContext observeValueForKeyPath:ofObject:change:context:] + 187
12 Foundation 0x95d4502c NSKeyValueNotifyObserver + 372
13 Foundation 0x95d44acb NSKeyValueDidChange + 377
14 Foundation 0x95d292b6 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 127
15 CoreData 0x92dbce25 -[NSManagedObject didChangeValueForKey:] + 69
16 Sandvox 0x0006ecc6 -[KSExtensibleManagedObject didChangeValueForKey:] + 858
17 CoreData 0x92de9deb -[NSManagedObject(_NSInternalMethods) _updateFromToManyAwareSnapshot:forUndo:] + 683
18 CoreData 0x92de6540 -[NSManagedObject(_NSInternalMethods) _updateFromUndoSnapshot:] + 48
19 CoreData 0x92de5775 -[NSManagedObjectContext(_NSInternalChangeProcessing) _undoDeletions:] + 1093
20 Foundation 0x95eadb60 -[_NSUndoLightInvocation invoke] + 34
21 Foundation 0x95eadf60 -[_NSUndoStack popAndInvoke] + 265
22 Foundation 0x95eae2a0 -[NSUndoManager undoNestedGroup] + 342
We've not been able to reproduce it so far. It looks to me like Core Data is attempting to connect up one object which has been "un-deleted" with another that is yet to receive the same treatment. Why on earth would Core Data do this to itself?