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

From 1.3.0 crash when select a station automatically added or via station name [Linux / avf-native] #202

Closed
Ades128 opened this issue Nov 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Ades128
Copy link

Ades128 commented Nov 3, 2024

On 1.3.0 b4
During investigations on issue#157 I found that in adding manual frequency it works.

Currently using:
6.11.6-arch1-1
pipewire-pulse 1:1.2.6-1
alsa-utils 1.2.12-1
gnome 47.0.1
xorg-server 21.1.14-1
libpulse 17.0-3

May be issue#157 was resolved with last updates ?

I found in backend/extern/afv-native/src/core/atcClient.cpp
line 499:

ClientEventCallback.invokeAll(ClientEventType::StationTransceiversUpdated,
                                  (void *) stationName.c_str(), nullptr); 

With LOG point investigations I found that stationName.c_str() returns a const char* instead void*

I didn't make further investigations to know why, specially on my system, but here a workaround:

std::string stationNameCopy = stationName;
      ClientEventCallback.invokeAll(ClientEventType::StationTransceiversUpdated, (void*)&stationNameCopy, nullptr); ```

hope it helps
@Ades128 Ades128 changed the title From 1.3.0 crash when select a station automaticaly added or via station name [Linux / avf-native]] From 1.3.0 crash when select a station automatically added or via station name [Linux / avf-native] Nov 3, 2024
@GeorgeBarlow GeorgeBarlow added the bug Something isn't working label Nov 3, 2024
@pierr3
Copy link
Owner

pierr3 commented Nov 4, 2024

I've received another report of the same.

Yes, stationName.c_str(), returns a const char*, and it's casted to void * (which prefixes it). Your workaround is a bit funky but I know how to fix this and will do!

@pierr3 pierr3 closed this as completed in d761558 Nov 4, 2024
@pierr3
Copy link
Owner

pierr3 commented Nov 4, 2024

Give it a try on the current build (will be in next beta), should be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants