Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after sleep #1

Open
ris58h opened this issue Jul 29, 2022 · 3 comments
Open

Crash after sleep #1

ris58h opened this issue Jul 29, 2022 · 3 comments

Comments

@ris58h
Copy link

ris58h commented Jul 29, 2022

I get EXC_BAD_INSTRUCTION when laptop wakes up after sleep.

Stack trace:

#0	0x00007ff817e8a02a in _CFRelease.cold.3 ()
#1	0x00007ff817e1e541 in _CFRelease ()
#2	0x000000010e2c5a1a in -[M5MultitouchManager stopHandlingMultitouchEvents] at PROJECT_DIR/Pods/M5MultitouchSupport/M5MultitouchSupport/M5MultitouchManager.m:236
#3	0x000000010e2c5b78 in __55-[M5MultitouchManager restartHandlingMultitouchEvents:]_block_invoke at PROJECT_DIR/Pods/M5MultitouchSupport/M5MultitouchSupport/M5MultitouchManager.m:241

It seems like it's an issue with MTDeviceRelease(mtDevice); line. When I comment out this line it works fine.

@artginzburg
Copy link

Looks like MTDeviceRelease() sort of happens automatically on system sleep, and an object can't be released twice.

I bet the same error will be thrown if you try running MTDeviceRelease() before MTRegisterContactFrameCallback() and MTDeviceStart().

@lwouis
Copy link

lwouis commented Feb 21, 2023

Maybe interesting?

@ris58h
Copy link
Author

ris58h commented Feb 22, 2023

I've found out that checking that device is running as it's done in OpenMultitouchSupport prevents from a crash after sleep DOESN'T HELP.

UPDATE:
I've checked one more time and the issue is still here. Only not releasing a device works for me as it's done in Touch-Tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants