robotology-legacy / mex-wholebodymodel

Matlab MEX interface to the iWholeBodyModel interface.
11 stars 9 forks source link

Matlab crash when running the ctest #70

Closed gabrielenava closed 7 years ago

gabrielenava commented 8 years ago

I tried to run the ctest on the fixWin branch. The ctest fails with the following error:

______________________________________________________________________
Fault Count: 1
1: 
1: 
1: Abnormal termination:
1: Segmentation violation
1: 
1: Register State (from fault):
1:   RAX = c03e929fbc8d0fef  RBX = 00007fe3df7f19b0
1:   RCX = 00007fe3d3643ba0  RDX = 00007fe3d3643ba0
1:   RSP = 00007fe3df7f17c0  RBP = 00007fe3df7f1810
1:   RSI = 00007fe3d2d3d5c8  RDI = 00007fe3df7f19b0
1: 
1:    R8 = 0000000000000000   R9 = 00007fe3d341e210
1:   R10 = 00007fe3d3077e08  R11 = 0000000000000001
1:   R12 = 0000000000000006  R13 = 00007fe3d2d3d5c8
1:   R14 = 0000000000000000  R15 = 00007fe3d3213890
1: 
1:   RIP = 00007fe3f71587f0  EFL = 0000000000010282
1: 
1:    CS = 0033   FS = 0000   GS = 0000
1: 
1: Stack Trace (from fault):
1: [  0] 0x00007fe3f86611de    /usr/local/MATLAB/R2012b/bin/glnxa64/libmwfl.so+00516574 _ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+000158
1: [  1] 0x00007fe3f86624b2    /usr/local/MATLAB/R2012b/bin/glnxa64/libmwfl.so+00521394
1: [  2] 0x00007fe3f8663ffe    /usr/local/MATLAB/R2012b/bin/glnxa64/libmwfl.so+00528382 _ZN2fl4diag13terminate_logEPKcRKNS0_14thread_contextE+000174
1: [  3] 0x00007fe3f7950093   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00557203 _ZN2fl4diag13terminate_logEPKcPK8ucontext+000067
1: [  4] 0x00007fe3f794cb9d   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00543645
1: [  5] 0x00007fe3f794e835   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00550965
1: [  6] 0x00007fe3f794ea55   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00551509
1: [  7] 0x00007fe3f794f0fe   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00553214
1: [  8] 0x00007fe3f794f295   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00553621
1: [  9] 0x00007fe3f613c340              /lib/x86_64-linux-gnu/libpthread.so.0+00066368
1: [ 10] 0x00007fe3f71587f0 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+04515824
1: [ 11] 0x00007fe3f7154a1d /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+04499997
1: [ 12] 0x00007fe3f717eafc /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+04672252
1: [ 13] 0x00007fe3f715934d /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+04518733
1: [ 14] 0x00007fe3f70c7810 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+03921936
1: [ 15] 0x00007fe3f70cb1a6 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+03936678
1: [ 16] 0x00007fe3f70cb5dc /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+03937756
1: [ 17] 0x00007fe3f6ee7fec /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01957868
1: [ 18] 0x00007fe3f6ee40d3 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01941715
1: [ 19] 0x00007fe3f6ee4ed7 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01945303
1: [ 20] 0x00007fe3f6f50760 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02385760
1: [ 21] 0x00007fe3f769ea4b /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_dispatcher.so+00596555 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+000539
1: [ 22] 0x00007fe3f711f206 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+04280838
1: [ 23] 0x00007fe3f711f97a /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+04282746
1: [ 24] 0x00007fe3f71204ea /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+04285674
1: [ 25] 0x00007fe3f6f834cd /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02593997
1: [ 26] 0x00007fe3f6faed22 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02772258
1: [ 27] 0x00007fe3f6faee4f /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02772559
1: [ 28] 0x00007fe3f70cbb30 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+03939120
1: [ 29] 0x00007fe3f6ee7fec /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01957868
1: [ 30] 0x00007fe3f6ee40d3 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01941715
1: [ 31] 0x00007fe3f6ee4ed7 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01945303
1: [ 32] 0x00007fe3f6f50760 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02385760
1: [ 33] 0x00007fe3f769ea4b /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_dispatcher.so+00596555 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+000539
1: [ 34] 0x00007fe3f6f32e56 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02264662
1: [ 35] 0x00007fe3f6ebec1d /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01788957
1: [ 36] 0x00007fe3f6ee724e /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01954382
1: [ 37] 0x00007fe3f6ee40d3 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01941715
1: [ 38] 0x00007fe3f6ee4ed7 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01945303
1: [ 39] 0x00007fe3f6f50760 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02385760
1: [ 40] 0x00007fe3f769ea4b /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_dispatcher.so+00596555 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+000539
1: [ 41] 0x00007fe3f6f32e56 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02264662
1: [ 42] 0x00007fe3f6ebec1d /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01788957
1: [ 43] 0x00007fe3f6ee724e /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01954382
1: [ 44] 0x00007fe3f6ee40d3 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01941715
1: [ 45] 0x00007fe3f6ee4ed7 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01945303
1: [ 46] 0x00007fe3f6f50760 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02385760
1: [ 47] 0x00007fe3f769ea4b /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_dispatcher.so+00596555 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+000539
1: [ 48] 0x00007fe3f6f1f97b /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+02185595
1: [ 49] 0x00007fe3f6edd21c /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01913372
1: [ 50] 0x00007fe3f6eda24d /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01901133
1: [ 51] 0x00007fe3f6eda685 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01902213
1: [ 52] 0x00007fe3f6edc0f0 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwm_interpreter.so+01908976
1: [ 53] 0x00007fe3ef727af3   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwiqm.so+03242739 _ZNK3iqm18InternalEvalPlugin24inEvalCmdWithLocalReturnERKSbItSt11char_traitsItESaItEEP15inWorkSpace_tag+000147
1: [ 54] 0x00007fe3ef728498   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwiqm.so+03245208 _ZN3iqm18InternalEvalPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+000120
1: [ 55] 0x00007fe3f7926eb5   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00388789
1: [ 56] 0x00007fe3ef6a4bfa   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwiqm.so+02706426
1: [ 57] 0x00007fe3ef696594   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwiqm.so+02647444
1: [ 58] 0x00007fe3eeb40ccd /usr/local/MATLAB/R2012b/bin/glnxa64/libmwbridge.so+00122061 _Z10ioReadLinebP8_IO_FILERKN5boost8optionalIKP15inWorkSpace_tagEEb+000429
1: [ 59] 0x00007fe3eeb41354 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwbridge.so+00123732
1: [ 60] 0x00007fe3eeb4671d /usr/local/MATLAB/R2012b/bin/glnxa64/libmwbridge.so+00145181
1: [ 61] 0x00007fe3eeb4681e /usr/local/MATLAB/R2012b/bin/glnxa64/libmwbridge.so+00145438
1: [ 62] 0x00007fe3eeb46f07 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwbridge.so+00147207 _Z8mnParserv+000631
1: [ 63] 0x00007fe3f7935472   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00447602 _ZN11mcrInstance30mnParser_on_interpreter_threadEv+000034
1: [ 64] 0x00007fe3f7913b69   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00310121
1: [ 65] 0x00007fe3f7913d48   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00310600
1: [ 66] 0x00007fe3f7f29f73 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwservices.so+00999283 _ZN10eventqueue18UserEventQueueImpl5flushEv+000371
1: [ 67] 0x00007fe3f7f2a695 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwservices.so+01001109 _ZN10eventqueue8ReadPipeEib+000053
1: [ 68] 0x00007fe3f7f29321 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwservices.so+00996129 _ZN10eventqueue18UserEventQueueImpl9selectFcnEb+000353
1: [ 69] 0x00007fe3ebbb8a65   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwuix.so+00518757
1: [ 70] 0x00007fe3f7fc3a11 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwservices.so+01628689 _ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPN5boost8weak_ptrIN4sysq10ws_ppeHookEEESt6vectorIS6_SaIS6_EEEENS4_8during_FIS6_NS2_10shared_ptrIS5_EEEEET0_T_SH_SG_+000081
1: [ 71] 0x00007fe3f7fc4aeb /usr/local/MATLAB/R2012b/bin/glnxa64/libmwservices.so+01633003 _ZN4sysq12ppe_for_eachINS_8during_FIN5boost8weak_ptrINS_10ws_ppeHookEEENS2_10shared_ptrIS4_EEEEEET_RKS9_+000251
1: [ 72] 0x00007fe3f7fc25a2 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwservices.so+01623458 _ZN4sysq19ppePollingDuringFcnEb+000114
1: [ 73] 0x00007fe3f7fc2969 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwservices.so+01624425 _ZN4sysq11ppeMainLoopEiib+000121
1: [ 74] 0x00007fe3f7fc2b08 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwservices.so+01624840 _ZN4sysq11ppeLoopIfOKEiib+000152
1: [ 75] 0x00007fe3f7fc2c63 /usr/local/MATLAB/R2012b/bin/glnxa64/libmwservices.so+01625187 _ZN4sysq20processPendingEventsEiib+000147
1: [ 76] 0x00007fe3f7914664   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00312932
1: [ 77] 0x00007fe3f7914b3c   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00314172
1: [ 78] 0x00007fe3f790e592   /usr/local/MATLAB/R2012b/bin/glnxa64/libmwmcr.so+00288146
1: [ 79] 0x00007fe3f6134182              /lib/x86_64-linux-gnu/libpthread.so.0+00033154
1: [ 80] 0x00007fe3f5e614ad                    /lib/x86_64-linux-gnu/libc.so.6+01025197 clone+000109
1: 
1: 
1: If this problem is reproducible, please submit a Service Request via:
1:     http://www.mathworks.com/support/contact_us/
1: 
1: A technical support engineer might contact you with further information.
1: 
1: Thank you for your help.** This crash report has been saved to disk as /home/gnava/matlab_crash_dump.14273-1 **
1: 
1: 
1: 
1: MATLAB is exiting because of fatal error
1/1 Test #1: matlab_mex_wholebodymodel_tests ...***Exception: Other163.34 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 163.34 sec

