2019-12-09 00:49 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0006340Spring engineGeneralpublic2019-12-03 22:54
ReporterKrogoth 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
Product Version104.0 +git 
Target VersionFixed in Version 
Summary0006340: Significant reduction in FPS with scroll/zoom on maps with rough terrain
DescriptionSuspecting some changes in ROAM, that appeared shortly after version 1250 (not sure which version exactly).
While on powerful PC it might not be very noticeable, on a laptop it renders game unbearable.
Steps To ReproduceSelect a map with significant roughness, e.g. Stronghold.
Scroll/zoom.
Additional InformationSame issue was addressed by Zero-K players.
TagsNo tags attached.
Checked infolog.txt for ErrorsIrrelevant
Attached Files

-Relationships
has duplicate 0006348closed There's camera stuttering on larger maps 
+Relationships

-Notes

~0020220

Krogoth (reporter)

To avoid misunderstanding:
v 1250 works fine, no lag.

~0020221

Anarchid (reporter)

There was some investigation WRT this around ZK.

This is quite definitely ROAM.

Moving the camera while viewing the cliffy borders on the map Onyx Cauldron with the ROAM mesh drawer ON results in a massive FPS drop.

Panning with the legacy mesh drawer results in a very slightly lower FPS when camera is static, but completely smooth panning - an overall massive increase in quality.

The ZK investigation has not resulted in an engine issue because there's a user-side workaround in the form of the "/mapmeshdrawer" command. If the issues are truly unbearable, a game may include a widget to automatically switch to the legacy setting when on a map that is known to perform badly with ROAM.

~0020222

Krogoth (reporter)

Hmm...
From my experience, all maps perform badly with new ROAM.
Switching to legacy could be a last resort, but I really like how ROAM looks, more than legacy.
I didn't investigate the difference between new and old, but the old one worked well, correct?

~0020223

Krogoth (reporter)

*between new and old ENGINE code

~0020224

Anarchid (reporter)

I don't know if 1250 works correct.

These statements are making me confused:

> v 1250 works fine, no lag.
> I didn't investigate the difference between new and old, but the old one worked well, correct?

~0020225

Krogoth (reporter)

it does.
meant difference in code.
bug maybe anywhere, theoretically not in ROAM code, so I can't 100% say that ROAM code is bad.

~0020226

Kloot (developer)

I got tired of seeing 0006220 pop up over and over again and disabled threaded mesh tessellation in ROAM to get rid of it.

Anyone here is free to volunteer to fix the actual bug and restore performance.

~0020227

Krogoth (reporter)

Ill try

~0020240

Krogoth (reporter)

While trying to reproduce the crash..
How normal is "cannot recreate persistent storage buffer", VBO error?

~0020241

Krogoth (reporter)

nvm

~0020251

Krogoth (reporter)

Found it!
------
|X|X|
------
Look at the middle diamond (right quarter of left patch, left quarter of right patch)
If left triangle of it is getting split and when it tries to split base neighbour and goes out of nodes, it leaves childs hanging with unset neighbours to the right side.
Then, if in the next iteration right triangle (of the center diamond) goes out of nodes right away, it doesn't connect hanging pointers.
Finally, if tesselation from bottom or top causes left triangle to split (via multiple splits such that ultimately cause Patch:line 240 executed), then splitting left triangle's child nodes will use unset neighbours,
thus access violation.
Obviously, it doesn't happen like this if single thread.

~0020252

Krogoth (reporter)

Principally: the problem is leaving pointers hanging between splits of triangle and its base neighbour.

~0020253

IceXuick (reporter)

Great!

~0020254

Kloot (developer)

thanks for the legwork, I'll see what I can do soon.

~0020263

IceXuick (reporter)

Any news on this bug and or possible fix?

~0020264

Krogoth (reporter)

Just in case if Kloot was busy and to ease things up for him,
position in code:
https://github.com/spring/spring/blob/a17a11a58b06da8bc8510d1eb3cd92b559ea694c/rts/Map/SMF/ROAM/Patch.cpp#L293
Setting tlc->RightNeighbour and trc->RightNeighbour only when branch, thus leaving them hanging if both branch this and next iter go out of nodes.
One of solutions could be eliminating childs of empty base neighbour (in addition to own), but there can be many solutions.

~0020265

Krogoth (reporter)

*trc->LEftNeighbour

~0020266

Krogoth (reporter)

*not empty base neighbour, but one with not valid childs
Where is My EDIT Button? :X

~0020272

IceXuick (reporter)

Latest 1455 release made this problem even worse...
+Notes

-Issue History
Date Modified Username Field Change
2019-11-15 15:09 Krogoth New Issue
2019-11-15 15:13 Krogoth Note Added: 0020220
2019-11-15 15:17 Anarchid Note Added: 0020221
2019-11-15 16:04 Krogoth Note Added: 0020222
2019-11-15 16:05 Krogoth Note Added: 0020223
2019-11-15 16:09 Anarchid Note Added: 0020224
2019-11-15 16:12 Krogoth Note Added: 0020225
2019-11-15 16:36 Kloot Note Added: 0020226
2019-11-15 16:51 Krogoth Note Added: 0020227
2019-11-18 11:04 Krogoth Note Added: 0020240
2019-11-18 11:15 Krogoth Note Added: 0020241
2019-11-20 08:48 Kloot Relationship added has duplicate 0006348
2019-11-20 15:19 Krogoth Note Added: 0020251
2019-11-20 15:20 Krogoth Note Added: 0020252
2019-11-20 17:32 IceXuick Note Added: 0020253
2019-11-20 22:51 Kloot Note Added: 0020254
2019-11-28 15:23 IceXuick Note Added: 0020263
2019-11-29 06:29 Krogoth Note Added: 0020264
2019-11-29 06:30 Krogoth Note Added: 0020265
2019-11-29 06:37 Krogoth Note Added: 0020266
2019-12-03 22:54 IceXuick Note Added: 0020272
+Issue History