PC crashes when I tranfer files from Nexus4 I have a problem with my Nexus4 stock.

When I connect the smartphone to the pc (both Linux and windows) and I try to transfer files (video and photo) it copy few Mb then it gives me an error and the pc crashes.

I try with both mode connection settings from Nexus4, and I also hard reset it but I do not understand how to solve it.
Instead of using the unreliable USB connection to transfer files, I would suggest using Wi-Fi. You can easily create a FTP server on your phone and then access it from Windows Explorer or Linux. You can easily transfer files after that. I would suggest using ES File Explorer for this. Here's the tutorial on how to create FTP Server using ES.
Alternatively you can use any other FTP Server apps available in Play Store.
Servers Ultimate, FTP Server
Also SuperBeam is a great way to transfer files. It has apps for both Windows and Linux. You might want to take a look at it.