[Manaplus] BUG related to caching of images
Posted: 27 Sep 2018, 21:16
FYI: there is some BUG related to caching of images or something like this. Resource manager does not plays well with reconnect. It valid up to 1.8.9.1 and current git.
Some ppl complained client suddenly lags in recent versions of manaplus, I've eventually got that kind of lag/stutter myself and eventually tracked down how to reproduce that.
On a very basic level, it would be like this:
1) Start client, connect to some server, TMW classic would do.
2) Ensure everything runs okay without performance problems - walk some few maps, noticing FPS & lag spikes.
3) Esc -> switch server -> connect to same server once again.
4) Once in game again, take some look around and walk some few maps, noticing FPS and lag spikes again.
When stutter-like client lag does happens, debug tab outputs messages like this:
[20:03] no resource in cache: graphics/tiles/woodland_indoor_x2.png
[20:03] ../../../src/resources/resourcemanager/resourceman ager.cpp:495: in function `release'
So my wild guess would be that client does something wrong related to resource management when disconnect or server switch happens. This seems to cause plenty of these errors and it causes lags/stutter when client does not responds even on powerful computer. Not even mouse moves for like 1-2 seconds inside client when this happens, not to mention frozen screen content. This does not happens on "fresh" client launch - i.e. just starting client and connecting server 1st time would lack these messages - no associated stutter/lag would happen as well.
Some ppl complained client suddenly lags in recent versions of manaplus, I've eventually got that kind of lag/stutter myself and eventually tracked down how to reproduce that.
On a very basic level, it would be like this:
1) Start client, connect to some server, TMW classic would do.
2) Ensure everything runs okay without performance problems - walk some few maps, noticing FPS & lag spikes.
3) Esc -> switch server -> connect to same server once again.
4) Once in game again, take some look around and walk some few maps, noticing FPS and lag spikes again.
When stutter-like client lag does happens, debug tab outputs messages like this:
[20:03] no resource in cache: graphics/tiles/woodland_indoor_x2.png
[20:03] ../../../src/resources/resourcemanager/resourceman ager.cpp:495: in function `release'
So my wild guess would be that client does something wrong related to resource management when disconnect or server switch happens. This seems to cause plenty of these errors and it causes lags/stutter when client does not responds even on powerful computer. Not even mouse moves for like 1-2 seconds inside client when this happens, not to mention frozen screen content. This does not happens on "fresh" client launch - i.e. just starting client and connecting server 1st time would lack these messages - no associated stutter/lag would happen as well.