microsoft / microsoft/Windows-classic-samples
x64 runtime crash issue with WicAnimatedGif sample
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 5.7k
- Forks
- 3.3k
- PR merge metrics
- No merged PRs in 30d
Description
We can compile the https://github.com/microsoft/Windows-classic-samples/blob/main/Samples/Win7Samples/multimedia/wic/wicanimatedgif sample successfully but it crashes at execution here:
SetWindowLongPtr(hWnd, GWLP_USERDATA, PtrToUlong(pThis));
I think this line should be replaced by
SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pThis));
which compiles and runs fine.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
In Samples/Win7Samples/multimedia/wic/wicanimatedgif/WicAnimatedGif.cpp around line 445, inspect the x64 window user-data assignment and compare it with the pointer conversion proposed in the issue. Build and run the WicAnimatedGif sample for x64; done when it executes without the reported crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100