[TIMOB-20585] Android : Crashing when we are at two map view in scrollable view and click go back
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Resolved |
Resolution | Needs more info |
Resolution Date | 2018-08-01T16:07:59.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | n/a |
Components | Android |
Labels | mapView |
Reporter | Aminul Islam |
Assignee | Ashraf Abu |
Created | 2016-03-16T20:22:15.000+0000 |
Updated | 2018-08-01T16:08:12.000+0000 |
Description
In this new window I have one button called go back and pressing this button will close this window and taking you to the first map view to the scrollable view.But this is crashing here when we are at 2 map view in scrollable view and click go back.
Please find the attached test project .
Environment
android 5.0.2
ti.map 2.3.6
Operating System
Name = Mac OS X
Version = 10.11.2
Architecture = 64bit
# CPUs = 4
Memory = 8589934592
Node.js
Node.js Version = 0.12.0
npm Version = 3.8.1
Titanium CLI
CLI Version = 5.0.6
Titanium SDK
SDK Version = 5.2.0.GA
SDK Path = /Users/Raju/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.GA
Target Platform = android
Thanks
Attachments
File | Date | Size |
---|---|---|
Android error log.rtf | 2016-04-13T07:08:08.000+0000 | 3690 |
SampleMap.zip | 2016-03-16T20:25:24.000+0000 | 8531177 |
sampleMapMultipleView.zip | 2016-04-13T07:07:41.000+0000 | 8414655 |
sampleMapMultipleView 2.zip | 2016-05-04T04:13:32.000+0000 | 8414773 |
Crash Logs:
[~aislam] Issue seems to be this part of the code:-
When you call the "moveToPage" on callback, the error as above occurs.
This occurs cause that method is being called when the other window is still present. Is that method necessary?
It seems that the purpose is to scroll to view 0 once you go back to the scrollable view. Here's a work around that works:- popup.js
index.js
The issue is scrollToView is being called while the popup window is closing in android and the scrollableview is coming back in view. Basically the sequence of things. The workaround code that I've written puts a listener on the mainview to scroll to view 0 once it comes back to focus. [~aislam] and [~rmitro] is this workaround okay? Calling scrollToView from a callback in another window is not really advisable.
[~msamah] For the second issue- if each view of the scrollable view has more views along with map view, then during the swiping to the left or right of the scrollable view also causes app crashes with the same error log. Please see the attached source code and error log. It is not happening all the time, but if you scroll left, right very quickly then it is happening. The Customer is using Samsung galaxy s6.
Thank you for the information. Will look into this.
[~rmitro] Was able to reproduce the crash. Here's a fix for that In the loadDetails.xml change line 31 to this:-
<ScrollableView id = "svCurrentLoad" cacheSize="5" currentPage="0" onScroll="onScrollCurrentPosition"/>
Basically to set ScrollableView to use a cache for the views with size 5. If they are going to use more views, the cacheSize should be equal or more to that. This should stop it from crashing. Let me know if it solves the issue. If everything is okay, I'll resolve this ticket.I'll resolve this as it seems there's no more updates or issues.
[~rmitro] Does running this on 5.2.2.GA cause any crash for you? It doesn't seem to be crashing on 5.2.2.GA. (I'm not using any cacheSize)