Comments (4)
The dump shows that the log message formatting function is printed.
Could it be that the async logger is passing the log message to the logging function before the formatting is complete, and the argument passed to the logging function is an invalid pointer?
{
std::string arg = "message";
// Pass `arg` reference.
async_logger->info("{}", arg);
}
// If async logger accesses `arg` after here, it will crash.
from spdlog.
warning: Unexpected size of section `.reg-xstate/17010' in core file. Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: debugger service failed Core was generated by `./dl'. Program terminated with signal SIGSEGV, Segmentation fault.
This message indicates that threads may not be working properly on your machine.
Does std::thread
work?
from spdlog.
The dump shows that the log message formatting function is printed. Could it be that the async logger is passing the log message to the logging function before the formatting is complete, and the argument passed to the logging function is an invalid pointer?
{ std::string arg = "message"; // Pass `arg` reference. async_logger->info("{}", arg); } // If async logger accesses `arg` after here, it will crash.
I'm guessing that's unlikely, because when I only called init_thread_pool in the whole program and no other interfaces, the program still crashed. Now I'm going to check my std::thread, and will reply later.
from spdlog.
I think you're right, my virtual machine crashed when performing std::thread->join() or detach(). Even though it still doesn't work ,thank you~
from spdlog.
Related Issues (20)
- Auto generate tweakme.h HOT 17
- Can't create directory and file like "D:/Logs/log.txt" HOT 14
- Header-only version 1.14.0 complie with errors HOT 6
- spdlog 1.14.0: undefined reference to `spdlog::get(char const*)' HOT 14
- vs编译工作正常, g++编译报错 HOT 5
- Async logging using MDC HOT 6
- Does the dist_sink support Factory pattern to create a new logger? HOT 3
- COMBINE "daily_file_sink" AND "rotating_file_sink" HOT 2
- How register work? HOT 3
- Does SPDLOG support conditional logging? HOT 6
- solution : "rotating_file_sink: failed renaming: permission denied " HOT 1
- [Question] logger sink question HOT 1
- V1.14 don't support Win32xx.CString on vs2017 HOT 1
- Not work stderr output HOT 1
- spdlog::shutdown() HOT 2
- Formatting Custom Objects Example Doesn't work HOT 4
- [Question] Can spdlog's log level be instantly updated? HOT 2
- Async logger crashes on shutdown during `tp_.reset()`. Minimal Reproducible Example provided. Does not occur in older versions. HOT 11
- MDC ignores `SPDLOG_NO_TLS`
- [Question] Is there a way to dynamically adjust the log levels of spdlog during runtime? HOT 2
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 spdlog.