no try: around info.set_modification_date_time causes conversion to stop

Bug #1899077 reported by Phil Chandler
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description
            # the modification date of the destination should be now
            info = Gio.FileInfo()
            destination.set_attributes_from_info(info, Gio.FileQueryInfoFlags.NONE)

This should have a try: around it, as set_modification_date_time may fail. Which causes conversion to pause when all core have finished there file. And will not progress to next unprocessed files

Not setting the date time should not be a fatal error, so if this occurs a User would not expect the whole process to terminate operation.

Maybe a different method of setting the date time should be used, as this currently requires glibmm >=2.62

latest from git

Changed in soundconverter:
importance: Undecided → Medium
assignee: nobody → GautierPortet (kassoulet)
status: New → Confirmed
Revision history for this message
sezanzeb (sezanzeb) wrote :

If a conversion task fails it should log the error and continue, possibly restart the thread in the taskqueue.

I see why it hangs after all other threads are done and will work on a fix

Revision history for this message
sezanzeb (sezanzeb) wrote :

*possibly just start the next conversion in the taskqueue

(we don't start threads for conversion, we just start the gstreamer pipeline which talks over the g mainloop)

Revision history for this message
sezanzeb (sezanzeb) wrote :

A general solution that works for all possible unknown future errors can be done, but it is super complicated and ridiculous. It needs to overwrite sys.excepthook and decorate every function call in Task, and every function call from within the taskqueue to the outside needs to be wrapped in a try-except that does special stuff because all errors bubble through the decorated task member-functions otherwise.

If anyone is ever interested in how that worked, you can check out the last 3 commits here:

Even tests exists for that.

I'll work on a proper fix at some point this week. Maybe add a decorator function for this purpose to make things more future proof for yet unknown errors that just lets the queue know to ignore and continue. The UI should also communicate which files didn't work, I'll also add that.

Revision history for this message
sezanzeb (sezanzeb) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.