The following tests FAILED:
      1 - matlab_mex_wholebodymodel_tests (OTHER_FAULT)
Errors while running CTest

_________________________________________________________________________

UPDATE: apparently, the error is also in the master branch

Ganimed commented 8 years ago

Maybe the mex-file is causing somewhere a null-pointer exception. Re-check the source code, i.e. all pointers and their allocations and deallocations. In Linux there exist a great tool for that, called "Valgrind".

Ganimed commented 8 years ago

Is the error only in Linux/Mac OS X?

gabrielenava commented 7 years ago

@Ganimed I run the ctest in your WBM branch, and I still had the segmentation violation problem:

1: Fault Count: 1
1: 
1: 
1: Abnormal termination:
1: Segmentation violation
1: 
1: Register State (from fault):
1:   RAX = 4006ac5c6555bda3  RBX = 00007ff675279d98
1:   RCX = 00007ff686c57e60  RDX = 00007ff686c57e80
1:   RSP = 00007ff686c57bc0  RBP = 00007ff686c57bd0
1:   RSI = 00007ff675279d98  RDI = 00007ff681651f30
1: 
1:    R8 = 00007ff686c57e40   R9 = 00007ff686c57e70
1:   R10 = 0000000000000000  R11 = 0000000000000001
1:   R12 = 00007ff681651f30  R13 = 00007ff686c57e60
1:   R14 = 00007ff686c57e50  R15 = 00007ff686c57e40
1: 
1:   RIP = 00007ff693ee1940  EFL = 0000000000010202
1: 
1:    CS = 0033   FS = 0000   GS = 0000
1: 
1: Stack Trace (from fault):
1: [  0] 0x00007ff693ee1940 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11843904
1: [  1] 0x00007ff693ee1ac5 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11844293
1: [  2] 0x00007ff693846a56 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04917846
1: [  3] 0x00007ff693843410 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903952
1: [  4] 0x00007ff69383e855 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04884565
1: [  5] 0x00007ff69383eb69 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04885353
1: [  6] 0x00007ff69384320d /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903437
1: [  7] 0x00007ff6938432e2 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903650
1: [  8] 0x00007ff69393a688 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+05916296
1: [  9] 0x00007ff69393cb2f /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+05925679
1: [ 10] 0x00007ff693dbb10e /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10637582
1: [ 11] 0x00007ff693eaae33 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11619891
1: [ 12] 0x00007ff69707d8a3 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00768163 _ZN8Mfh_file16dispatch_fh_implEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000947
1: [ 13] 0x00007ff69707e16e /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00770414 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000030
1: [ 14] 0x00007ff693eb8847 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11675719
1: [ 15] 0x00007ff693eb8aab /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11676331
1: [ 16] 0x00007ff693f1e461 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+12092513
1: [ 17] 0x00007ff693844930 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04909360
1: [ 18] 0x00007ff693846c3c /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04918332
1: [ 19] 0x00007ff693843410 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903952
1: [ 20] 0x00007ff69383e855 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04884565
1: [ 21] 0x00007ff69383eb69 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04885353
1: [ 22] 0x00007ff69384320d /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903437
1: [ 23] 0x00007ff6938432e2 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903650
1: [ 24] 0x00007ff69393a688 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+05916296
1: [ 25] 0x00007ff69393cb2f /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+05925679
1: [ 26] 0x00007ff693dbb10e /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10637582
1: [ 27] 0x00007ff693eaae33 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11619891
1: [ 28] 0x00007ff69707d8a3 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00768163 _ZN8Mfh_file16dispatch_fh_implEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000947
1: [ 29] 0x00007ff69707e16e /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00770414 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000030
1: [ 30] 0x00007ff693eb8847 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11675719
1: [ 31] 0x00007ff693eb8aab /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11676331
1: [ 32] 0x00007ff693f1e461 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+12092513
1: [ 33] 0x00007ff693844930 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04909360
1: [ 34] 0x00007ff693846c3c /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04918332
1: [ 35] 0x00007ff693843410 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903952
1: [ 36] 0x00007ff69383e855 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04884565
1: [ 37] 0x00007ff69383eb69 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04885353
1: [ 38] 0x00007ff69384320d /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903437
1: [ 39] 0x00007ff6938432e2 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903650
1: [ 40] 0x00007ff69393a688 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+05916296
1: [ 41] 0x00007ff69393cb2f /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+05925679
1: [ 42] 0x00007ff693dbb10e /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10637582
1: [ 43] 0x00007ff693eaae33 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11619891
1: [ 44] 0x00007ff69707d8a3 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00768163 _ZN8Mfh_file16dispatch_fh_implEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000947
1: [ 45] 0x00007ff69707e16e /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_dispatcher.so+00770414 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000030
1: [ 46] 0x00007ff693eb8847 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11675719
1: [ 47] 0x00007ff693eb8aab /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+11676331
1: [ 48] 0x00007ff693f1e461 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+12092513
1: [ 49] 0x00007ff693844930 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04909360
1: [ 50] 0x00007ff693846c3c /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04918332
1: [ 51] 0x00007ff693843410 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903952
1: [ 52] 0x00007ff69383e855 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04884565
1: [ 53] 0x00007ff69383eb69 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04885353
1: [ 54] 0x00007ff69384320d /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903437
1: [ 55] 0x00007ff6938432e2 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+04903650
1: [ 56] 0x00007ff69393a688 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+05916296
1: [ 57] 0x00007ff69393cb2f /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+05925679
1: [ 58] 0x00007ff693dbb10e /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10637582
1: [ 59] 0x00007ff693d82eab /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10407595
1: [ 60] 0x00007ff693d82fb3 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10407859
1: [ 61] 0x00007ff693d850d9 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10416345
1: [ 62] 0x00007ff693dfdbbe /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10910654
1: [ 63] 0x00007ff693dfe072 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_lxe.so+10911858
1: [ 64] 0x00007ff69679d941 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwm_interpreter.so+02443585 _Z51inEvalCmdWithLocalReturnInDesiredWSAndPublishEventsRKSbIDsSt11char_traitsIDsESaIDsEEPibbP15inWorkSpace_tag+00000065
1: [ 65] 0x00007ff697adefc1   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00696257 _ZNK3iqm18InternalEvalPlugin24inEvalCmdWithLocalReturnERKSbIDsSt11char_traitsIDsESaIDsEEP15inWorkSpace_tag+00000097
1: [ 66] 0x00007ff697ae09db   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00702939 _ZN3iqm18InternalEvalPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000123
1: [ 67] 0x00007ff6973546cd   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00624333
1: [ 68] 0x00007ff697ad3a0a   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00649738
1: [ 69] 0x00007ff697abfeb2   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00569010
1: [ 70] 0x00007ff69631b05a /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00159834
1: [ 71] 0x00007ff69631b617 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00161303
1: [ 72] 0x00007ff696322519 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00189721
1: [ 73] 0x00007ff696322614 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00189972
1: [ 74] 0x00007ff696322fa9 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwbridge.so+00192425 _Z8mnParserv+00000617
1: [ 75] 0x00007ff69733f243   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00537155
1: [ 76] 0x00007ff6973411ce   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00545230
1: [ 77] 0x00007ff697341849   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00546889 _ZN5boost6detail17task_shared_stateINS_3_bi6bind_tIvPFvRKNS_8functionIFvvEEEENS2_5list1INS2_5valueIS6_EEEEEEvE6do_runEv+00000025
1: [ 78] 0x00007ff697340236   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00541238
1: [ 79] 0x00007ff697b07b49   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00863049
1: [ 80] 0x00007ff697af451c   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00783644 _ZN5boost6detail8function21function_obj_invoker0ISt8functionIFNS_3anyEvEES4_E6invokeERNS1_15function_bufferE+00000028
1: [ 81] 0x00007ff697af41fc   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00782844 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000428
1: [ 82] 0x00007ff697ad3a0a   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00649738
1: [ 83] 0x00007ff697abf690   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00566928
1: [ 84] 0x00007ff697ac2048   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwiqm.so+00577608
1: [ 85] 0x00007ff6a755f40a /usr/local/MATLAB/R2016b/bin/glnxa64/libmwservices.so+02634762
1: [ 86] 0x00007ff6a75609af /usr/local/MATLAB/R2016b/bin/glnxa64/libmwservices.so+02640303
1: [ 87] 0x00007ff6a75610e6 /usr/local/MATLAB/R2016b/bin/glnxa64/libmwservices.so+02642150 _Z25svWS_ProcessPendingEventsiib+00000102
1: [ 88] 0x00007ff69733f8c6   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00538822
1: [ 89] 0x00007ff69733fc42   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00539714
1: [ 90] 0x00007ff69732d8d6   /usr/local/MATLAB/R2016b/bin/glnxa64/libmwmcr.so+00465110
1: [ 91] 0x00007ff6a61786ba              /lib/x86_64-linux-gnu/libpthread.so.0+00030394
1: [ 92] 0x00007ff6a5eae82d                    /lib/x86_64-linux-gnu/libc.so.6+01075245 clone+00000109
1: [ 93] 0x0000000000000000                                   <unknown-module>+00000000
1: 
1: 
1: If this problem is reproducible, please submit a Service Request via:
1:     http://www.mathworks.com/support/contact_us/
1: 
1: A technical support engineer might contact you with further information.
1: 
1: Thank you for your help.** This crash report has been saved to disk as /home/gnava/matlab_crash_dump.25875-1 **
1: 
1: 
1: 
1: MATLAB is exiting because of fatal error
1/1 Test #1: matlab_mex_wholebodymodel_tests ...***Exception: Other 28.56 sec

actually, unlike the previous time, the test started without problems:

test 1
    Start 1: matlab_mex_wholebodymodel_tests

 Test command: /usr/local/MATLAB/R2016b/bin/matlab "-nodesktop" "-nojvm" "-nodisplay" "-r" "runWBMTests"
 Test timeout computed to be: 1500

                             < M A T L A B (R) >
                   Copyright 1984-2016 The MathWorks, Inc.
                    R2016b (9.1.0.441655) 64-bit (glnxa64)
                              September 7, 2016

 For online documentation, see http://www.mathworks.com/support
 For product information, visit www.mathworks.com.

    Non-Degree Granting Education License -- for use at non-degree granting, nonprofit,
    educational organizations only.  Not for government, commercial, or other organizational use.

but then I got the error. Do the tests run on your pc?

Ganimed commented 7 years ago

@gabrielenava: Yes, there is still a problem with the segmentation fault. I compiled the code also in DEBUG mode, to see all the outputs and steps. The problem is still in the destructor of the ModelState class. The strange thing is, if you call the mex-subroutine in a normal procedure like "timeTest.m" and afterwards unload it from Matlab's memory manager with the "clear all" command, then the deallocation of the arrays in the ModelState class works flawlessly. But in the CTest it fails at exact position. After freeing the robotWBIModel, the system is not able to free the following arrays of the state variable. That's really strange! Furthermore, outside of the mexWholeBodyModel subroutine the CTest methods in Matlab causing also some sporadic segmentation faults. I suspect in this case that some random generated values are out of scope and causing these effects. But anyway the subroutine is now more stable than before. Let's talk about this tomorrow.

Ganimed commented 7 years ago

P.S: My system shows mostly that the CTest has passed successfully but immediately afterwards when the subroutine will be unloaded from the system it causes a segmentation problem. More details I will explain in the report.

gabrielenava commented 7 years ago

ctest is finally working! great job @Ganimed, I will close this issue as soon as we merge into master

Ganimed commented 7 years ago

:+1:

Ganimed commented 7 years ago

Grazie! :smile: