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 1206 - SDL_UpdateTexture crashes down
Summary: SDL_UpdateTexture crashes down
Status: RESOLVED WORKSFORME
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Windows (XP)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.0
Depends on:
Blocks:
 
Reported: 2011-05-12 05:03 UTC by lyubimovb
Modified: 2013-07-26 20:03 UTC (History)
1 user (show)

See Also:


Attachments
simplified code for reproduction (863 bytes, text/plain)
2011-05-12 05:04 UTC, lyubimovb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lyubimovb 2011-05-12 05:03:27 UTC
Hello, 

Here is the problem:
When I'm trying to update texture with SDL_UpdateTexture call it crashes down (see simplified code to reproduce it).

As I could see it happens when Blit1to4 tries to dereference map pointer which is 0 for some reason.

map = (Uint32 *) info->table;
while (height--) {
#ifdef USE_DUFFS_LOOP
		/* *INDENT-OFF* */
		DUFFS_LOOP(
			*dst++ = map[*src++];
		, width);
		/* *INDENT-ON* */
#else....

Additional info:
Sdl version: SDL-1.3.0-5538
Compiler: Default one for VC++ 2010 Express
Comment 1 lyubimovb 2011-05-12 05:04:30 UTC
Created attachment 611 [details]
simplified code for reproduction
Comment 2 Ryan C. Gordon 2013-07-12 22:15:43 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.0, Priority 2.

This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 3 Ryan C. Gordon 2013-07-26 20:03:50 UTC
We must have fixed this at some point; this reproduction code works here for me (both OpenGL and software renderer), and valgrind doesn't note any invalid memory accesses.

If this is still a problem for you--it's possible it's a bug in our Windows code, maybe, since I'm testing on Linux--please reopen the bug and I'll look at it more, but it's very likely we've fixed this problem since this was reported.

--ryan.