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 · 3 comments

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Copy link
Owner

pmwmedia commented Feb 11, 2019

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 added a commit that referenced this issue Feb 11, 2019

@pmwmedia

This comment has been minimized.

Copy link
Owner

pmwmedia commented Feb 11, 2019

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

@pmwmedia pmwmedia closed this Feb 11, 2019

@trebouillon

This comment has been minimized.

Copy link
Author

trebouillon commented Feb 12, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment