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 issue #125

Open
lpdevcoding opened this issue Jun 27, 2023 · 7 comments
Open

Crash issue #125

lpdevcoding opened this issue Jun 27, 2023 · 7 comments

Comments

@lpdevcoding
Copy link

com.mapbox.common.Worker 2
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000008
0
MapboxSearch
mapbox::search::SearchRequestsRegistry::remove(unsigned long long) + 12
1
MapboxSearch
std::__1::__function::__func<mapbox::search::SearchOnline::retrieve(unsigned long long, mapbox::search::RequestOptions, mapbox::search::SearchResult, std::__1::function<void (mapbox::search::SearchResponse&&)>)::$_2, std::__1::allocator<mapbox::search::SearchOnline::retrieve(unsigned long long, mapbox::search::RequestOptions, mapbox::search::SearchResult, std::__1::function<void (mapbox::search::SearchResponse&&)>)::$_2>, void (mapbox::search::SearchResponse&&)>::operator()(mapbox::search::SearchResponse&&) + 52
2
MapboxSearch
std::__1::__function::__func<unsigned long long mapbox::search::SearchSession::sendRequest<mapbox::search::SearchSession::retrieve(std::__1::weak_ptrmapbox::search::SearchSession, unsigned long long, mapbox::search::RequestOptions, mapbox::search::SuggestAction, std::__1::function<void (mapbox::search::SearchResponse&&)>)::$_3>(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&, std::experimental::optional<std::__1::vector<unsigned char, std::__1::allocator>>, mapbox::search::SearchSession::retrieve(std::__1::weak_ptrmapbox::search::SearchSession, unsigned long long, mapbox::search::RequestOptions, mapbox::search::SuggestAction, std::__1::function<void (mapbox::search::SearchResponse&&)>)::$_3&&)::'lambda'(nonstd::expected_lite::expected<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>, mapbox::util::variant<mapbox::search::ConnectionError, mapbox::search::HttpError, mapbox::search::InternalError, mapbox::search::RequestCancelled>>&&), std::__1::allocator<unsigned long long mapbox::search::SearchSession::sendRequest<mapbox::search::SearchSession::retrieve(std::__1::weak_ptrmapbox::search::SearchSession, unsigned long long, mapbox::search::RequestOptions, mapbox::search::SuggestAction, std::__1::function<void (mapbox::search::SearchResponse&&)>)::$_3>(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&, std::experimental::optional<std::__1::vector<unsigned char, std::__1::allocator>>, mapbox::search::SearchSession::retrieve(std::__1::weak_ptrmapbox::search::SearchSession, unsigned long long, mapbox::search::RequestOptions, mapbox::search::SuggestAction, std::__1::function<void (mapbox::search::SearchResponse&&)>)::$_3&&)::'lambda'(nonstd::expected_lite::expected<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>, mapbox::util::variant<mapbox::search::ConnectionError, mapbox::search::HttpError, mapbox::search::InternalError, mapbox::search::RequestCancelled>>&&)>, void (nonstd::expected_lite::expected<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>, mapbox::util::variant<mapbox::search::ConnectionError, mapbox::search::HttpError, mapbox::search::InternalError, mapbox::search::RequestCancelled>>&&)>::operator()(nonstd::expected_lite::expected<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>, mapbox::util::variant<mapbox::search::ConnectionError, mapbox::search::HttpError, mapbox::search::InternalError, mapbox::search::RequestCancelled>>&&) + 680
3
MapboxCommon
mapbox::common::TaskSequence::scheduleTask(unsigned long long, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>>)::'lambda'()::operator()() const + 604
4
MapboxCommon
void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct>, mapbox::common::ThreadedSchedulerBase::makeSchedulerThread(unsigned long, mapbox::base::WeakPtrmapbox::common::Scheduler, mapbox::common::ThreadServiceType)::$_0>>(void*) + 784
5
libsystem_pthread.dylib
_pthread_start + 148
6
libsystem_pthread.dylib
thread_start + 8

@Lozz-off
Copy link

Any updates about this issue? I have the same issue, it's often crash my app, please fix it

@aokj4ck
Copy link
Contributor

aokj4ck commented Jan 22, 2024

@Lozz-off @lpdevcoding please share which SDK version you're using, steps to reproduce, and any additional information such as a sample project, APIs used causing this crash, or endpoints requested.

@Lozz-off
Copy link

@aokj4ck I'm using the latest release v1.0.0-rc.8, i don't have steps for reproducing, just getting the same stacktrace in firebase console

image

@RanaHossamA
Copy link

RanaHossamA commented Apr 8, 2024

The same issue occurs with me, where you able to solve it? @Lozz-off @lpdevcoding

@aokj4ck
Copy link
Contributor

aokj4ck commented Apr 8, 2024

@RanaHossamA do you see any differences in your stack trace? Are you able to provide more information on the actions and conditions that occur before this crash?

@rajshekhar16
Copy link

@aokj4ck I am currently using MapboxSearch 1.0.0-rc.8 and MapboxMaps 10.17.0. I am also facing this crash, I am doing reversegeocoding you can see below code for reference:
let placeAutocomplete = PlaceAutocomplete(accessToken: mapboxAccessToken) placeAutocomplete.suggestions(for: searchCoordinates) { result in ...... }

Also check the below image for reference:
Screenshot 2024-04-18 at 12 37 36 PM

Note: Due to some requirements we can't update MapboxMaps to 11 version series. So I have to stick to MapboxSearch 1.0.0-rc.8.

@aokj4ck
Copy link
Contributor

aokj4ck commented May 3, 2024

@rajshekhar16 I think the cause of your crash is that your let placeAutocomplete instance is being deallocated. Please move let placeAutocomplete out of the scope of the function and into a class or struct variable so that it is available even after your function exits.

@lpdevcoding please be sure to own your PlaceAutocomplete instances in class or struct variables so that they are not deallocated after your functions exit.

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

5 participants