eqMac icon indicating copy to clipboard operation
eqMac copied to clipboard

eqMac2 crashes after mac wakes up from sleep mode

Open darkstar-mx opened this issue 8 years ago • 16 comments

All the times I wake up my mac I need to restart eqMac2 because it doesn't provide any sound through the headset, additionally, exactly after wake up if I click in the icon (in the top bar) it closes automatically. I'll be glad to provide all of the information you might need. Right now the OS version is: macOS High Sierra, version 10.13.3

darkstar-mx avatar Mar 06 '18 14:03 darkstar-mx

Same problem here. Are you, by any chance, using a bluetooth headset? I assume it reconnects on wake and then causes problems for eqMac, as descirbed here #117 . Would also like this to be fixed :)

Cheers Slawa

SlawaGurevich avatar Mar 09 '18 07:03 SlawaGurevich

Might be related to that issue, however I use a USB headset.

darkstar-mx avatar Mar 09 '18 19:03 darkstar-mx

I too use a USB audio adapter, and if that is selected as the output when I close my lid, the app crashes when I open UI after waking the system.

alex-derzhi-sp avatar Mar 13 '18 16:03 alex-derzhi-sp

Also have this issue and using a FiiO DAC (https://www.amazon.com/FiiO-E10K-Headphone-Amplifier-Black/dp/B00LP3AMC2)

nickells avatar Mar 28 '18 18:03 nickells

First of all, I would like to apologize for the lack of communication and responses to the current issue and all other issues in general. I have made a conscious decision to focus most of my free time and focus on developing a more modern and new version of "eqMac". This means that I can't spend too much time looking back at old codebase and trying to make every user happy. This was the main reason I made this repository open-source, in hopes that other developers might help to sort out some issues and iron out all the bugs. Unfortunately, there are very few developers that are proficient in Core Audio and Objective-C or maybe they are just not interested in this repo, which I can understand. I promise that the next version will be much more polished and I will make some sort of a mainstream system were solving issues will be very easy and quick. Just sit tight and wait for a new release this coming summer. Thank you to everyone who gave "eqMac2" a try and I hope I won't disappoint you next time :)

Heres a sneak peak of the UI I am currently working on: screen shot 2018-05-07 at 20 14 47

nodeful avatar May 08 '18 20:05 nodeful

@nodeful This looks sweet, I'm very excited. Keep up the great work.

nickells avatar May 09 '18 15:05 nickells

I've been experiencing the same issue as above, but with one more caveat. When my application crashes, the regular system volume defaults to 100%. This has really been a troublesome knee-jerk because max volume on headphones is a bit painful to endure. Maybe this can be addressed in the next release?

dwilhel1 avatar Jun 18 '18 20:06 dwilhel1

How is eqMac 3 coming along? I am experiencing this issue on a daily basis and would love to either get a fix, or the new version.

nerolite avatar Oct 17 '18 11:10 nerolite

Yeah, get the same issue. And one more thing. Won't create a new thread cause @nodeful is on the new version, but may be you should thing of it while building it :)

After switching off (and => disconnecting) bluetooth headset while watching live video streaming, the video and sound become twitching every second. So hard that the video lags too. After quiting eqMac the problem with video and sound resolves.

Catch some bucks and likes from me, waiting for 3.0 :)

xternal avatar Nov 11 '18 17:11 xternal

also regularly experiencing crashes when wake from sleep.

jaybocc2 avatar Dec 04 '18 22:12 jaybocc2

I have the same issue. Bluetooth headphones are usually connected. It crashes on wake up every time.

mattparkins avatar Dec 20 '18 13:12 mattparkins

Hey I just encountered the same issue (I use bluetooth wireless headphone and it happened 100%). I had a quick look into the code. found that whenever the computer wakes up from sleep. It calls ->

-(void)wakeUpFromSleep{
    [deviceChangeWatcher invalidate];
    deviceChangeWatcher = nil;
    
    [EQHost deleteEQEngine];
    [Devices switchToOutputDeviceWithID:[EQHost getSelectedOutputDeviceID]];
    
    //delay the start a little so os has time to catchup with the Audio Processing
    [Utilities executeBlock:^{
        [self startWatchingDeviceChanges];
    } after:3];
}

You can see that the EQHost is calling deleteEQEngine, which nils the mEngine.

Later this called ->

