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

Android: vibrate one by one #7672

Open
wants to merge 1 commit into
base: master
from

Conversation

4 participants
@weihuoya
Copy link
Contributor

weihuoya commented Jan 4, 2019

vibrate too frequently may cause a null pointer exception on android.
so add a timestamp to check.

@Helios747

This comment has been minimized.

Copy link
Contributor

Helios747 commented Jan 4, 2019

That's actually really funny.

@weihuoya weihuoya force-pushed the weihuoya:android-rumble branch from 606356e to 041a9da Jan 4, 2019

@zackhow

This comment has been minimized.

Copy link
Member

zackhow commented Jan 4, 2019

How strange, I figured with the null checks it wouldn't happen :( Oh well.

Only issue I see is this will prevent a vibrate if two different controllers vibrate within 100ms of eachother. We would need to keep track of a 'lastVibrate' for all 8 pads + phone. Maybe change it to a size 9 array(pads are index 0-7, phone 8).

@weihuoya

This comment has been minimized.

Copy link
Contributor

weihuoya commented Jan 4, 2019

null pointer exception throw from android binder, test on my samsung s7 edge.

@weihuoya weihuoya force-pushed the weihuoya:android-rumble branch from 041a9da to b87b303 Jan 4, 2019

@weihuoya weihuoya force-pushed the weihuoya:android-rumble branch from b87b303 to dde2e72 Jan 4, 2019

@zackhow

This comment has been minimized.

Copy link
Member

zackhow commented Jan 4, 2019

null pointer exception throw from android binder, test on my samsung s7 edge.

Can you post this stacktrace?

@weihuoya

This comment has been minimized.

Copy link
Contributor

weihuoya commented Jan 4, 2019

null pointer exception throw from android binder, test on my samsung s7 edge.

Can you post this stacktrace?

I just remember vib.vibrate got null pointer of VibrationEffect, and I try to save VibrationEffect as a member variable, still throw null pointer exception.

@zackhow

This comment has been minimized.

Copy link
Member

zackhow commented Jan 4, 2019

null pointer exception throw from android binder, test on my samsung s7 edge.

Can you post this stacktrace?

I just remember vib.vibrate got null pointer of VibrationEffect, and I try to save VibrationEffect as a member variable, still throw null pointer exception.

Are you saying the result from VibrationEffect.createOneShot() was null?

@weihuoya

This comment has been minimized.

Copy link
Contributor

weihuoya commented Jan 4, 2019

yeah, it's weird.

@zackhow

This comment has been minimized.

Copy link
Member

zackhow commented Jan 4, 2019

Did you confirm that this occurs in master and not just in your fork, I do see a few changes to how rumble is inited.

@weihuoya

This comment has been minimized.

Copy link
Contributor

weihuoya commented Jan 4, 2019

It's weird exception, so I try a few changes on my fork to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment