You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possibly related to #191.
Probably related to #211.
Superficially fixed by PR #254.
Bug investigation:
I noticed on (and only on?) my M2 Mac that all of the system tests fail. Unzipping the contents of arc_01.zip and running interactively (with a lot of debug printout), I get:
./tdms pstd_fs_input.mat fs_output.mat
[2023-03-10 11:31:59.189] [debug] Parsing 3 command line arguments
[2023-03-10 11:31:59.189] [info] Output file specified: fs_output.mat
[2023-03-10 11:31:59.189] [debug] Finished parsing arguments
[2023-03-10 11:31:59.190] [info] Input file: pstd_fs_input.mat | No gridfile supplied
[2023-03-10 11:31:59.196] [info] exi not present
[2023-03-10 11:31:59.196] [info] eyi not present
[2023-03-10 11:31:59.196] [info] Using pseudospectral method (PSTD)
[2023-03-10 11:31:59.196] [info] Using band-limited interpolation where possible
[2023-03-10 11:31:59.196] [debug] Finding the string: 'sourcemode'
[2023-03-10 11:31:59.196] [debug] This string is 7 chars long.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'sourcemode' = 'pulsed'.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'sourcemode' = 'pulsed'.
[2023-03-10 11:31:59.196] [debug] Finding the string: 'runmode'
[2023-03-10 11:31:59.196] [debug] This string is 9 chars long.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'runmode' = 'complete'.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'runmode' = 'complete'.
[2023-03-10 11:31:59.196] [debug] Finding the string: 'dimension'
[2023-03-10 11:31:59.196] [debug] This string is 2 chars long.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'dimension' = '3'.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'dimension' = '3'.
[2023-03-10 11:31:59.196] [info] intmethod = 1
[2023-03-10 11:31:59.196] [info] exi not present
[2023-03-10 11:31:59.196] [info] eyi not present
[2023-03-10 11:31:59.196] [info] f_ex_vec has ndims=2 N=512
[2023-03-10 11:31:59.196] [info] Np = 2, Nt = 500, Npe = 250, f_max = 2.94577e+14, Npraw = 0.4606
[2023-03-10 11:31:59.196] [debug] Finding the string: 'tdfdir'
[2023-03-10 11:31:59.196] [debug] This string is 1 chars long.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'tdfdir' = ''.
[2023-03-10 11:31:59.196] [debug] Have got the string. 'tdfdir' = ''.
[2023-03-10 11:31:59.196] [debug] Will write the TD fields to '?'
[2023-03-10 11:31:59.196] [info] Ni_tdf = 276, Nk_tdf = 276
[2023-03-10 11:31:59.196] [debug] Will write the TD fields to '?'
[2023-03-10 11:31:59.196] [info] Isource is empty
[2023-03-10 11:31:59.196] [info] Jsource is empty
[2023-03-10 11:31:59.196] [info] f_ex_vec has ndims=2 N=512
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=-0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=-0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=-0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=0.5
[2023-03-10 11:31:59.197] [debug] init_diff_shift_op, delta=0.5
[2023-03-10 11:32:00.245] [info] dims: (254,1,254)
[2023-03-10 11:32:00.251] [info] Using 8 OMP threads
[2023-03-10 11:32:00.251] [info] refind (Refractive index) = 1.350014e+00
[2023-03-10 11:32:00.251] [info] Starting main looop
[2023-03-10 11:32:00.266] [info] Exporting field... folder_name =
[2023-03-10 11:32:00.266] [debug] folder_name =
[2023-03-10 11:32:00.266] [debug] folder_name =
time domain output: /ex_000000.mat
[2023-03-10 11:32:00.266] [debug] Opened file /ex_000000.mat
0x117844b20
zsh: segmentation fault ./tdms pstd_fs_input.mat fs_output.mat
Investigation:
The 'tifdir' is an empty string (this is verified in the input .mat file).
The matlabio.cpp::string_in function correctly reads in an empty char * this is propagated to the IndependentObjectsFromInfile constructor.
But! Gets replaced by garbage (i.e. is not empty) during a conversion between std::string and char*. And since the design is that a non-empty 'tdfdir' means "write out the field", tdms tries to write out a field to the root of my file system (/).
The text was updated successfully, but these errors were encountered:
Possibly related to #191.
Probably related to #211.
Superficially fixed by PR #254.
Bug investigation:
I noticed on (and only on?) my M2 Mac that all of the system tests fail. Unzipping the contents of
arc_01.zip
and running interactively (with a lot of debug printout), I get:Investigation:
matlabio.cpp::string_in
function correctly reads in an emptychar *
this is propagated to theIndependentObjectsFromInfile
constructor.std::string
andchar*
. And since the design is that a non-empty 'tdfdir' means "write out the field", tdms tries to write out a field to the root of my file system (/
).The text was updated successfully, but these errors were encountered: