epics-modules / mrfioc2

EPICS driver for Micro Research Finland event timing system devices
http://epics-modules.github.io/mrfioc2/
Other
8 stars 30 forks source link

time2ntp crashes IOC with zero arguments #17

Closed daykin closed 5 years ago

daykin commented 5 years ago

A crash occurs if time2ntp is invoked in IOC shell with zero arguments. I am using mrfioc2 version 2.1.0.

epics> time2ntp
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
mdavidsaver commented 5 years ago

May be fixed by https://github.com/epics-modules/mrfioc2/commit/1e703ba49944cd2137cd04641b80195347d1a404 .

mark0n commented 5 years ago

v2.2.0 is also affected. Need to test with the change @mdavidsaver mentioned.

mark0n commented 5 years ago

I can confirm that @mdavidsaver's fix resolves this problem. The exception is now being handled:

epics> time2ntp
Error: basic_string::_M_construct null not valid

Thanks Michael!