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 1087 - SDL crushes if windows system supports 64-bit color graphic modes.
Summary: SDL crushes if windows system supports 64-bit color graphic modes.
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: All Windows (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-11 02:43 UTC by Andrey Khalyavin
Modified: 2018-08-06 21:20 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Khalyavin 2011-01-11 02:43:11 UTC
Some time ago all my SDL applications start crushing on startup with zero pointer exception. 
Recently (when the latest android emulator refused to run) I finally launched the debugger and investigated the source of the problem. Turned out that crush occurs while enumerating all graphical modes. SDL tries to calculate number of bytes per pixel (N) and then takes an Nth element of an array. Since the array have only 5 elements, 64-bit color mode leads to out of bounds access and zero pointer exception shortly afterwards. I can't point out the exact place in the source because I debugged SDL on assembler level.

Workaround: remove 64-bit graphical modes in a registry. My screen definitely doesn't support them anyway.
Comment 1 Sam Lantinga 2011-02-16 04:09:57 UTC
Do you know of any way to get these in the registry so I can reproduce this?

Thanks!
Comment 2 Andrey Khalyavin 2011-02-16 05:40:52 UTC
I used NV_Modes key in HKLM\SYSTEM\CurrentControlSet\Control\Video\{some guid}\0000 branch. It was  like "...3840x2400x8,16,32,64=1F;". I removed ",64" and the graphic mode was gone. So you may try to add ",64" to add 64-bit color mode to your system. See also http://http.download.nvidia.com/Windows/43.45/NV_Compress_Modes_Users_Guide_2.1.pdf for detailed description of NV_Modes string format.
Comment 3 Ryan C. Gordon 2018-08-06 21:20:22 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.