paoloose / urn

Split tracker / timer with GTK+ frontend. *nix alternative to LiveSplit. This is teh urn.
GNU General Public License v3.0
50 stars 5 forks source link

Split times are rounded on reloading the Split-File #17

Closed Gnatzelle closed 9 months ago

Gnatzelle commented 9 months ago

Hi pao and first of all thanks that you picked up "Urn" again :)

But i have a little problem. Like the Title says...Split times are rounded on reloading the Split-File. The Values in the Split-File itself are saved correctly. Sadly this makes the program unusable for me :/ Don't know if somethings wrong on my side or if its really a bug. Compiled Urn directly from master and followed the Instructions in the readme.

Cheers Bildschirmfoto_2024-01-29_23-46-28

paoloose commented 9 months ago

Thank you for reporting :), I really want to investigate this. Can you please share more information about your cpu architecture and machine? I wasn't able to reproduce this on a x64 Debian sid computer.

Gnatzelle commented 9 months ago

Yeah sorry, forgot that >.>

OS is an up-to-date Arch Linux, CPU is a Ryzen 7 5700X, so a normal x86-64 Machine.

The needed packages that urn requires are at the following versions:

I suspected my modified makepkg.conf which build software for my specific machine (march=native) when compiling from the AUR or manually but i saw that is not the case with urn as the compiler uses "march=x86-64" and "mtune=generic".

Hope this helps a little bit :)

Gnatzelle commented 9 months ago

I found a fix (at least) for me in an old fork here: https://github.com/JyKin/urn/commit/0509fa4c2dc95579d771d11f8243f69c3206a1ef

With these changes Urn correctly reads the values from the .json and doesn't round the Split-Times and just "cuts" after two subsecond-digits.

paoloose commented 9 months ago

Wow thank you, that really save me debugging time. Hope all the issues were like this one hahaha. I'll check it out and cherry-pick the commit if it doesn't break anything.

paoloose commented 9 months ago

Well, I don't know why the decimal places were being parsed as doubles instead of integers. Seems to work so I'm pushing that commit. Let me know if you have further problems.