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 1172

Summary: Touch device repeatedly reports "Error: Couldn't open stream"
Product: SDL Reporter: miltankrules
Component: *don't know*Assignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: andre
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   

Description miltankrules 2011-03-17 20:25:26 UTC
I have a Wacom Graphire3 tablet and have been finding that, with every SDL 1.3 app I've tested, its being plugged in causes an "Error: Couldn't open stream" error to appear on the command line repeatedly until the program is stopped, degrading performance quite a bit.  Valgrind error logs are also polluted with "Warning: invalid file descriptor -1 in syscall read()".

When I start the program with the tablet unplugged and plug it in after starting, the problem is non-existent, and there is no problem with using it as a mouse.

It might be partially because my tablet is ancient (probably doesn't support touch), but regardless I think SDL should be ignoring the stream and not repeatedly reporting the error.  I've tested this with the most recently available version of SDL 1.3 from Hg (SDL-1.3.0-5498).

(By the way, I noticed the source of the invalid read immediately after the error prints out in src/video/x11/SDL_x11events.c - the error check does nothing but print out the error, and the code immediately continues to read()-ing from the stream.)
Comment 1 andre 2011-08-09 15:32:30 UTC
I have no touch device (unless my synaptic touchpad counts?) and I see the warning twice always, it does not continue and repeat as described though.
Comment 2 miltankrules 2012-03-11 12:41:36 UTC
I have not had this issue since I checked out a newer revision a few months ago so I thought I'd report back and set this as fixed.