Bubble collapse in complex geometries