External Email - Use Caution        

(not familiar yet how to reply on this platform, possible duplicate message, apologies)

Thank you for your reply.

I have since downloaded and installed 7.4.1 w/ matlab R2019b, and the original issue disappeared.

I then faced problem 1) "/Applications/freesurfer/7.4.1//bin/run_SegmentSubfieldsT1Longitudinal.sh: line 33: /Applications/freesurfer/7.4.1//bin/SegmentSubfieldsT1Longitudinal.app/Contents/MacOS/SegmentSubfieldsT1Longitudinal: No such file or directory”.

My solution (temporary, just to check if it ran into further issues) was to copy over this specific file/app from the 7.2.0 installation over to the 7.4.1 folder structure. Code went through and it ran for about 10 minutes nicely. I was then faced with problem which ends as 2)
"
minLogLikelihoodTimesPrior =

   1.6947e+06

Resolution level 1 iteration 3 deformation iterations 6
/Applications/freesurfer/7.4.1//bin/run_SegmentSubfieldsT1Longitudinal.sh: line 37: 14257 Abort trap: 6           "${exe_dir}"/SegmentSubfieldsT1Longitudinal.app/Contents/MacOS/SegmentSubfieldsT1Longitudinal $args
Darwin Joaos-MacBook-Pro.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64"

I imagine error 2 is related to not properly addressing problem 1. Any ideas how to fix this? This never happened with other freesurfer installations (both v6.0 and v7.2.0 that I also have installed and both have this file/app for longitudinal processing) and the error output is not very informative to fix it. File /run_SegmentSubfieldsT1Longitudinal.sh exists and looks identical to that of 7.2.0.

Best,

--
João Ramos
On 30 Jan 2024 at 04:12 +0000, fsbuild <fsbuild@contbay.com>, wrote:

At this point, I think your best bet is to install and run the freesurfer 7.4.1 release from June 2023 which was tested with R2019b.   Although The MathWorks does not support R2019b on MacOS Sonoma, I think we tested the 7.4.1 release on BigSur, Monterey and Ventura.  So it may work on Sonoma.  The 7.2.0 release from 2021 is too old to have been tested on newer versions of MacOS.

You can install the 7.4.1 release with the pkg installer,
https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.4.1/freesurfer-macOS-darwin_x86_64-7.4.1.pkg

After installing 7.4.1, you should run the fs_install_mcr_script provided in the freesurfer distribution to install and setup R2019b using the instructions below.

- R.


$ export FREESURFER_HOME=/Applications/freesurfer/7.4.1

$ cd $FREESURFER_HOME/bin

$ sudo FREESURFER_HOME=$FREESURFER_HOME  ./fs_install_mcr  R2019b

… answer y to any installer questions ...

The script should output how to set the environment variable LD_LIBRARY_PATH to pick up the The MathWorks libraries.  That might include a setting something like, 
$ export LD_LIBRARY_PATH=$FREESURFER_HOME/MCRv97/bin/glnxa64:$LD_LIBRARY_PATH

Please make sure you have otherwise removed any references to your previous matlab R2016 environment from PATH, LD_LIBRARY_PATH, etc. 


On Jan 29, 2024, at 21:02, Iglesias Gonzalez, Juan E. <JIGLESIASGONZALEZ@mgh.harvard.edu> wrote:

Dear Joao,
I’ll defer to our software specialists, but another option may be trying the Python version:
Cheers,
/E
 
 
--
Juan Eugenio Iglesias
 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of João Ramos <jnpramos@outlook.com>
Date: Monday, January 29, 2024 at 4:26 PM
To: Freesurfer@nmr.mgh.harvard.edu <Freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] longitudinal hippocampal segmentation error in Mac OS Sonoma + Freesurfer 7.2.0

        External Email - Use Caution        

Dear all,

I would appreciate your help in an issue I am having and one that I have not found a reference to regarding Freesurfer. Basically, I have run all of the longitudinal Freesurfer pipeline and I am now interested in running the longitudinal hippocampal / amygdala segmentation code (segmentHA_T1_long.sh), though I am faced with an error (log below). I have searched and this happens on various settings with no pattern that I could recognize (apart from iOS app development), and it was also pointed out on a mathworks forum post regarding matlab 2016 on a Mac OS Sonoma (which is my operating system, and this version of freesurfer uses matlab r2014b). Would this be possible to run within Mac OS Sonoma (v14.2.1, with current freesurfer version 7.2.0)  or should I run a linux instance with freesurfer install and everything?

Thank you!
--

------------------------------
USER joao
HOST Joaos-MBP.lan
PROCESSID 17239
PROCESSOR x86_64
OS Darwin
Darwin Joaos-MBP.lan 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64
------------------------------

