cursetag: So close, and yet so far

My holy grail application is a text-based music tag editor, something like — but not necessarily feature-identical — to EasyTag. I’ve probably harped on that point so much over the past almost-10-years that you’ve probably already tuned me out at this point.

cursetag got me so close today, I could almost taste it.

2014-07-15-6m47421-cursetag

And then … well, you saw the gif. cursetag can read directories, recognize filetypes, arrange them in order, work a selection bar and then, at the moment of truth … splatters across the asphalt like an egg dropped from the window of a passing car.

I’m not enough of a programming guru to defunkify a floating point exception, although I have the feeling there’s some errant math in there. I won’t explain my logic, except I see a lot of errors reported elsewhere on the ‘net that link floating point exceptions to mathematical no-nos.

It’s a shame though: cursetag is barely a year old, if the github timestamps are accurate. We hardly knew ye.

I got the link to cursetag through AUR, and there is also a git version that I believe pulls in the same code, because both versions crash with similar skid marks.

Ah well. I can take a hint. I shall continue my eternal trudge across the desert, looking for that mystical fountain of curses-based audio tag editing. It’s a lonely life. …

Advertisements

17 thoughts on “cursetag: So close, and yet so far

  1. Benuwa

    Hi,
    I just built cursetag from github and it worked like a charm. Definetly a keeper for me.
    No floating point exception for me, so I cannot reproduce your problem.

    However the README file do warn about a “most likely fail to read the tags” for weird encoding or anything that is “not-strictly-standard”.
    Did you tried it with files from different origines or whose tags were not edited by another tool?

    Appart from that thank you for this very useful blog. Keep up the good work πŸ™‚

    1. K.Mandla Post author

      Strange, I’ll try it on a different computer. I tried both the “curses” and “curses-git” packages out of AUR, but I’ll try another machine completely this time.

  2. wrtlbrmft

    While I am fully aware that you tend to (quote) “shun mpd and company” (unquote): may I nevertheless point you towards ncmpcpp in your search for a console-based music tag editor? While ncmpcpp is officially billed as an mpd client, for my money the editor it brings with it can really hold its own against EasyTag (apart from editing album covers and other graphical stuff, of course). I know that you already looked into ncmpcpp during the course of this blog, but perhaps you just did not look deep enough? πŸ™‚

    1. K.Mandla Post author

      You have convinced me, sir. I will take another look and pay specific attention to the editor this time. I’ll tack it on to the list and grab it when it resurfaces, out of fairness to the other titles. You made a good sell. Thanks! πŸ˜‰

  3. CorkyAgain

    I on the other hand was able to reproduce the floating exception upon selecting a file.

    I built cursetag from github. Taglib is version 1.9.1. Ncurses is version 5.9, patchlevel 20140705. This is on Debian, with Linux kernel version 3.14.

    Same failure with several different files. If time permits, I will take a closer look at this under a debugger. Has it been reported to the developer?

  4. benuwa

    Hello,
    I built it under ubuntu and right there I had the floating point exception.
    I don’t know why it worked under my opensuse but I had a look with my favourite debugger and I think I found the culprit.

    Juste replace line 72 of src/io.cpp from:
    unsigned long multiplier = 1024UL*1024UL*1024UL*1024UL; // 1 Tb
    to:
    unsigned long multiplier = 1024UL*1024UL*1024UL*1024UL – 1; // 1 Tb

    It should prevent the program from attempting a division by 0 at line 80.

    1. K.Mandla Post author

      Ah, thanks. I’ll try that now. I really wanted this to work … πŸ˜‰

      Edit: I think that fixes it! It manages the files and tags perfectly now. Thanks! πŸ˜€

      Edit again: It seems there’s an identical floating point exception when unselecting a file too. So long as I don’t unselect anything, it seems to work though. I’ll pick through the io.cpp file and see if I can solve this one on my own. I doubt it, but stranger things have happened. … πŸ˜•

  5. xaizek

    Hi,

    Thanks for describing this tool here, I was looking for an application like this one. Although I couldn’t reproduce floating point error, I faced another kind of issues with it. I tried to solve all of them in https://github.com/lotuskip/cursetag/pull/2. I really can’t understand how there can be division by zero, just don’t see it in the code (loop condition should prevent that, unless you’re running 32-bit system), but I tried to at least prevent segmentation fault at the *possible* cost of displaying incorrect file size.

  6. lotuskip

    Hello there! I happen to be the author of cursetag… This post (that I found by accident) and the comments caught me totally by surprise. I wrote cursetag mostly for my own purposes and never *really* believed it would find a userbase. The project is not dead, I just haven’t been paying attention and have been under the impression that there are no issues… Apparently, contrary to my expectations, github does not email me when there are issues posted.

    benuwa & xaizek, I will look into your contribution as soon as I find the time. Thank you so much!

    1. K.Mandla Post author

      No problem at all. I don’t know if you knew it or not, but cursetag does fill a rather large gaping hole in the Linux console software landscape. To the best of my knowledge, cursetag is the only program that uses a complete interface to manage id3 tags. That might have been why it found a few fans already. Looking forward to updates! πŸ™‚

  7. Pingback: ncmpcpp: Once more, for the tag editor | Inconsolation

  8. Pingback: bashtagger: Joining the coalition party | Inconsolation

  9. Pingback: Bonus: 2014 in review | Inconsolation

  10. Pingback: Bonus: 2014 in review | Linux Admins

  11. Pingback: btag: Action-interaction | Inconsolation

Comments are closed.