When I run zbarcam with a non-compositing window manager, such as openbox and xfwm with compositing disabled, it works mostly fine although it may cause the kernel to show some error:
[drm:ilk_display_irq_handler] *ERROR* Pipe A FIFO underrun
[drm:cpt_set_fifo_underrun_reporting] *ERROR* uncleared pch fifo underrun on pch transcoder A
[drm:cpt_serr_int_handler] *ERROR* PCH transcoder A FIFO underrun
When I run zbarcam with a compositing window manager, such as gnome-shell (mutter) and xfwm with compositing enabled, it also shows the above error, but it stops showing the video captured by the webcam and shows the zbar logo instead after the window is moved. If I keep moving the window for more than 30 seconds, it causes Xorg to hang and it tells me to report the bug here. The system may crash after showing the error.
[drm] stuck on render ring
[drm] GPU HANG: ecode 0:0x84fefffc, in Xorg.bin [1114], reason: Ring hung, action: reset
[drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[drm] GPU crash dump saved to /sys/class/drm/card0/error
[drm] stuck on render ring
[drm] GPU HANG: ecode 0:0x84fefffc, in Xorg.bin [1114], reason: Ring hung, action: reset
Hardware:
Intel Core i7-2640M CPU @ 2.80GHz
Intel Sandybridge Mobile
Software:
Linux 3.18.5
Xorg 1.16.3
Mesa 10.4.3
xf86-video-intel 2.99.916
Window Managers:
GNOME Shell 3.14.3 (Mutter 3.14.3)
Openbox 3.5.2
Xfwm 4.10.1

(In reply to Ian Romanick from comment #3)
> There have been some fixes related to Sandy Bridge GPU hangs made on Mesa
> master and on the 10.5 branch. Can you retry with the 10.5 branch?
I upgraded to Mesa 10.5.0-rc1 and used the same version of Xorg and xf86-video-intel, but it still hangs when I move the window of zbarcam under gnome-shell.