-
Notifications
You must be signed in to change notification settings - Fork 10
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
Scalebar - unexpected exception #802
Comments
Hi @mmoosbac94, thank you for reporting. We'll take a look into the issue. In the meantime, are there any steps/user-interactions you've found that reliably reproduce the exception? Edit: I've slightly refactored the indentation in your code snippets for readability. |
@mmoosbac94 I've also noticed that from the code you've included, it looks like you may be using version 200.3.0 or possibly even earlier. The problematic area you've indicated above was refactored as of release 200.4.0. If you're in a position to test 200.4.0 - please check to see if you're still able to reproduce this issue. Thank you! |
@dfeinzimer Thanks for the quick reply! We are using the newest release 200.4.0. But the issue still persist. |
@mmoosbac94 I haven't had luck reproducing the issue so far. Would you please provide a few additional details, including:
Thanks! |
|
@dfeinzimer Thanks for trying it out. The details are:
spatialReference + unitsPerPoint are @State But it sounds interesting what @mhdostal said. Could that be possible and causing the issue? Every third try or so I get the exception: onChange(of: Optional) action tried to update multiple times per frame. once. And I can see in stacktrace that the exception is thrown in viewModel.update($0) and update(_ viewpoint: Viewpoint?) -> updateScale() from scalebar. |
Hi @mmoosbac94, even when testing with an iOS 17.5.1 device, I'm not able to reproduce the issue. That said, there are a few things I'd like to try. I've prepared two separate branches. If possible, please try both to see if either of them resolve the issue:
|
Hi @dfeinzimer, I tried both of your branches.
|
Hi @mmoosbac94, thank you for your feedback. I've identified a potential crashing condition. Please test once more with a third branch: "bug/802/c". If that branch still presents the issue, please consider providing a minimum reproducible example, including the definition of Thanks! |
Hi @dfeinzimer. Thanks for your changes. It seems that with these changes the app does not crash anymore! But sometimes I can still see the exception "onChange(of: Optional) action tried to update multiple times per frame.", but without a crash. |
@mmoosbac94 Great to hear this fixes the crash. This patch will likely make it into 200.5 which should be available very soon. As for the "onChange" warning you're still seeing; is there any clear indication which |
@dfeinzimer Sounds good. Thank you very much again for your effort! As I could see in stacktrace its definitely coming out of onChange(of: viewpoint) in Scalebar.swift. |
@mmoosbac94 Thank you for that information. We'll continue to investigate the warning. In the meantime, the crash fix is available in 200.5.0 as of today. |
Hi @mmoosbac94, can you please report whether this issue is still reproducible for you? Note that 200.6.0 is available as of today. |
Hi @dfeinzimer, for me the issue is not reproducible anymore since the fix in version 200.5.0. But sometimes I still get the warning mentioned above. |
Hello everybody,
we currently have the issue, that there often occurs an exception when using Scalebar:
"onChange(of: Optional) action tried to update multiple times per frame."
In stacktrace we can see that the exception is thrown in Scalebar.swift:
Scalebar.swift
ScalebarViewModel.swift
Generally its working correctly, and we have implemented it as shown in the example. But this exception occurs. Do you know this behaviour or do you have any idea why this happens?
Thank you
Marvin
The text was updated successfully, but these errors were encountered: