Closed 14mRh4X0r closed 11 years ago
Thanks for the report. You're right, there's not really a clear indication of this being fixed, although I suspect it is in fact fixed in 1.8-on. I haven't given a clear indication because I'm not entirely sure what's causing this - I believe it essentially results from multiple threads attempting to trim the chatLog list at the same time, and also the fact that the trimLog() method attempts to remove the last 10 items at a time. However, I had expected (at the time) that using a CopyOnWriteArrayList would correct this, but I suppose there's still a chance of thread conflict in between the method checking the size and removing the elements.
From 1.8 on, the ChatChannel's chatLog (as well as some other lists) are back to regular ArrayList, protected from potential thread conflicts using ReentrantReadWriteLocks. Additionally, instead of attempting to remove the last 10 elements at once (whenever the log is larger than max size + 5), it now only removes the last element whenever the list exceeds max size. As I understand it, the cost of removing the last element is quite minimal, so calling this more often shouldn't have a noticeable impact on performance.
Although like I said, I can't track down the previous cause with absolute certainty, so I'm not going to close this in case related issues appear in the newer versions. I'll mark it outdated for now, and change it should this happen.
I believe sufficient time has passed since 1.8.00 with no more occurrences of this or other very similar issues, so I'm marking this as closed.
On 1.7.08, especially when having a rather high load, this tends to happen upon connecting to the server. I've only just updated to 1.8.01, and haven't really played on it yet, but I figured this might be useful to report anyway, since I haven't seen a clear description of a bug like this being fixed in the changelogs.
The crash report:
PS: Zombe's modpack 7.2 and GLSL Shaders mod 1.46 are also installed.