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

Static library and factory methods #34

Closed
robertodr opened this issue Dec 15, 2016 · 1 comment
Closed

Static library and factory methods #34

robertodr opened this issue Dec 15, 2016 · 1 comment
Assignees
Labels

Comments

@robertodr
Copy link
Member

When compiling the static library libpcm.a, the factory methods for the various objects (cavities, solvers, Green's functions and boundary integral operators) are not initialized properly.
No subclasses are subscribed to their respective factory which leads to a crash at runtime during library initialization from the host program.
The solution is to defer subscription to library initialization, i.e. when the Meddle object is created, instead of having it in an anonymous namespace in the subclasses .cpp file.

IMPORTANT
The DSO libpcm.so is not affected by the bug.

@robertodr robertodr added the bug label Dec 15, 2016
@robertodr robertodr self-assigned this Dec 15, 2016
robertodr added a commit that referenced this issue Feb 5, 2017
This commit fixes issues #34, #35 and #36 (on GitHub)
and #60, #61 and #62 (on GitLab)
The fix consisted in subscribing **all** subclasses to the factory in
a top-level convenience header that gets included into the `Meddle.cpp`
file.
Namespaces have finally been introduced into the project and some core
abstract base classes have been renamed to signal their ABC status.
Please see the [change log](CHANGELOG.md) for detailed information.
@robertodr
Copy link
Member Author

Closed with e1d3579

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

No branches or pull requests

1 participant