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

Activator incompatibility #1

Open
cgm616 opened this issue Aug 30, 2016 · 5 comments
Open

Activator incompatibility #1

cgm616 opened this issue Aug 30, 2016 · 5 comments
Assignees

Comments

@cgm616
Copy link
Owner

cgm616 commented Aug 30, 2016

On occasion VolumeBar9 and Activator will crash the Springboard, I think because of the hook on VolumeControl.

Hard to test; hard to reproduce.

Log files:

@cgm616 cgm616 added the bug label Aug 30, 2016
@cgm616
Copy link
Owner Author

cgm616 commented Aug 31, 2016

Probably not a incompatibility? All the logs I've seen crash on -[VolumeBar resetTimer]

@cgm616 cgm616 self-assigned this Aug 31, 2016
@cgm616
Copy link
Owner Author

cgm616 commented Aug 31, 2016

Logs with activator uninstalled:

This confirms that it's definitely something with only VolumeBar9.

@cgm616
Copy link
Owner Author

cgm616 commented Sep 2, 2016

When adding logging to the tweak, the problem seems to disappear. Still hard to know for sure. Below is what was added.

VolumeBar.xm

-(void)resetTimer {
  HBLogDebug(@"in resetTimer");
  if(hide != nil) {
    HBLogDebug(@"hide exists");
    [hide invalidate];
    HBLogDebug(@"hide invalidated");
    hide = nil;
    HBLogDebug(@"hide = nil now");
    hide = [NSTimer scheduledTimerWithTimeInterval:_delayTime target:self selector:@selector(_hideHUD) userInfo:nil repeats:NO];
    HBLogDebug(@"new hide created");
  }
}

Tweak.xm

%hook VolumeControl

-(void)increaseVolume {
  HBLogDebug(@"hooked increaseVolume");
  if(active && vbar != nil) {
    HBLogDebug(@"calling resetTimer");
    [vbar resetTimer];
  }

  %orig;
}

%end

cgm616 added a commit that referenced this issue Sep 8, 2016
Trying to mass-bugtest #1.
@cgm616
Copy link
Owner Author

cgm616 commented Sep 25, 2016

One report has come in that the crash is actually from pressing the volume buttons and calling resetTimer while the banner is animating away.

@cgm616
Copy link
Owner Author

cgm616 commented Sep 25, 2016

I was able to reproduce it in this way! Sweet, should be a relatively easy fix to disable any functionality of resetTimer after hideHUD has been called.

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

No branches or pull requests

1 participant