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

DBusError.Reference() internalValue nil exception #5

Open
Inokinoki opened this issue Jul 11, 2019 · 1 comment
Open

DBusError.Reference() internalValue nil exception #5

Inokinoki opened this issue Jul 11, 2019 · 1 comment

Comments

@Inokinoki
Copy link

Inokinoki commented Jul 11, 2019

Thanks for your helpful library !

I imported and created a DBusConnection on macOS.

let conn = try DBusConnection.init(address: "/tmp/dbus-1AGCwnZNuj", shared: false);

An error occured Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value.

It seems that padding1 is nil which caused this problem.

I changed internal let internalPointer: OpaquePointer? to fix it.
The situation is that when there is error in connection, the returned pointer is NULL/nil.

image

My Swift version is Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5) Target: x86_64-apple-darwin18.6.0.

Thanks in advance !

@Inokinoki Inokinoki changed the title DBusError.Reference() internalValue DBusError.Reference() internalValue nil exception Jul 11, 2019
@Inokinoki
Copy link
Author

Should I add some code to handle it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant