Try repairing it. That might help, but be sure to back things up. If that doesn't help try checking for errors and defragment your sd card with your computer. I know you can do this in Windows but I'm not quite sure about Linux or Mac OS.
Same thing happened to me once while playing Smash Bros, It might be the fact that Smash and SB both use lots of data or that theres something with your 3DS XL.