It actually doesn't crash. If you look at the source code it's pumping out images, but it seems to be filtering them through timthumb:
<img title="img015" src="http://sp3rybnik.pl/wp-content/themes/sp3-theme/timthumb.php?src=http://sp3rybnik.pl/wp-content/uploads/2013/01/img01513.jpg&w=350&h=500&zc=3">
If you remove the timthumb piece, the images show just fine. Are you purposely using timthumb? The code you provided above IS using it, but I assumed you intended on doing that. You can switch this line:
echo '<a href="'.$url.'"><img title="'.$title.'" src="'.get_bloginfo('template_url').'/timthumb.php?src='.$img.'&w=350&h=500&zc=3"></a>'
to this line:
echo '<a href="'.$url.'"><img title="'.$title.'" src="'.$img.'" /></a>'
and it should work fine. If you want the images smaller, then you'll want to change:
$img = wp_get_attachment_url($attachment->ID);
to use wp_get_attachment_image to get the actual size you're looking for.