macOS Sierra 10.12.4
MacBook Pro (Retina, 13-inch, Early 2015)
2,9 GHz Intel Core i5
8 GB 1867 Mhz DDR3
Intel Iris Graphics 6100 1536 MB
I wrote a simple Swift program for college and ran into a problem. After compiling it for Release it started crashing on line 58 with the following error:
MNP3(4498,0x1008b53c0) malloc: *** error for object 0x10200e600: incorrect checksum for freed object - object was probably modified after being freed.
The strange thing is, when I replace the line 58 with:
predictedPoints += [(distanceWeDontKnowHeightFor, searchedHeight)]
so basically use "+=" instead of ".append" to append an element, the problem vanishes.
I attached two files in this ticket, the first one is obviously the source code. The second contains data needed for my program to run. If you want to try it by yourself you should specify the path to the second file in the line 12 of the source code.