I need the exception data (from the problems and reports page and debug.txt) from sapien when it crashes when trying to compile custom functions.

Be sure you're setting "run_game_scripts" to false before you compile.