| Summary: | Touch events cause segfault on Android | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alvin <alvinbeach> |
| Component: | video | Assignee: | Gabriel Jacobo <gabomdq> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | HG 2.0 | ||
| Hardware: | Other | ||
| OS: | Android (All) | ||
| Attachments: | Passes Android_Window to the mouse-related functions rather than NULL. | ||
Fixed, thanks! |
Created attachment 1714 [details] Passes Android_Window to the mouse-related functions rather than NULL. Touch (mouse) events on Android result in a segfault. From what I can determine, the bug was introduced in be64f5daf64b (Implemented SDL_Capture()). In src/events/SDL_mouse.c, in SDL_PrivateSendMouseMotion(), at line 251, the 'window' pointer is accessed. On Android, the 'window' argument is NULL. (see Android_OnTouch() e.g. line 89 - call to SDL_SendMouseMotion). Attached is a patch for Android_OnTouch() that passing the 'Android_Window' global variable. Tested on Android 4.0.4.