-
Notifications
You must be signed in to change notification settings - Fork 256
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 when trying to acquire bundle context #172
Comments
I think the code in this snippet is based on v2.0 and needs to be updated for v3.0 |
I believe the code is up-to-date with v3.0 but snippets were never required to actually run successfully. Originally, they were intended to be minimal compilable snippets of code. If it does not inflate the snippet code, I'd say we should make them self-contained and hence executable. For others, we could probably just create an object file instead of an executable. |
I looked at the snippet as an example, because we're trying to integrate the dev branch into a project, and i wasn't able to perform obtain a successful GetBundleContext(), so I wondered what we missed. |
I think there is just a framework instance missing. Look at the FrameworkFactory class to create a framework some where early in main.
…On November 25, 2016 8:05:06 PM GMT+01:00, cewee ***@***.***> wrote:
I looked at the snippet as an example, because we're trying to
integrate the dev branch into a project, and i wasn't able to perform
obtain a successful GetBundleContext(), so I wondered what we missed.
Do you have a quick idea what could be missing here ?
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#172 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
I added a framework to the main like this, accessing the BundleContext works fine,
Your help and hints are greatly appreciated!! |
Basically, your executable is missing a In v3.0 (yet to be released), bundles are required to provide a manifest. Your case is special because an executable acting as a bundle container is treated slightly differently: all its (valid) bundles are installed automatically on framework initialization. If you are using CMake, you can add the missing pieces lke this:
If you are not using CMake, you would basically need to call the |
when executing the snippet from the documentation (uServices-bundlecontext) the executable crashes,
because the private ContextBundle part is NULL in GetBundleContext() . This happens on the developement branch.
The text was updated successfully, but these errors were encountered: