Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does middle guard protection failed %d mean?

Tags:

ios7

xcode5

When I build my app to my actual iPhone the debug area shows this:

[Allocator] Middle guard protection failed %d
[Allocator] Allocator invalid, falling back to malloc

It shows the 2nd line a total of 30 times. I have no idea what it means or how to fix it. It does not show this when I build to the simulator.

I am having issues with getting state preservation to work using storyboards and restoration ID's and I have a feeling this has something to do with a memory issue so it's dumping my memory and therefore I get no app restoration. Basically, when I go back to my app it shows me the last screen I was on for a second and then goes back to the root page.

Anyway, I'd like to fix this malloc stuff so I can at least rule it out the culprit, plus I don't want to have an issue with memory in general...

I've been googling this for a couple of weeks now too and can't find anything!

like image 395
jammyman34 Avatar asked Jun 25 '14 23:06

jammyman34


People also ask

What is Ntstatus?

NTSTATUS is a standard 32-bit datatype for system-supplied status code values. NTSTATUS values are used to communicate system information. They are of four types: success values, information values, warnings, and error values, as specified in [MS-ERREF].

What is NT status?

An NTSTATUS code is an error code used in Windows NT, Windows XP, Windows Vista, Windows, and Windows 8 to communicate error results throughout the operating system. Device driver developers use NTSTATUS codes both when they make calls into Windows APIs as well as when driver devleopers return error codes to Windows.


2 Answers

Looks like it's an issue with the Crashlytics framework. I have the same issue, and commenting this API call:

[Crashlytics startWithAPIKey:API_KEY];

removes that warning.

like image 92
andreamazz Avatar answered Sep 18 '22 20:09

andreamazz


It does indeed seem to be an issue at Crashlytics. I know from other threads that they raised the "Allocator invalid..." issue in relation to another Middle error (not Middle guard protection failed %d), which later got marked as fixed.

I fixed this by deleting all the crashlytics stuff and using the new fabric/crashlytics framework. Problem solved.

(Interestingly, I had it only on an iPad, my iPhone 5C made no complaints at all.)

like image 45
HenryRootTwo Avatar answered Sep 20 '22 20:09

HenryRootTwo