-
Notifications
You must be signed in to change notification settings - Fork 388
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
SwipeView inside Popup crashes on Windows with System.AccessViolationException #1904
Comments
@nshtinkov , Is the result you are expecting below? 2024-08-01.16-53-39.mp4In my modified code, AccessViolationException is not occurring. If the Popup size is not specified, the Popup size is measured using the Measure method, but this problem occurred at that time. If SwipeControl is included in the popup's Content hierarchy, you need to call the Measure method when it can be called, and avoid calling the Measure method when it is not possible. By the way, SwipeControl's Measure method can be called when SwipeControl's IsLoaded property is true. If you can confirm the expected result, you can create a PR, but if the Popup's content includes SwipeControl, you will have to perform your own processing, and it is doubtful whether this will be accepted as a modification to the Popup. |
Yes this is it. Thank you for the detailed explanation. |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
On Windows, opening a
Popup
containing aSwipeView
crashes with "System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'"The same code works on Android.
Expected Behavior
Should not crash on Windows.
Steps To Reproduce
Link to public reproduction project repository
https://github.com/nshtinkov/SwipeView-BL-Crash
Environment
Anything else?
The crash happens in the call to
FrameworkElement.Measure()
on theSwipeView
. It may be a bug in MAUI, but I am posting it here because it only happens in aPopup
.Could be related to dotnet/maui#16735 ; the repro app is modified from that issue. However I can no longer reproduce the original issue.
The text was updated successfully, but these errors were encountered: