Arduino hangs on callback from library


I’ve been trying to make a library to manage button controls, The idea was simple, I create an instance like this:

Button myButton(Pin, timeout, callbackForSinglepress, CallbackForDoublePress, CallbackforHold)

the callbacks seem to bit difficult though.
I defined a type like this in the header file:

typedef void (*GeneralFunction) (void);

And use it like this in my source file:

Button::Button(int pin, unsigned long timoutd, GeneralFunction singlePress, GeneralFunction doublePress, GeneralFunction tripplePress, GeneralFunction hold){
    int _pin = pin;
    unsigned long _timeoutd = timoutd;
    GeneralFunction _singlePress = singlePress;
    GeneralFunction _doublePress = doublePress;
    GeneralFunction _tripplePress = tripplePress;
    GeneralFunction _hold = hold;
    attachInterrupt(_pin, interruptHandler, FALLING);

void Button::interruptHandler(){
    _count = 0 ;
    //analogWrite(5, 127);
    while(digitalRead(7)==0 && _count < 1000){
        _count = _count + 1;
    if(_count > 60 && _count < 1000){
        _n = _n + 1;
        _t = millis();
        _x = 1;
    } else if(_count >= 1000){
        _count = 0;
        Serial.println("Long press");
        _hold ();
        Serial.println("Long press end");
       // blink(1, 100); //has no delay

Yet when a callback should be executed the TX LED on the arduino goes high and it doesn’t respond to anything.

The delay function requires interrupts enabled, so won't work in an interrupt. I believe the delayMicroseconds function will work in an interrupt.

The code worked when it was in a normal interrupt (not in library), changed it anyways but the arduino still hangs when its supposed to execute the callback and the TX LED remains high.