+(NSArray*)getEQEngineFrequencyGains{
    Float32 *gains = mEngine->GetEqGains();
    int nGains = bandMode.intValue;
    NSMutableArray *convertedGains = [[NSMutableArray alloc] init];
    for(int i = 0; i < nGains; i++){
        [convertedGains addObject: mEngine ? [NSNumber numberWithFloat:gains[i]] : @0];
    }
    return convertedGains;
}

And it crashes at the second line, where it tries to access mEngine but it's nil.

I'm new to this plugin and not sure what exactly it does, maybe someone who knows more about it can answer me?

@nodeful

tonylin75 avatar Feb 07 '19 04:02 tonylin75

I'm unfamiliar with the inner workings of eqMac too, but presumably this is retrieving a list of levels for each frequency that you can play with and converting it to some other format.

Presumably it's delaying re-initialising mEngine after wake up for the OS to catch up but then calling a method that requires mEngine anyway instead of waiting.

I've never contributed to Open Source software before, I suppose it couldn't hurt to have a play!

On Thu, 7 Feb 2019 at 04:54, Tony Lin [email protected] wrote:

Hey I just encountered the same issue. I had a quick look into the code. found that whenever the computer wakes up from sleep. It calls ->

-(void)wakeUpFromSleep{ [deviceChangeWatcher invalidate]; deviceChangeWatcher = nil;

[EQHost deleteEQEngine];
[Devices switchToOutputDeviceWithID:[EQHost getSelectedOutputDeviceID]];

//delay the start a little so os has time to catchup with the Audio Processing
[Utilities executeBlock:^{
    [self startWatchingDeviceChanges];
} after:3];

}

You can see that the EQHost is calling deleteEQEngine, which nils the mEngine.

Later this called ->

+(NSArray*)getEQEngineFrequencyGains{ Float32 *gains = mEngine->GetEqGains(); int nGains = bandMode.intValue; NSMutableArray *convertedGains = [[NSMutableArray alloc] init]; for(int i = 0; i < nGains; i++){ [convertedGains addObject: mEngine ? [NSNumber numberWithFloat:gains[i]] : @0]; } return convertedGains; }

And it crashes at the second line, where it tries to access mEngine but it's nil.

I'm new to this plugin and not sure what exactly it does, maybe someone who knows more about it can answer me?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nodeful/eqMac2/issues/134#issuecomment-461288072, or mute the thread https://github.com/notifications/unsubscribe-auth/ABmBNpbQEM64WGzNMFAJwuRKp0_mNGbwks5vK7F-gaJpZM4Se2XU .

-- -m@

mattparkins avatar Feb 11 '19 11:02 mattparkins

Hey everyone. Excuse me for the lack of updates. I have been really busy on the new version of eqMac. I am happy to announce an open beta release. You can download it here: https://eqmac.app There are a lot of known bugs that I could not fix just yet:

  • Driver not installing from the first try. Sometimes need to restart eqMac a couple times.
  • Complex Device switching logic is not perfect (for example when switching off the device that's currently playing, plugging in new device etc.)
  • UI takes long to load (a lot can be done to improve that)
  • UI dimensions are not synching properly
  • There's a noticeable audio delay in the playback, so not suitable for video yet (I know where the problem lies just haven't had the time to fix yet)
  • Sometimes the playback doesn't start, in that case please try to switch the output to the device you want and eqMac should try and build the audio pipeline again.

So as you can see there's still some work to be done but at least it's a completely modern tech stack that I am fully willing to work on: 100% Swift, User Space driver and a Web UI, instead of C++, Kernel Drivers. As I said, should work on Catalina and should not have any pesky ear drum blasting volume bugs (at least I didn't come across any). I'm open to feedback and issue reports here: https://github.com/bitgapp/eqmac That repo will become the main repo for eqMac and this repo will be archived eventually. And yes it's called just eqMac, not eqMac3 :) And it will stay that way forever.

nodeful avatar Jan 08 '20 20:01 nodeful

Hey everyone 👋 I will be open sourcing the new version of eqMac, therefore, I am closing this issue and repository as I will be transfering nodeful/eqMac2 repo to bitgapp/eqMac Please bear with me for the next couple of days as I setup that new repo. The eqMac2 code will be living in the old-eqMac2 branch if anyone is interested in referencing it for whatever reason. Please try out the new version and report bugs to the new repo. Thanks for using eqMac.

nodeful avatar Apr 04 '20 16:04 nodeful

Moving the discussion of this issue to #227

nodeful avatar Apr 19 '20 19:04 nodeful