3D Printer seem to "Forget" Tool Path I've run into a strange error that keeps reoccurring my with my prints. Part way through the printing process, it appears that the printer "Forgets" the tool path and stops all together or starts to move in random patterns. It still extrudes material and the result is mess of wasted filament. 

At first I thought this might be a levelling issue, but this does not appear to be the case. This only seems to occur on prints taking longer than maybe 2-3 hours. Does anyone have any idea whats going on and how to correct it?

I am running an Ultimaker 2 Extended with using Cura for slicing.
I believe what you are experiencing is the stepper motors getting offset during  the print, usually due to the nozzle colliding into the model (but possibly also due to very high printing speeds).

Basically, the stepper motors used in most 3D printers will always make moves relative to their current position (as opposed to absolute positioning). In other words, the stepper will for example be told to move 10 steps left, regardless of where it is currently at. If you therefore forcefully move the printhead out of position during the print, the electronics will never know it happened, and continue with instructions that are no longer viable. 

In order to fix this, do what you can to avoid the nozzle colliding into the model:


Make sure your printer does not leave large deposits of filament, typically due to over extrusion or too close Z-leveling of the first layer.
Make sure the model sticks to the bed, so that warped parts don't lift up, obstructing the toolpaths.
Add Z-lift in your slicer software, so that the printhead lifts slightly between travel moves.
Reduce travel speed (if it is set very high): the strength of stepper motors is lower at higher speeds, which means nozzle collisions at higher speeds most likely will offset the motors.