after a look at both wrappers, i don't see error, it is basic wrapper and it should work properly...
i saw one thing on original MyKeypad_I2C.h but i don't know if it crash the program
on this file found on the web we have :
class MyKeypad_I2C
{
public:
MyKeypad_I2C(byte);
void setKeyCode(byte, byte);
void clearAllKeyCodes(void);
bool isReady(void);
byte receiveKey(int8_t);
void checkKey(void);
void printKeyCodes(void);
and we need :
class MyKeypad_I2C
{
public:
MyKeypad_I2C(byte i2cAdd);
void setKeyCode(byte code, byte index);
void clearAllKeyCodes(void);
bool isReady(void);
byte receiveKey(int8_t anzahl);
void checkKey(void);
void printKeyCodes(void);
i suppose it is OK for you because i suppose compilation should block
after you have to check witch library have an issue.
First you should write a small project with a loop and a lot of actions using all functions of library MyPCF8574
write a work, several word
write a but and several bits
and after read all bytes with check of content
and read all bit changed and check of content.
and multiple actions to use all functions.
and add several checks of memory+ stack in your loop to check this status.
and you will see if it is running without crash. it is a way to see if issue is due to this library.
good luck