Workaround for "AssertMacros: queueEntry, file: /SourceCache/IOKitUser_Sim/IOKitUser-920.1.11/hid.subproj/IOHIDEventQueue.c, line: 512"

I am busy recently with testing some apps under iOS 7 Beta 5. Now while running the app, the debug console keeps outputting some useless information like:

AssertMacros: queueEntry, file: /SourceCache/IOKitUser_Sim/IOKitUser-920.1.11/hid.subproj/IOHIDEventQueue.c, line: 512

 It is really annoying and makes the debug info useless, since it appears every time when I touch the screen. Thanks 0xced, now here is a workaround solution for that:

Here is a workaround to this annoying problem.

  1. Download fishhook
  2. Copy fishhook.h and fishhook.c in your project
  3. Compile this file (QuietAssertMacros.c) in your project:

#include <dlfcn.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "fishhook.h"

int slient_fprintf(FILE * restrict stream, const char * restrict format, ...)
    if (strncmp(format, "AssertMacros:", 13) == 0)
        return 0;
        va_list args;
        va_start(args, format);
        int result = vfprintf(stream, format, args);
        return result;

__attribute__((constructor)) void QuietAssertMacros(void)
    rebind_symbols((struct rebinding[1]){{"fprintf", slient_fprintf}}, 1);
Unfortunately, you will have to repeat these steps for every project you are working on.

via devforum apple

No comments: