larpon / QtFirebase

An effort to bring Google's Firebase C++ API to Qt + QML
MIT License
284 stars 83 forks source link

RemoteConfig crashes on subsequent calls to fetch() #37

Closed isipisi89 closed 3 years ago

isipisi89 commented 7 years ago

RemoteConfig crashes @ line 355 .cpp file.

As soon as this is called: remote_config::SetDefaults(defaults.get(), filteredMap.size());

defaults.get() and filteredMap.size() do work fine defaults.get() gives a pointer and filteredMap.size() gives the count in the array setted in qml.

Tested on IOS with Firebase 4.1.0 and the latest pull. Could someone test this if it crashes only 4 me?

larpon commented 7 years ago

Are you running off master branch? I thought I fixed this by holding references to the strings in __defaultsByteArrayList?

It worked on my test iPhone after this fix

isipisi89 commented 7 years ago

Okey found the "bug". If you request fetch() 2 x times back to back the app crashes. I think there should be a property to check if there is a fechrequest ongoing.

larpon commented 7 years ago

Yes there should indeed :)

borissoft commented 3 years ago

@Larpon Fixed in #161.

larpon commented 3 years ago

@Larpon Fixed in #161.

Fantastic! Thanks a lot!