Why is it crash?!Help

when i use it as follows,it will crash! any one can help me ?why?

thats probably not where the crash is coming from. can you share the console crash message

One thing I use to help debug is this in main.mm

#include "ofApp.h"
#include "ofMain.h"

void onException(NSException *exception)
    NSArray *stack = [exception callStackReturnAddresses];
    NSLog(@"Stack trace: %@", stack);

void signal_handler(int signum)

int main() {
    struct sigaction new_action;
    new_action.sa_handler = signal_handler;
    sigaction(SIGABRT, &new_action, NULL);
    sigaction(SIGILL, &new_action, NULL);
    sigaction(SIGSEGV, &new_action, NULL);
    sigaction(SIGBUS, &new_action, NULL);
    sigaction(SIGPIPE, &new_action, NULL);