I made a sinple raycasting object example and i figured out how to fix the map editor crashing!
the example i made is very nice and uses very little code to simply and easily editable make your raycasting dreams come true.
it has some tips for raycasting and you may use them as you need
HOW TO FIX CRASHING
to fix crashing just simply go to Application, then head to runtime options, then change the Display mode to standard.