{"action":"created","issue":{"url":"https://api.github.com/repos/openmeeg/openmeeg/issues/334","repository_url":"https://api.github.com/repos/openmeeg/openmeeg","labels_url":"https://api.github.com/repos/openmeeg/openmeeg/issues/334/labels{/name}","comments_url":"https://api.github.com/repos/openmeeg/openmeeg/issues/334/comments","events_url":"https://api.github.com/repos/openmeeg/openmeeg/issues/334/events","html_url":"https://github.com/openmeeg/openmeeg/issues/334","id":351146755,"node_id":"MDU6SXNzdWUzNTExNDY3NTU=","number":334,"title":"[bug] segfault when initializing linop","user":{"login":"massich","id":7044835,"node_id":"MDQ6VXNlcjcwNDQ4MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/7044835?v=4","gravatar_id":"","url":"https://api.github.com/users/massich","html_url":"https://github.com/massich","followers_url":"https://api.github.com/users/massich/followers","following_url":"https://api.github.com/users/massich/following{/other_user}","gists_url":"https://api.github.com/users/massich/gists{/gist_id}","starred_url":"https://api.github.com/users/massich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/massich/subscriptions","organizations_url":"https://api.github.com/users/massich/orgs","repos_url":"https://api.github.com/users/massich/repos","events_url":"https://api.github.com/users/massich/events{/privacy}","received_events_url":"https://api.github.com/users/massich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-16T10:29:10Z","updated_at":"2018-08-16T13:55:04Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"here's the execution with [this data](https://www.dropbox.com/sh/av40f6brhv5qdxn/AAApYZbe8eC-3-YCV74AvUXNa?dl=0)\r\n\r\n```sh\r\n./om_gain -EEG \\\r\n          ~/Dropbox/openmeeg_segfault/openmeeg_hminv.mat \\\r\n          ~/Dropbox/openmeeg_segfault/openmeeg_dsm.mat \\\r\n          ~/Dropbox/openmeeg_segfault/openmeeg_h2em.mat \\\r\n          /tmp/gain_eeg.mat\r\n\r\n./om_gain version 2.4.0 compiled at Aug 15 2018 22:53:28 using OpenMP\r\n Executing using 4 threads.\r\n\r\n\r\n| ------ ./om_gain\r\n| -EEG\r\n| /home/sik/Dropbox/openmeeg_segfault/openmeeg_hminv.mat\r\n| /home/sik/Dropbox/openmeeg_segfault/openmeeg_dsm.mat\r\n| /home/sik/Dropbox/openmeeg_segfault/openmeeg_h2em.mat\r\n| /tmp/gain_eeg.mat\r\n| -----------------------\r\nUsing variable with name : matrix\r\nzsh: segmentation fault (core dumped)  ./om_gain -EEG ~/Dropbox/openmeeg_segfault/openmeeg_hminv.mat   \r\n```\r\n\r\nit breaks here\r\nhttps://github.com/openmeeg/openmeeg/blob/48fb8272f8d4ac88b09cce0c776c48fc483de27a/OpenMEEGMaths/include/linop.h#L148\r\n\r\nand this is the trace:\r\n```sh\r\n~/Workspace/openmeeg/build_linux_db/simulate_install_dir/bin master* 16s\r\n❯ lldb -- ./om_gain -EEG \\\r\n          ~/Dropbox/openmeeg_segfault/openmeeg_hminv.mat \\\r\n          ~/Dropbox/openmeeg_segfault/openmeeg_dsm.mat \\\r\n          ~/Dropbox/openmeeg_segfault/openmeeg_h2em.mat \\\r\n          /tmp/gain_eeg.mat\r\n\r\n(lldb) target create \"./om_gain\"\r\nCurrent executable set to './om_gain' (x86_64).\r\n(lldb) settings set -- target.run-args  \"-EEG\" \"/home/sik/Dropbox/openmeeg_segfault/openmeeg_hminv.mat\" \"/home/sik/Dropbox/openmeeg_segfault/openmeeg_dsm.mat\" \"/home/sik/Dropbox/openmeeg_segfault/openmeeg_h2em.mat\" \"/tmp/gain_eeg.mat\"\r\n(lldb) r\r\nProcess 16467 launched: './om_gain' (x86_64)\r\n./om_gain version 2.4.0 compiled at Aug 15 2018 22:53:28 using OpenMP\r\n Executing using 1 threads.\r\n\r\n\r\n| ------ ./om_gain\r\n| -EEG\r\n| /home/sik/Dropbox/openmeeg_segfault/openmeeg_hminv.mat\r\n| /home/sik/Dropbox/openmeeg_segfault/openmeeg_dsm.mat\r\n| /home/sik/Dropbox/openmeeg_segfault/openmeeg_h2em.mat\r\n| /tmp/gain_eeg.mat\r\n| -----------------------\r\nUsing variable with name : matrix\r\nProcess 16467 stopped\r\n* thread #1, name = 'om_gain', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)\r\n    frame #0: 0x00007ffff18f0c40 libc.so.6`__memmove_avx_unaligned_erms at memmove-vec-unaligned-erms.S:371\r\n(lldb) bt\r\n* thread #1, name = 'om_gain', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)\r\n  * frame #0: 0x00007ffff18f0c40 libc.so.6`__memmove_avx_unaligned_erms at memmove-vec-unaligned-erms.S:371\r\n    frame #1: 0x000055555556998f om_gain`double* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<double>(__first=0x00007fff78f34010, __last=0x0000800099785590, __result=0x00007ffe586e2010) at stl_algobase.h:368\r\n    frame #2: 0x0000555555569026 om_gain`double* std::__copy_move_a<false, double const*, double*>(__first=0x00007fff78f34010, __last=0x0000800099785590, __result=0x00007ffe586e2010) at stl_algobase.h:386\r\n    frame #3: 0x00005555555683df om_gain`double* std::__copy_move_a2<false, double const*, double*>(__first=0x00007fff78f34010, __last=0x0000800099785590, __result=0x00007ffe586e2010) at stl_algobase.h:424\r\n    frame #4: 0x0000555555567c9f om_gain`double* std::copy<double const*, double*>(__first=0x00007fff78f34010, __last=0x0000800099785590, __result=0x00007ffe586e2010) at stl_algobase.h:456\r\n    frame #5: 0x000055555556424e om_gain`OpenMEEG::LinOpValue::init(this=0x00005555557cd550, n=605070000, initval=0x00007fff78f34010) at linop.h:148\r\n    frame #6: 0x00005555555641ba om_gain`OpenMEEG::LinOpValue::LinOpValue(this=0x00005555557cd550, n=605070000, initval=0x00007fff78f34010) at linop.h:143\r\n    frame #7: 0x00007ffff7570307 libOpenMEEGMaths.so.1`OpenMEEG::Matrix::reference_data(this=0x00007fffffffced0, vals=0x00007fff78f34010) at matrix.h:83\r\n    frame #8: 0x00007ffff757277f libOpenMEEGMaths.so.1`void OpenMEEG::maths::MatlabIO::read<OpenMEEG::Matrix>(this=0x00007ffff77853a0, mat=0x00005555557c06a0, linop=0x00007fffffffced0) const at MatlabIO.H:287\r\n    frame #9: 0x00007ffff7570d66 libOpenMEEGMaths.so.1`OpenMEEG::maths::MatlabIO::read(this=0x00007ffff77853a0, is=0x00007fffffffc9b0, linop=0x00007fffffffced0) const at MatlabIO.H:201\r\n    frame #10: 0x00007ffff756d8eb libOpenMEEGMaths.so.1`OpenMEEG::maths::operator>>(mio=0x00007fffffffcc30, linop=0x00007fffffffced0) at MathsIO.C:63\r\n    frame #11: 0x00007ffff756703c libOpenMEEGMaths.so.1`OpenMEEG::Matrix::load(this=0x00007fffffffced0, filename=\"/home/sik/Dropbox/openmeeg_segfault/openmeeg_dsm.mat\") at matrix.cpp:264\r\n    frame #12: 0x0000555555564842 om_gain`OpenMEEG::Matrix::Matrix(this=0x00007fffffffced0, fname=\"/home/sik/Dropbox/openmeeg_segfault/openmeeg_dsm.mat\") at matrix.h:73\r\n    frame #13: 0x0000555555561ee0 om_gain`main(argc=6, argv=0x00007fffffffd148) at gain.cpp:86\r\n    frame #14: 0x00007ffff1783b97 libc.so.6`__libc_start_main(main=(om_gain`main at gain.cpp:50), argc=6, argv=0x00007fffffffd148, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffffffd138) at libc-start.c:310\r\n    frame #15: 0x000055555556180a om_gain`_start + 42\r\n(lldb) \r\n```"},"comment":{"url":"https://api.github.com/repos/openmeeg/openmeeg/issues/comments/413553841","html_url":"https://github.com/openmeeg/openmeeg/issues/334#issuecomment-413553841","issue_url":"https://api.github.com/repos/openmeeg/openmeeg/issues/334","id":413553841,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzU1Mzg0MQ==","user":{"login":"agramfort","id":161052,"node_id":"MDQ6VXNlcjE2MTA1Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/161052?v=4","gravatar_id":"","url":"https://api.github.com/users/agramfort","html_url":"https://github.com/agramfort","followers_url":"https://api.github.com/users/agramfort/followers","following_url":"https://api.github.com/users/agramfort/following{/other_user}","gists_url":"https://api.github.com/users/agramfort/gists{/gist_id}","starred_url":"https://api.github.com/users/agramfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agramfort/subscriptions","organizations_url":"https://api.github.com/users/agramfort/orgs","repos_url":"https://api.github.com/users/agramfort/repos","events_url":"https://api.github.com/users/agramfort/events{/privacy}","received_events_url":"https://api.github.com/users/agramfort/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T13:55:04Z","updated_at":"2018-08-16T13:55:04Z","author_association":"CONTRIBUTOR","body":"thx @papadop for taking a look. At least we'll start closing some bugs with brainstorm people \r\n\r\ncc @ftadel"}}
{"actor":{"display_login":"agramfort"}}