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

Null check operator used on a null value #124

Closed
aytunch opened this issue Jul 9, 2022 · 8 comments · Fixed by #132
Closed

Null check operator used on a null value #124

aytunch opened this issue Jul 9, 2022 · 8 comments · Fixed by #132

Comments

@aytunch
Copy link
Contributor

aytunch commented Jul 9, 2022

This happens sometimes and especially when I try to pinch&zoom. And the error goes away once we pan the map.

Also when the user presses on the permission button and the OS presents the location permission dialog, this error gets triggered more often.
The video is from a release build. In the debug build, we get the red error screen all over the map. And after a hot restart, the error goes away (cmd+s)

Notes: the cat marker is not part of a cluster marker. It lives at the last layer, above the cluster marker layers. And as you can see, it renders correctly
The moment I remove MarkerClusterLayerOptions from the code, error does not happen.

Has anyone came across with this problem before?
@lpongetti if you have some time and have any leads, I would be glad to help solve this issue along with you. Thanks for this awesome plugin.

EDIT:
Line 200 is the problematic line as the debugger shows.

Seems like we use the _clusterManager.spiderfyCluster!.markers while spiderfyCluster is null. Would a simple spiderfyCluster != null check fix this?

Screen Shot 2022-07-10 at 01 51 59

cluster_flicker.mov

Simulator Screen Shot - iPhone SE (3rd generation) - 2022-07-10 at 01 37 32

Screen Shot 2022-07-10 at 01 28 38

Screen Shot 2022-07-10 at 01 28 12

Screen Shot 2022-07-11 at 22 03 19

@Toolenaar
Copy link

Also having this issue

@aytunch
Copy link
Contributor Author

aytunch commented Jul 14, 2022

@rbellens Hi, I saw your PR #125
Do you think it solves this issue as well?
Thanks.

@rbellens
Copy link
Contributor

don't think it is related.

@pfraunlob
Copy link

Also having this issue

@ch-muhammad-adil
Copy link

Same problem.. Please fix....

@aytunch
Copy link
Contributor Author

aytunch commented Jul 19, 2022

Temporarily, you can use my Fork. I made several bug fixes in the Branch and made it so that you can use flutter_map 2.0.0

  flutter_map: ^2.0.0
  flutter_map_marker_cluster:
    git:
      url: https://github.com/aytunch/flutter_map_marker_cluster

@TitanKing
Copy link

Hi @aytunch, do you perhaps have a branch with all the fixes? I do not think the maintainer of the project have much time for this anymore.

@aytunch
Copy link
Contributor Author

aytunch commented Jul 20, 2022

@TitanKing I shared my fork above: https://github.com/aytunch/flutter_map_marker_cluster
The reason I am not opening a PR is because flutter_map_marker_popups maintainer has not updated his package.
In order to support flutter_map: ^2.0.0, I had to use someone's flutter_map_marker_popup fork.
And for publishable packages it does not allow to have forks in the pubspec.yaml.
If you want, I can open the PR with the pubspec.yaml warning. But it can not be accepted the way it is now.

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

Successfully merging a pull request may close this issue.

6 participants