[MOD-2337] (Android) When removing a pin from the map and then add it back, the application throws an error
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | None |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-05-25T19:07:15.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 6.1.0 |
| Components | n/a |
| Labels | qe-6.1.0, regression |
| Reporter | Samir Mohammed |
| Assignee | Yordan Banev |
| Created | 2017-05-18T23:24:23.000+0000 |
| Updated | 2018-08-06T17:49:37.000+0000 |
Description
When adding pins on to a map using the Copy the the following files in the attachments section from this ticket in to the project (
Build the android module from the repo you just downloaded (This can be done by going in to
Go to the
Add the
Go to
press the
Press the
ti.map module after they have been removed the application throws an error.
*Test Steps:*
Create a Titanium project
Copy the the following files in the attachments section from this ticket in to the project (app.js and CurvyRoutes.JS) under the resources directory
Download the map module from https://github.com/appcelerator-modules/ti.map
Build the android module from the repo you just downloaded (This can be done by going in to ti.map/android from the CLI and running the following command appc run --build-only
Go to the dist folder which will be created and then extract the module and add it to your existing modules
Add the ti.map module in to your project
Run the application
Go to annotation test
press the RM ALL button
You should see all pins being removed
Press the ADD ALL button
Application will crash
*Expected result* Pins should be added without any issues. *Actual result* Application crashes and the following error is shown:
[ERROR] : TiExceptionHandler: (main) [4126,11648] ----- Titanium Javascript Runtime Error -----
[ERROR] : TiExceptionHandler: (main) [0,11648] - In /app.js:416,6
[ERROR] : TiExceptionHandler: (main) [0,11648] - Message: Uncaught Attempt to invoke virtual method 'com.google.android.gms.maps.model.MarkerOptions com.google.android.gms.maps.model.MarkerOptions.position(com.google.android.gms.maps.model.LatLng)' on a null object reference
[ERROR] : TiExceptionHandler: (main) [0,11648] - Source: map.addAnnotations([anno, anno2, anno3, anno4]);
[ERROR] : V8Exception: Exception occurred at /app.js:416: Uncaught Attempt to invoke virtual method 'com.google.android.gms.maps.model.MarkerOptions com.google.android.gms.maps.model.MarkerOptions.position(com.google.android.gms.maps.model.LatLng)' on a null object reference
[ERROR] : V8Exception: Attempt to invoke virtual method 'com.google.android.gms.maps.model.MarkerOptions com.google.android.gms.maps.model.MarkerOptions.position(com.google.android.gms.maps.model.LatLng)' on a null object reference
Attachments
| File | Date | Size |
|---|---|---|
| app.js | 2017-05-18T22:54:28.000+0000 | 52816 |
| CurvyRoutes.js | 2017-05-18T22:54:30.000+0000 | 3382 |
ti.map: https://github.com/appcelerator-modules/ti.map/pull/202
FR Passed, test and other information can be found at: https://github.com/appcelerator-modules/ti.map/pull/202
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.