We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5202 - Crash with UWP MessageBox
Summary: Crash with UWP MessageBox
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.12
Hardware: x86_64 Windows 10
: P2 blocker
Assignee: David Ludwig
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.14
Depends on:
Blocks:
 
Reported: 2020-06-19 12:05 UTC by moemod
Modified: 2020-07-16 17:27 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description moemod 2020-06-19 12:05:16 UTC
I have a UWP program built with SDL2. After I update to a newer version, it crashes after clicking a button on messagebox. 

A Platform::InvalidCastException was thrown at https://github.com/spurious/SDL-mirror/commit/1758af58f5edc6872b441c844106f76129cae252#diff-8f71cf6c43858565f3bcf4987c98e3c7R107

Built with MSVC 19.26 and Windows SDK 10.0.18362, x64.

After I roll back this commit, everything works fine. Is this change safe?
Comment 1 Ryan C. Gordon 2020-07-16 17:27:18 UTC
I believe (but have not tested) that this is fixed in https://hg.libsdl.org/SDL/rev/8e63abf94443

It looks like we accidentally cast a pointer to an int, which chops off the top half on 64-bit platforms, so we cast it to a size_t instead, now.

--ryan.