Tag Archives: swift

Abnormal crash of APP startup — pointer being free was not allocated * * set a breakpoint in malloc_ error_ break to debug

1. Problem scene
APP startup exception crashes

BlockChainStep(1332,0x7000057ad000) malloc: * error for object 0x600000008300: pointer being freed was not allocated
* set a breakpoint in malloc_error_break to debug

Second, the cause of the crash

In Xcode8 this will occur if your image resource file has 16 bitmaps or if the image display mode is P3 and the Deployment Target is below iOS9.3. (As a matter of fact, a small button appeared in the project of our company, which caused this crash. I don’t know how the designer made this special picture…) If your App needs to support the wide color functionality, you’ll have to set the Deployment Target to above iOS9.3. If your APP doesn’t need to support wide color functionality and you want to be compatible with the older versions of iOS, you’ll need to convert all the 16-bit or P3 images to 8-bit sRGB assets

3. Solutions
Convert image to 8-bit sRGB Assets format
Reference article: Xcode assets problem caused by running iOS8 crash solution

[How to Fix] Fatal error: init(coder:) has not been implemented

The problem
Customize view and then use xib to load this view. Run it and then crash :

Thread 1: Fatal error: init(coder:) has not been implemented

The solution
will

required init?(coder aDecoder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
}

Just call the superclass method instead:

required init?(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)
}

swift stdlib tool error is reported after xcode upgrade xcode9 1

The computer was upgraded to 10.13.1, and Xcode was upgraded to Xcode9.1. But when the original operation was ok, swift Stdlib tool error was reported, and DerivedData was searched, re-Pod install, and deleted. The last time I saw a restart, another error occurred after the restart

baidu again, said to set the key string certificate to always trust, the result is still not believe