Operating system and graphics card
gentoo amd64 gtx780 x2
Broken: latest (from builder.blender.org, for ex e240bd3)
Worked: 435eaa7 (from builder.blender.org)
Exact steps for others to reproduce the error
1- in edit mode paint gpencil strokes
2- push "Add Surface" button
3- get error "There aren't any strokes."