#--------------------------------------------
#@# Longitudinal Hippocampal Subfields processing (T1) left Mon Jan 29 20:55:28 WET 2024
------------------------------------------
Setting up environment variables
---
DYLD_LIBRARY_PATH is .:/Applications/freesurfer/7.2.0//MCRv84//runtime/maci64:/Applications/freesurfer/7.2.0//MCRv84//bin/maci64:/Applications/freesurfer/7.2.0//MCRv84//sys/os/maci64:/Applications/freesurfer/7.2.0//lib/gcc/lib:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x600002e281b0'
*** First throw call stack:
(
0   CoreFoundation                      0x00007ff80eb17d86 __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007ff80e60a321 objc_exception_throw + 48
2   CoreFoundation                      0x00007ff80ebbd134 -[NSObject(NSObject) __retain_OA] + 0
3   CoreFoundation                      0x00007ff80ea85643 ___forwarding___ + 1379
4   CoreFoundation                      0x00007ff80ea85058 _CF_forwarding_prep_0 + 120
5   Foundation                          0x00007ff80f9e8abf -[NSProcessInfo arguments] + 203
6   CoreFoundation                      0x00007ff80eb8aa75 __getDefaultArguments_block_invoke + 101
7   libdispatch.dylib                   0x00007ff80e82159a _dispatch_client_callout + 8
8   libdispatch.dylib                   0x00007ff80e8227cb _dispatch_once_callout + 20
9   CoreFoundation                      0x00007ff80eb8a486 _addBackstopValuesForIdentifierAndSource + 636
10  CoreFoundation                      0x00007ff80ea5183d __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 151
11  CoreFoundation                      0x00007ff80eb8a145 -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 241
12  CoreFoundation                      0x00007ff80ea58400 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 98
13  CoreFoundation                      0x00007ff80ebc4c3b __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.160 + 310
14  CoreFoundation                      0x00007ff80ebc4908 -[_CFXPreferences withSearchLists:] + 60
15  CoreFoundation                      0x00007ff80ea52e58 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 278
16  CoreFoundation                      0x00007ff80ebc4a80 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 349
17  CoreFoundation                      0x00007ff80ea63210 -[_CFXPreferences copyDictionaryForApp:withContainer:] + 119
18  CoreFoundation                      0x00007ff80ea63160 __CFXPreferencesCopyCurrentApplicationStateWithDeadlockAvoidance + 158
19  Foundation                          0x00007ff80fc5dee6 $s10Foundation11LocaleCacheV11preferencesAA0B11PreferencesV_SbtyFTf4d_n + 54
20  Foundation                          0x00007ff80fc5ce23 $s10Foundation11LocaleCacheV15currentNSLocaleAA08_NSSwiftB0CyF + 99
21  Foundation                          0x00007ff80fe3ecda $sSo8NSLocaleC10FoundationE8_currentABvgZTo + 26
22  CoreFoundation                      0x00007ff80ea630ae CFLocaleCopyCurrent + 24
23  libmwi18n.dylib                     0x0000000101a90cd9 _ZN2fl4i18n6LcInit17getLocaleValueOSXEv + 25
24  libmwi18n.dylib                     0x0000000101a9041c _ZN2fl4i18n6LcInit12getLocaleOSXEv + 28
25  libmwi18n.dylib                     0x0000000101a8fcbc _ZN2fl4i18n6LcInit7initOSXEv + 28
26  libmwi18n.dylib                     0x0000000101a8f9f0 _ZN2fl4i18n6LcInit16lcInitializationEbRb + 48
27  libmwi18n.dylib                     0x0000000101a95a3d _ZN2fl4i18n11MwLocaleCtx16initGlobalLocaleEb + 93
28  libmwi18n.dylib                     0x0000000101a95158 _ZN2fl4i18n11MwLocaleCtx14initLocaleMgmtEv + 1176
29  libmwi18n.dylib                     0x0000000101a97ce7 _ZN2fl4i18n16initLcMgmtSystemEv + 135
30  libut.dylib                         0x0000000101c2ad2e _ZN2fl4i18n15init__mllc_initEi + 78
31  libut.dylib                         0x0000000101c2ae59 _ZN14static_managerIN2fl4i18n13LcInitTriggerEED1Ev + 57
32  dyld                                0x00007ff80e656fca ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke + 182
33  dyld                                0x00007ff80e698584 ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.175 + 133
34  dyld                                0x00007ff80e68c913 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 543
35  dyld                                0x00007ff80e63a07f _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 249
36  dyld                                0x00007ff80e68badc _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 176
37  dyld                                0x00007ff80e68e104 _ZNK5dyld39MachOFile32forEachInitializerPointerSectionER11DiagnosticsU13block_pointerFvjjRbE + 116
38  dyld                                0x00007ff80e6982ba _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 390
39  dyld                                0x00007ff80e653cfc _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 222
40  dyld                                0x00007ff80e6595cb _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 21
41  dyld                                0x00007ff80e653ef1 _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 181
42  dyld                                0x00007ff80e653ed3 _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 151
43  dyld                                0x00007ff80e653ed3 _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 151
44  dyld                                0x00007ff80e653ed3 _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 151
45  dyld                                0x00007ff80e657040 _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 98
46  dyld                                0x00007ff80e653f87 _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 93
47  dyld                                0x00007ff80e67596d _ZN5dyld44APIs25runAllInitializersForMainEv + 317
48  dyld                                0x00007ff80e63f241 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3397
49  dyld                                0x00007ff80e63e31f start + 1839
)
libc++abi: terminating due to uncaught exception of type NSException
/Applications/freesurfer/7.2.0//bin/run_SegmentSubfieldsT1Longitudinal.sh: line 33: 17311 Abort trap: 6           /Applications/freesurfer/7.2.0//bin/SegmentSubfieldsT1Longitudinal.app/Contents/MacOS/SegmentSubfieldsT1Longitudinal /Users/joaoramos/Downloads/Patients/patients_freesurfer/ 0.333333333333333333333333333333333333 /Applications/freesurfer/7.2.0//average/HippoSF/atlas/AtlasMesh.gz /Applications/freesurfer/7.2.0//average/HippoSF/atlas/AtlasDump.mgz /Applications/freesurfer/7.2.0//average/HippoSF/atlas/compressionLookupTable.txt 0.05 0.05 left L-BFGS long.v21 '/Applications/freesurfer/7..2.0//bin/fs_run_from_mcr /Applications/freesurfer/7.2.0//bin/' 0 Colombo_long Colombo_2018_T1.long.Colombo_long Colombo_2021_T1.long.Colombo_long
Darwin Joaos-MBP.lan 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64

longitudinal subfields exited with ERRORS at Mon Jan 29 20:55:30 WET 2024
 
-- 
João Ramos
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer