> On 9 Mar 2017, at 12:36, Stephane Ducasse <stepharo.s...@gmail.com> wrote:
> 
> Hi guys
> 
> During the DSU workshop we were brainstorming about what are the most 
> difficult bugs we faced and what are the conceptual tools that would have 
> helped you.

Tracking down a problem where a header file was like this

struct touch_screen_event {
#ifdef SOME_FLAG
        ... other fields
#endif
        int x;
        int y;
        int pressure;
};

The touchscreen library was compile with -DSOME_FLAG but the code using that 
library didn't have the flag set. This means the code using the touchscreen 
events read x/y from the wrong offset in memory. The example work of the 
touchscreen library worked while the real user didn't. It would have helped to 
embed struct sizes and offsets into the shared library to find differences at 
link time.

---

Keyboard handling in kdrive (an Xserver for embedded/mobile usage): After 
plugging/unplugging USB into the device, the keyboard started to generate wrong 
keycodes. In Linux (depending on your keyboard mode) every key event is 
represented as a byte(?). This worked for a long time but then keyboards 
started to have more keys. So a special key value is used to indicate that a 
multi byte sequence will follow. As it turns out plugging/unplugging generated 
a multi-byte keyboard event...

Not sure what would have helped? :)




Reply via email to