Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Crash] System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.AppMenu.Registrar was not provided by any .service files) #964

Open
nARN opened this issue Dec 20, 2024 · 13 comments
Assignees
Labels
external bug A bug caused by a external source

Comments

@nARN
Copy link
Contributor

nARN commented Dec 20, 2024

System

UVtools v5.0.2 X64
Operative system: Ubuntu 24.04.1 LTS X64
Processor: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Processor cores: 16
Memory RAM: 20.79 / 125.73 GB
Runtime: linux-x64
Framework: .NET 9.0.0
AvaloniaUI: 11.2.3
OpenCV: 4.9.0

Path:       /tmp/.mount_uvtoolV1z0pR/usr/bin/
Executable: /tmp/.mount_uvtoolV1z0pR/usr/bin/UVtools

Printer and Slicer

No response

Description of the bug

System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.AppMenu.Registrar was not provided by any .service files)
 ---> Tmds.DBus.Protocol.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.AppMenu.Registrar was not provided by any .service files
   at Tmds.DBus.Protocol.DBusConnection.MyValueTaskSource`1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at Tmds.DBus.Protocol.DBusConnection.CallMethodAsync(MessageBuffer message)
   at Tmds.DBus.Protocol.Connection.CallMethodAsync(MessageBuffer message)
   --- End of inner exception stack trace ---
Category: Task
File: 1200prc_0.05mm.encrypted.ctb  [Version: 5] [Class: CTBEncryptedFile]

Machine date time: 20/12/2024 14:51:51
    UTC date time: 20/12/2024 14:51:51

How to reproduce

I struggle to reproduce it, so suspect it may be some sort of a race. When I got this exception I had just reloaded a file and went straight into "Edit print parameters". It works fine now, but on DBus I can still see calls to com.canonical.AppMenu.Registrar and errors in response:

method call time=1734709363.187768 sender=:1.302 -> destination=com.canonical.AppMenu.Registrar serial=295 path=/com/canonical/AppMenu/Registrar; interface=com.canonical.AppMenu.Registrar; member=RegisterWindow
   uint32 41943155
   object path "/net/avaloniaui/dbusmenu/1032ada03730481484f5810ae4363f30"
error time=1734709363.187791 sender=org.freedesktop.DBus -> destination=:1.302 error_name=org.freedesktop.DBus.Error.ServiceUnknown reply_serial=295
   string "The name com.canonical.AppMenu.Registrar was not provided by any .service files"

so I'm suspecting that the problem is that for some reason the exception was not caught at that time.

Files

No response

Copy link

This is your first time submitting an issue with UVtools 🥳Please review your issue and ensure that the submit template was followed, the information is complete, and not related to any other open issue. It will be reviewed shortly. Debugging is very important and make the program better. Thanks for contributing and making the software better! 🙌

@sn4k3 sn4k3 added the external bug A bug caused by a external source label Dec 20, 2024
@sn4k3
Copy link
Owner

sn4k3 commented Dec 20, 2024

This comes from UI Framework, and other more have this problem: https://github.com/sn4k3/UVtools/issues?q=DBus
I don't know how to resolve it as it come from external source, and it's rare: https://github.com/AvaloniaUI/Avalonia/issues?q=org.freedesktop.DBus.Error.UnknownMethod

AvaloniaUI/Avalonia#17616
I'm gona ask to Avalonia...

@diefans
Copy link

diefans commented Dec 22, 2024

for me this errors occurs since I use version 5.0.2...

@sn4k3
Copy link
Owner

sn4k3 commented Dec 22, 2024

Because v5 uses latest avalonia. If you revert to latest v4 it won't trigger this error.

@JoveToo
Copy link

JoveToo commented Jan 4, 2025

It's really not rare with UVTools.

@Eisenknochen
Copy link

same problem here (Using Linux Mint)

@sn4k3 sn4k3 marked this as a duplicate of #992 Jan 28, 2025
@sn4k3 sn4k3 marked this as a duplicate of #996 Feb 7, 2025
@sn4k3
Copy link
Owner

sn4k3 commented Feb 22, 2025

Is this fixed with latest release?

@JKBert
Copy link

JKBert commented Mar 5, 2025

Nope. I've just tested (Linux Devuan).

@sn4k3
Copy link
Owner

sn4k3 commented Mar 6, 2025

Dam, I tested on VM and works ok. Ubuntu as OP using.
What is the most easy way to reproduce this?

@DodoidOfficial
Copy link
Contributor

DodoidOfficial commented Mar 9, 2025

I can confirm I am also running into this on Debian Testing (Trixie) w/ KDE. What seems to trigger it most consistently is to attempt to hover over the stats in the bottom bar (e.g. Wait Time). The tooltip will flash up a couple of times (but is seemingly empty?), and UVtools usually crashes after a few seconds of this.

Edit: Upon some further testing, this is not hard to reproduce at all for me. About half of the buttons in the UI appear to trigger this, every time. My usual workflow (just converting from PrusaSlicer to a CTB file) doesn't usually hit it, but if you actually want to use any of UVtools's features other than that, it's difficult to go more than a minute or two without hitting it.

sn4k3 added a commit that referenced this issue Mar 10, 2025
- (Fix) Ignore "org.freedesktop.DBus.Error.ServiceUnknown" exception to prevent crash on Linux (#964)
- (Upgrade) AvaloniaUI from 11.2.3 to 11.2.4
@sn4k3
Copy link
Owner

sn4k3 commented Mar 10, 2025

Check last version

@DodoidOfficial
Copy link
Contributor

This now appears to work for me, both in the release version and building from source. The contents of the tooltip still are not visible, and the tooltip still disappears immediately after appearing, but it no longer seems to crash for me.

@sn4k3
Copy link
Owner

sn4k3 commented Mar 10, 2025

Yes, bug still there, is just ignored

vmware_2025-03-10_03-44-08.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external bug A bug caused by a external source
Projects
None yet
Development

No branches or pull requests

7 participants