-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Native crash happening while running a time consuming function on Realm migration #6475
Comments
Maybe @cmelchior knows how to find the cause from a native stack trace |
@cmelchior Please take a look at this. I'm still stuck with this and can't figure out what the issue might be. |
After a ton of looking, finally figured out the code which is crashing the migration. Its encoding and decoding polylines methods which are causing the crash. These methods do bit manipulation to convert a list of points into a string and visa-versa.
Still not sure why specifically this code crashes the migration though. Working on a work-around now. |
@Abhiank Could you tell me some more information about |
I also have this issue. Could u share how to solve this native crash? Is it solved? or just cloesd?? |
@SangHyeon No it was not solved. It was simply closed by @bmunkholm. I mailed them but they responded by saying that since I was not a paying customer I couldn't be given priority. I solved it by working around it. What I did was put the polyline in a mid-state during migration and complete the migration of the data when the app code started executing. Basically I moved the time consuming stuff to be executed after the migration. I still have no idea what caused this issue though. |
@dd-david Aplogies for the late reply. I never got the tag notification. What I meant was that the encoding and decoding of the polyline works fully and the completed output is also printed in the log but still the migration crashes. So, even though the encodePolyine method was causing the migration to crash, it completed execution, printed the result and then crashed. The issue was never solved and I still have no idea what caused it. |
Hi, For the new version of my app, I need to make some major db changes and populate those with transformed values from the current db values. I've been able to successfully write the migration and transformation. On testing it on debug builds it has been working perfectly. Even though a time consuming function takes upto 2-4 seconds, it completes successfully.
However, very weirdly, on testing the migration on a release build, the same function crashes with a native error log. Here's the code I'm using :
After much trial and error, I've identified the Utils.encodePolyline(allPoints) to be the one due to which the crash is happening. Here's the crash log :
Here are some observations from the trying to figure out the cause :
I'm using realm gradle plugin 5.8.0
I'm really struggling with this and any help on this will is really appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: