Comments (5)
Hard to tell, I'll give some shots:
- This maybe an issue caused by a problem managing the data sections (.bss or .state). You will need to debug what is happening with your project during the cr_plugin_load_internal (try to put a breakpoint on the returns returning false). I believe it should be failing here but it may very well be another thing.
Also, you can check what changes in your .so after a recompilation by checking its sections (readelf or objdump), this may give some extra information (mostly if offset/address changes).
-
You say logs tell the library was loaded, so what exactly does not work on your project? Do you see the new .so renamed being used in lsof? (If you lib is foo.so, the loaded object will be like foo0.so, foo1.so, foo2.so, ...). So if you say it works on windows but not on linux, maybe the project output path/name may be the issue.
-
If you're able to debug and think the old library is loaded, can you validate within GDB the loaded shared objects to make sure the latest version is loaded (info sharedlibrary) ? Also, are you sure a rollback didn't happened trying to load the most recent version of the .so?
from cr.
ufff..... found the issue. your advices did help in the end, I've checked even down to the assembly that the libraries had changed code and that the libraries were reloaded, but the "info sharedlibrary" gave me the hint that I loaded the library in a proper way, but the build system I'm using had a reference to the library as well with the result that I had the original shared library loaded IN ADDITION to the shared libraries loaded by your implementation. and it seems that the reference placed by the linker has a higher priority than the loaded one.
many thanks for the help!!
from cr.
Glad to hear you found it.
Is there anything that we should put in the readme about this situation? I mean, if it is something that someone else may find in the future?
from cr.
I also thought about that, the only thing comes in my mind is to write a sentence to NOT link to the dynamically loaded shared library via the build system. the other things like "info sharedlibrary" and "lsof -p " might be useful in a "deepdive debug info" section, but most people should not need that.
from cr.
I think it is valid. I'll write something in the FAQ section, thank you for reporting this!
from cr.
Related Issues (20)
- RFC: Re-loadable plugin callbacks and nested plugins. HOT 23
- Print errors outside of debug mode HOT 1
- Unable to rollback crash in first load of plugin HOT 8
- [Feature] Call any Function
- [Tutorial]Windows *.dll only Live Reload
- clang compile warnings HOT 1
- clang compile warning (trivial) HOT 1
- cr_main isn't invoked with operation CR_LOAD and the context passed to cr_plugin_load HOT 18
- Unknown pragmas
- Improve CI and range of compilers to test
- cr_pdb_process has unused arguments HOT 3
- multiple definition issue HOT 1
- Can't load plugins on linux HOT 2
- CR_LOAD called on first update, contrary to what the documentation states. Is this correct? HOT 2
- Crash protection prevents host crashes, causing application to freeze HOT 2
- AddressSanitizer reports an error when calling cr_plugin_close HOT 2
- Assert protection? HOT 10
- How to use this with Visual Studio? HOT 4
- Unable to build samples on Linux "Cannot specify link libraries for target "crTest" which is not built by this project" HOT 2
- Whilst using cmake's FetchContent_MakeAvailable, there's no way to disable FIPS. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cr.