Hi David,
I had the same problem 3 days ago. I have fix it by changing some matlab scripts located inside freesurfer_root_directory/matlab
I am sending to you the modified scripts. Please take care and save the original versions before copying the new ones.
Save inside <freesurfer_root_directory>/matlab
getFacesArea.m
mesh_adjacency.m
SearchProjectionOnPial.m.
I have also found another bug related to matlab startup.m file. If you have modified your startup.m file to select by default a working directory then the lgi computation will fail. When matlab starts it changes the current directory (<$SUBJECTS_DIR>/<subjID>/surf) to the directory specified in the startup.m file and the scripts are looking for a specified filename (ie. lh.pial) inside the specified working directory.
I am sending to you also the modified versions of the scripts with this bug solved. I have tested in our VMs and everything goes ok.
Save inside <freesurfer_root_directory>/bin
mris_compute_lgi
Save inside <freesurfer_root_directory>/matlab
compute_lgi.m
find_corresponding_center_FSformat.m
make_roi_paths.m
We have to wait for freesurfer developers to see their opinion. Maybe they have fixed this already. The original code and changes are commented.
I hope this can be helpful.
Best regards
Yasser