-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Injecting LogPlugin twice causes a panic #6426
Comments
bayou-brogrammer
added
C-Bug
An unexpected or incorrect behavior
S-Needs-Triage
This issue needs to be labelled
labels
Oct 30, 2022
alice-i-cecile
added
A-App
Bevy apps and plugins
and removed
S-Needs-Triage
This issue needs to be labelled
labels
Oct 30, 2022
Fixed by #6411. |
You guys are the best! Thanks! |
bors bot
pushed a commit
that referenced
this issue
Nov 28, 2022
# Objective When a global tracing subscriber has already been set, `LogPlugin` panics with an error message explaining this. However, if a global logger has already been set, it simply panics on an unwrap. #6426 mentiones the panic and has been fixed by unique plugins, but the panic can still occur if a logger has been set through different means or multiple apps are created, as in #4934. The solution to that specific case isn't clear; this PR only fixes the missing error message. ## Solution - ~add error message to panic~ - turn into warning
taiyoungjang
pushed a commit
to taiyoungjang/bevy
that referenced
this issue
Dec 15, 2022
# Objective When a global tracing subscriber has already been set, `LogPlugin` panics with an error message explaining this. However, if a global logger has already been set, it simply panics on an unwrap. bevyengine#6426 mentiones the panic and has been fixed by unique plugins, but the panic can still occur if a logger has been set through different means or multiple apps are created, as in bevyengine#4934. The solution to that specific case isn't clear; this PR only fixes the missing error message. ## Solution - ~add error message to panic~ - turn into warning
alradish
pushed a commit
to alradish/bevy
that referenced
this issue
Jan 22, 2023
# Objective When a global tracing subscriber has already been set, `LogPlugin` panics with an error message explaining this. However, if a global logger has already been set, it simply panics on an unwrap. bevyengine#6426 mentiones the panic and has been fixed by unique plugins, but the panic can still occur if a logger has been set through different means or multiple apps are created, as in bevyengine#4934. The solution to that specific case isn't clear; this PR only fixes the missing error message. ## Solution - ~add error message to panic~ - turn into warning
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this issue
Feb 1, 2023
# Objective When a global tracing subscriber has already been set, `LogPlugin` panics with an error message explaining this. However, if a global logger has already been set, it simply panics on an unwrap. bevyengine#6426 mentiones the panic and has been fixed by unique plugins, but the panic can still occur if a logger has been set through different means or multiple apps are created, as in bevyengine#4934. The solution to that specific case isn't clear; this PR only fixes the missing error message. ## Solution - ~add error message to panic~ - turn into warning
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bevy version
Main branch (0.9-dev)
[Optional] Relevant system information
Specs: 14-in M1 Macbook Pro running 12.6 Monterey, with 32 GB Ram
What you did
Injecting
DefaultPluigins
while also modifying theLogPlugin
, works as expected.Injecting a second
LogPlugin
causes a panic for bevy::log/src/lib.rs:118:27Only when I disable the log plugin from the initial
DefaultPlugins
does it actually allow me to inject a second context.Additional information
Here is the full stack trace:
The text was updated successfully, but these errors were encountered: