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

ConcurrentModificationException in org.pmw.tinylog.Configurator.init #93

Closed
trebouillon opened this issue Feb 11, 2019 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@trebouillon
Copy link

trebouillon commented Feb 11, 2019

While initializing the logger I got the following exception:

Caused by java.util.ConcurrentModificationException
       at java.util.Hashtable$HashIterator.nextEntry(Hashtable.java:727)
       at java.util.Hashtable$KeyIterator.next(Hashtable.java:768)
       at org.pmw.tinylog.Configurator.init(Unknown Source)
       at org.pmw.tinylog.Logger.<clinit>(Unknown Source)
       at org.pmw.tinylog.Configurator.activate(Unknown Source)
       at myapp.log.Logging.initialize(Logging.java:13)
       at myapp.initialization.AppInitializer.init(AppInitializer.java:71)
       at myapp.MyApplication.onCreate(MyApplication.java:59)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4950)
       at android.app.ActivityThread.-wrap1(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1536)
       at android.os.Handler.dispatchMessage(Handler.java:111)
       at android.os.Looper.loop(Looper.java:207)
       at android.app.ActivityThread.main(ActivityThread.java:5740)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:766)

Device: Lenovo K5 Note
API: 23 (6.0)

Are there changes in version 2 which would make this issue obsolete?

@pmwmedia pmwmedia added the bug label Feb 11, 2019
@pmwmedia pmwmedia self-assigned this Feb 11, 2019
@pmwmedia
Copy link
Member

The cause is that the system properties are modified while loading tinylog's configuration (see Configurator, line 735). I will create a copy of the system properties and iterate of this copy to fix this issue.

@pmwmedia pmwmedia added this to the 1.3.6 milestone Feb 11, 2019
@pmwmedia
Copy link
Member

@trebouillon I have just released a fix: https://tinylog.org/download. Can you test it?

@trebouillon
Copy link
Author

Thank you for the quick fix. As this only happened once so far I think this is hard to reproduce. But I will update to the latest release.

@github-actions
Copy link

github-actions bot commented Oct 9, 2022

This closed issue has been locked automatically. However, please feel free to file a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants