Bug report? ELAN changes annotation time when importing from Toolbox

Hi there,

When importing a toolbox text, ELAN (5.9, Mac OS) unpredictably changes the time of some annotations by ±1ms. Here’re two examples (omitting irrelevant fields):

Section in Toolbox file:
\ref 20180211-01.024
\ELANBegin 126.871
\ELANEnd 130.628
\ELANParticipant A

Annotation of this section after importing to ELAN:

Section in Toolbox:
\ref 20180211-01.025
\ELANBegin 130.647
\ELANEnd 131.954
\ELANParticipant B

Annotation of this section after importing to ELAN:

My (failed) troubleshooting attempts:

  • unchecked ‘Correct alignment…’ during import
  • changed ‘Default block duration’ to a value other than 1000

Could you please help me with troubleshooting? Please let me know if you need my text files.

Thanks heaps!


I’m afraid I can reproduce the problem! Strange as it may seem these are rounding errors. E.g. the string “130.628” is first correctly converted to a decimal, floating point number ‘130.628’ which is then multiplied * 1000 to go from seconds to milliseconds. In some cases (like this one), this leads to a value like this: ‘130627.9999’. Since this was not anticipated, this is converted to an integer in the simplest way (which removes everything after the decimal point), resulting in ‘130127’.

I can (and will) change the conversion to round to the closest integer (actually a long value), but that will only help you after a new release of ELAN.

Hi Han,

Thanks! Would it be possible to release a fix sooner? Although these ±1ms errors seem trivial they cause problems for later stages of my workflow (e.g. when merging annotation files that should have the same time stamps, annotations of 1ms length are created at unpredictable locations). And I have dozens of files to process, so it’s impractically to spot these manually.

Alternatively, if you don’t plan to release a new build yet, we can fix this unofficial by e.g. replacing a certain .jar file in the Mac OS ELAN package? I can see a lot of those by clicking ‘Show Package Contents’ on my system, and am assuming that one of them is doing the decimal conversion.


Hi Weijian,

Preparing and distributing a new release is always quite a bit of work, but now even more because we’re still in a kind of transition phase concerning the way the distribution is built and because we went into a code refactoring cycle after the release of 5.9.

I’ll see if I can create a new “elan-5.9.jar” (one of the many jar files in the ELAN package) containing the fix for the Toolbox import problem, later today. But I must warn that there is a chance that ELAN won’t launch anymore when you replace a jar file (the macOS security system might mark the application as tampered with).

Hi Han,

That’d be awesome, really appreciate it! And sorry I didn’t mean to push!


I’ve now created a new elan-5.9.jar with the fix for the time conversion accuracy. It can be downloaded here.
You can give it a try, at your own risk, no warranty :).


Works perfectly, thank you!!

Great (I’m surprised)!