After a recent patch, the editor is saving the generated AI folder too far up the filepath. Until this is fixed, you need to manually relocate it.
Go to \Divinity - Original Sin\Data\Mods\YOURMODULE and there'll be an 'AI' folder there. Cut it and then, in the same folder, open \Levels\YOURLEVELNAME and paste the AI folder into that. That should get rid of the Divinity Editor crash.