Page MenuHomeWildfire Games

[RC] Thread the pathfinder computations
Needs ReviewPublic

Authored by wraitii on Dec 27 2016, 1:51 PM.

Details

Reviewers
Kuba386
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#4324
Summary

This implements threading of the pathfinder workers.

Details of the architecture:

  • Workers are dispatched paths in a round-robin-ish fashion. It's naive, but it works well enough for now.
  • Paths are then fetched in reverse order and messages are sent.

The Long pathfinder grid is owned by the pathfinder and so safe to use across turns. The obstructions manager' shapes aren't, so protected behind a mutex.

The three bits to comment on are mainly:

  • Do you think the protection in ObstructionManager is sufficient?
  • Are you OK with the serialisation logic / dependency between Pathfinder and ObstructionManager?
  • Do you find it OK to thread_local the pathfinders data?
Test Plan

May review code and architecture. Am interested in performance improvements that people would report. An MP game would be great.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

I did a quick review, I may have missed or misunderstood things since I don't know the code architecture well, but with a "fresh eye" look the main logic sounds sane, and I added two performance-related inline comments (not sure how important they are).

source/simulation2/components/CCmpObstructionManager.cpp
283

It seems that this method will be acquiring/releasing locks frequently, wouldn't it be more efficient to have one global lock during its execution ?

source/simulation2/helpers/LongPathfinder.h
277

Making the cache thread local means that some computation will be done once per thread, instead of once in total. I'm not sure how many of those computations are concerned, and how expensive they are, but with 8 cores some may be done 7x.

Angen added inline comments.Apr 15 2020, 10:28 AM
source/simulation2/components/CCmpPathfinder.cpp
911

we could lock/unlock only when using multithreads, branch is already here so ...

958

should not this comment be elsewhere ?

959

do we want to just prevent pushing or really fail if some worker is computing ?
Is computing worker here broken state?

@wraitii Please help me!

Kuba386 requested changes to this revision.Apr 21 2020, 4:45 PM

Patch currently fails to merge with latest source.
It's very easy to fix it tough.

After applying, patch compiles without errors.
I haven't ecountered any crashes, errors or bugs during my tests.
This patch is about performance, so let's take a look at performance improvements:
Tested on this replay:


Without patch:

With patch:

Performance improvement is noticalbe, both in-game and on the profiler graph.
In my case, when using 4x CPU, theoretically ideal implementation would speed up path computing process 4 times.
Without patch:

With patch:

As we can see, patch achieved 3.6x speedup, which is in my opinion very good result.

1.Do you find it OK to thread_local the pathfinders data?
It's the simplest approach, and it works, so why not?

2.Are you OK with the serialisation logic / dependency between Pathfinder and ObstructionManager?
Well, dependency is already there. That's the reason why we need to lock, right?
Serialization logic look fine to me.

3.Do you think the protection in ObstructionManager is sufficient?
We lock before we begin to process turn, and lock after we finished, so it's not possible that something changes state of ObstructionManager while pathfinder is working.
Looks quite solid to me.

As pointed out by @Angen it's not necessary to lock if we don't use threading,
and patch doesn't merge with latest source cleanly.
Apart from that, everything looks good to me.

This revision now requires changes to proceed.Apr 21 2020, 4:45 PM
Kuba386 added inline comments.Apr 21 2020, 4:49 PM
source/simulation2/components/CCmpPathfinder.cpp
959

At this point, we are about to start computing pathes for new turn.
Fact that we are starting new turn implies that previous turn finished,
and fact that previous turn finished implies that computation for previous turn finished.
Nothing should put pathfinder threads into working state between end of a turn and start of next turn.

Kuba386 commandeered this revision.Apr 21 2020, 5:47 PM
Kuba386 edited reviewers, added: wraitii; removed: Kuba386.
This revision now requires review to proceed.Apr 21 2020, 5:47 PM
Kuba386 added inline comments.Apr 21 2020, 6:10 PM
source/simulation2/components/CCmpPathfinder.cpp
959

Well, not exaclty 'for new turn', because StartProcessingRequests is called three times during single turn.
I must check whether it's just remaining of non-threaded version, or if it's still needed...
Anyway, it's not gonna happen unless there's a bug.

Kuba386 updated this revision to Diff 11702.Apr 21 2020, 6:16 PM

Just few minor changes
Only lock obstruction manager when using threading.
Compatibile with latest source.

Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Apr 21 2020, 6:16 PM
Kuba386 marked an inline comment as done.Apr 21 2020, 6:19 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/ps/ThreadFrontier.h
|  28| class·ThreadFrontier
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classThreadFrontier{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpObstructionManager.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/components/CCmpObstructionManager.cpp
| 138| »   BEGIN_PROTECTED_DATA()
|    | [MAJOR] CPPCheckBear (unknownMacro):
|    | There is an unknown macro here somewhere. Configuration is required. If BEGIN_PROTECTED_DATA is a macro then please configure it.

source/ps/ThreadUtil.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/components/CCmpPathfinder_Common.h
|  34| #include·"graphics/Overlay.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/VertexPathfinder.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/serialization/SerializeTemplates.h
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/serialization/SerializeTemplates.h
|  33| template<typename·ELEM>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/ps/ThreadUtil.h
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/ps/ThreadUtil.h
|  21| namespace·ThreadUtil
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'namespaceThreadUtil{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/LongPathfinder.h
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/helpers/LongPathfinder.h
|  34| ·*·TODO:·maybe·VC2012·will?
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/Spatial.h
|   1| /*·Copyright·(C)·2016·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2016"

source/simulation2/helpers/Spatial.h
|  35| class·SpatialSubdivision
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classSpatialSubdivision{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/VertexPathfinder.h
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/helpers/VertexPathfinder.h
|  72| class·VertexPathfinder
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classVertexPathfinder{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/ICmpObstructionManager.h
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/components/ICmpObstructionManager.h
|  53| class·ICmpObstructionManager·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpObstructionManager:' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/LongPathfinder.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2023/display/redirect

Cool, thanks for working on this again :)
Could you:

  • Bump the years on the files?
  • Name the threadnames of the pathfinder?
Stan added inline comments.Apr 21 2020, 7:42 PM
source/simulation2/components/CCmpObstructionManager.cpp
290

Can the iterator be const?

297

Same here

1051–1052
1148

auto should be replaced by the type.
Shouldn't staticShapes be taken out of the loop in case it's not optimized by the compiler for some reason?

1172

Still up to date.

1205–1206
1233–1234
1271
1324

Here as well

1369

range based loop? const iterator?

1377

range based loop? const iterator?

source/simulation2/components/CCmpPathfinder.cpp
761

+ debug_SetThreadName("Pathfinder thread " + std::to_string(index));

Kuba386 added inline comments.Apr 21 2020, 9:59 PM
source/simulation2/components/CCmpObstructionManager.cpp
290

It could be I guess

1051–1052

Wow, didn't know about that..

source/simulation2/components/CCmpPathfinder.cpp
761

Fine, didn't know about that.

Kuba386 added inline comments.Apr 21 2020, 10:27 PM
source/simulation2/components/CCmpObstructionManager.cpp
1148

Maybe my knowledge of how c++ range loops are compiled is missing here, but I don't think that moving this out of the loop is necessary.

Kuba386 updated this revision to Diff 11703.Apr 21 2020, 10:30 PM

Minor changes once again.
Bumped years, and named threads.

elexis added a comment.EditedApr 21 2020, 10:57 PM
So, if the patch conserves the current game mechanics, and is actually deterministic, just adds threading, it sounds like a must-have in spite of the possible downsides.

It seems that it is deterministic, however it's results differ from previous ones.(I can't play replays took with current A23 version, but I can play replays took with this patch and there are no problems when using different number of threads)
I want to play a multiplayer game to test it. I've opened topic about it in forum.

Was the replay that you chose one that contained the hash, i.e. was a multiplayer replay? (One started in multiplayer mode, not necessarily with other human players)
Absence of idle units is an indicator too, but comparing the hash is more conclusive.

(What about loaded savegames? If that is (not) supported, then replays starting from savepoints are also (not) supported (and the unit behavior is (not) the same in the loaded savegame variant).)

Hey thanks so much for working on it and putting up with the nitpicks. Can you address @kilobug's comments as well?

source/simulation2/components/CCmpObstructionManager.cpp
283

@Kuba386 can you run some profiling to see if it's better/worse?

source/simulation2/components/CCmpPathfinder.cpp
761

It didn't work on linux until very recently thanks to @linkmauve

source/simulation2/helpers/LongPathfinder.h
277

Same here.

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/serialization/SerializeTemplates.h
|  33| template<typename·ELEM>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/ps/ThreadUtil.h
|  21| namespace·ThreadUtil
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'namespaceThreadUtil{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/VertexPathfinder.h
|  72| class·VertexPathfinder
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classVertexPathfinder{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpObstructionManager.cpp
| 138| »   BEGIN_PROTECTED_DATA()
|    | [MAJOR] CPPCheckBear (unknownMacro):
|    | There is an unknown macro here somewhere. Configuration is required. If BEGIN_PROTECTED_DATA is a macro then please configure it.

source/simulation2/components/CCmpPathfinder_Common.h
|  34| #include·"graphics/Overlay.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/ps/ThreadFrontier.h
|  28| class·ThreadFrontier
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classThreadFrontier{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/Spatial.h
|  35| class·SpatialSubdivision
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classSpatialSubdivision{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/ICmpObstructionManager.h
|  53| class·ICmpObstructionManager·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpObstructionManager:' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/LongPathfinder.h
|  34| ·*·TODO:·maybe·VC2012·will?
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2024/display/redirect

Kuba386 added inline comments.Apr 22 2020, 9:29 AM
source/simulation2/helpers/LongPathfinder.h
277

Yeah, it's just not trivial to address these problems, I need to get more familiar with both patch's and 0AD's codebase to understand it better.

Kuba386 added a comment.EditedApr 22 2020, 9:32 AM

@elexis

Was the replay that you chose one that contained the hash, i.e. was a multiplayer replay? (One started in multiplayer mode, not necessarily with other human players)

No, this replay was only for performance testing purposes.
I tested it in multiplayer games already several months ago.
That was old version of the patch tough, so we need to make another test I guess.

Just to be clear, you don't need to play with other humans, the important part is running in multiplayer mode in order to obtain a hashed replay for the purpose of testing that the patch works deterministically.
For example if the serialization of the obstructionmanager is good enough but something else is indetermnistic, it could break multiplayer, resumed replays or savegames etc.
It should be sufficient to start a cheat enabled multiplayer, spawn some hundred units, move units across the map, and then run replays with different numbers of threads, and perhaps test a late-observer join in a second instance of 0ad to test the serialization.
I guess you would have noticed already by many idle units if the replay was out of sync, but strictly speaking one can only compare performance if its known to reproduce the same replay. (The 1/numThreads performance benefit indicates that it works correctly, but one should be certain not to break determinism and serialization, see also https://trac.wildfiregames.com/wiki/SimulationRequirements#Determinism)
Thanks for working on this patch!

Kuba386 planned changes to this revision.Apr 28 2020, 10:29 AM

I've done a multiplayer game as you suggested.
There was not problems during the game and also playing replays works (tried different numbers of threads and disabled threading too).
There was however a problem with late game rejoin, because I got a segfault on instance that was rejoining.
I'm going to take a closer look at this issue now.

Stan added a comment.EditedApr 28 2020, 10:41 AM
In D14#114318, @Kuba386 wrote:

I've done a multiplayer game as you suggested.
There was not problems during the game and also playing replays works (tried different numbers of threads and disabled threading too).
There was however a problem with late game rejoin, because I got a segfault on instance that was rejoining.
I'm going to take a closer look at this issue now.

Do you have a stacktrace for it? It might be https://trac.wildfiregames.com/ticket/5655

If you managed to reproduce it alone, it would be great!

Unfortunately, it's an issue with pathfinder.

#0  0x0000555555978b62 in AddTerrainEdges (edges=std::vector of length 8, capacity 8 = {...}, vertexes=std::vector of length 7, capacity 14 = {...}, i0=485, j0=891, i1=497, j1=903, passClass=4, grid=...) at ../../../source/simulation2/helpers/VertexPathfinder.cpp:280
#1  0x000055555597b6af in VertexPathfinder::ComputeShortPath (this=0x555574990020, request=..., cmpObstructionManager=...) at ../../../source/simulation2/helpers/VertexPathfinder.cpp:678
#2  0x00005555558594f6 in CCmpPathfinder::PathfinderWorker::Work (this=0x55555e242d30, pathfinder=...) at ../../../source/simulation2/components/CCmpPathfinder.cpp:830
#3  0x00005555558592da in CCmpPathfinder::PathfinderWorker::WaitForWork (this=0x55555e242d30, pathfinder=...) at ../../../source/simulation2/components/CCmpPathfinder.cpp:805
#4  0x0000555555858f7f in CCmpPathfinder::PathfinderWorker::InitThread (this=0x55555e242d30, pathfinder=..., index=0) at ../../../source/simulation2/components/CCmpPathfinder.cpp:770
#5  0x00005555558742b3 in std::__invoke_impl<void, void (CCmpPathfinder::PathfinderWorker::*)(CCmpPathfinder const&, unsigned long), CCmpPathfinder::PathfinderWorker*, std::reference_wrapper<CCmpPathfinder const>, unsigned long> (__f=
    @0x55557a2419f0: (void (CCmpPathfinder::PathfinderWorker::*)(CCmpPathfinder::PathfinderWorker * const, const CCmpPathfinder &, unsigned long)) 0x555555858e9a <CCmpPathfinder::PathfinderWorker::InitThread(CCmpPathfinder const&, unsigned long)>, __t=@0x55557a2419e8: 0x55555e242d30, __args#0=..., 
    __args#1=@0x55557a2419d8: 0) at /usr/include/c++/9.2.0/bits/invoke.h:73
#6  0x0000555555874018 in std::__invoke<void (CCmpPathfinder::PathfinderWorker::*)(CCmpPathfinder const&, unsigned long), CCmpPathfinder::PathfinderWorker*, std::reference_wrapper<CCmpPathfinder const>, unsigned long> (__fn=
    @0x55557a2419f0: (void (CCmpPathfinder::PathfinderWorker::*)(CCmpPathfinder::PathfinderWorker * const, const CCmpPathfinder &, unsigned long)) 0x555555858e9a <CCmpPathfinder::PathfinderWorker::InitThread(CCmpPathfinder const&, unsigned long)>, __args#0=@0x55557a2419e8: 0x55555e242d30, 
    __args#1=..., __args#2=@0x55557a2419d8: 0) at /usr/include/c++/9.2.0/bits/invoke.h:95
#7  0x0000555555873e39 in std::thread::_Invoker<std::tuple<void (CCmpPathfinder::PathfinderWorker::*)(CCmpPathfinder const&, unsigned long), CCmpPathfinder::PathfinderWorker*, std::reference_wrapper<CCmpPathfinder const>, unsigned long> >::_M_invoke<0ul, 1ul, 2ul, 3ul> (this=0x55557a2419d8)
    at /usr/include/c++/9.2.0/thread:244
#8  0x0000555555873d91 in std::thread::_Invoker<std::tuple<void (CCmpPathfinder::PathfinderWorker::*)(CCmpPathfinder const&, unsigned long), CCmpPathfinder::PathfinderWorker*, std::reference_wrapper<CCmpPathfinder const>, unsigned long> >::operator() (this=0x55557a2419d8)
    at /usr/include/c++/9.2.0/thread:251
#9  0x0000555555873d53 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (CCmpPathfinder::PathfinderWorker::*)(CCmpPathfinder const&, unsigned long), CCmpPathfinder::PathfinderWorker*, std::reference_wrapper<CCmpPathfinder const>, unsigned long> > >::_M_run (this=0x55557a2419d0)
    at /usr/include/c++/9.2.0/thread:195
#10 0x00007ffff5e69ee4 in std::execute_native_thread_routine (__p=0x55557a2419d0) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#11 0x00007ffff5c214cf in start_thread () from /usr/lib/libpthread.so.0
#12 0x00007ffff5b502d3 in clone () from /usr/lib/libc.so.6

What caused the crash here is reading grid.m_W variable.
I guess something causes pathfinder workers to start computing paths before grid is initialised.

Stan added a comment.Apr 30 2020, 2:42 PM

Good thing you caught that crash!

In D14#114479, @Kuba386 wrote:

Unfortunately, it's an issue with pathfinder.
What caused the crash here is reading grid.m_W variable.
I guess something causes pathfinder workers to start computing paths before grid is initialised.

That sounds a little like a bug in my latest change to support saving games (see my latest comment above).
(Thanks for working on this by the way).

I had to serialise requests, in order to do the processing between turns, because the game can be stopped between turns. But resuming wasn't trivial at all, so maybe I've missed something.

wraitii added inline comments.May 16 2020, 8:43 AM
source/simulation2/components/CCmpObstructionManager.cpp
283

We hardly ever reset the subdivisions, so it should be fine.

source/simulation2/components/CCmpPathfinder.cpp
958

My intention was that if people did something stupid, they would trigger the assert, and then that comment would tell them why this was a bad idea.

source/simulation2/helpers/LongPathfinder.h
277

AFAIK the jump point cache is unused, so it should be completely irrelevant.

wraitii updated this revision to Diff 12163.Jun 6 2020, 9:23 AM

I could reproduce the crash consistently by opening the console, running `Engine.SetSimRate(0)`, then selecting several units, ordering them to move, and quickly quicksaving(F5)/quickloading(F8).

The issue was indeed in my latest changes about serialisation, but I had actually already fixed it in D2317. In fact, I wrote on that diff that I didn't fix this correctly in D14, but I apparently never bothered to update the diff.

I've tested a bunch of things and can't make this crash now.

Stan added inline comments.Jun 6 2020, 9:56 AM
source/simulation2/components/CCmpObstructionManager.cpp
143

Still accurate?

678

& useless ?

684

& useless ?

917
933
985

I guess the & is useless there

source/simulation2/components/CCmpPathfinder.cpp
789

I guess one cannot check for m_kill there?

797

break?

869

How hard is it to do? + Profile?

source/simulation2/helpers/Spatial.h
328

Maybe range loop if grid supports it, with const iterator and what not. Would make the line above useless.

Stan added inline comments.Jun 6 2020, 9:59 AM
source/simulation2/components/CCmpObstructionManager.cpp
917

Err too much copy paste unitShapes

for (entity_id_t shape : unitShapes)

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/serialization/SerializeTemplates.h
|  33| template<typename·ELEM>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/LongPathfinder.h
|  34| ·*·TODO:·maybe·VC2012·will?
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/ps/ThreadUtil.h
|  21| namespace·ThreadUtil
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'namespaceThreadUtil{' is invalid C code. Use --std or --language to configure the language.

source/ps/ThreadFrontier.h
|  28| class·ThreadFrontier
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classThreadFrontier{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/Spatial.h
|  35| class·SpatialSubdivision
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classSpatialSubdivision{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpPathfinder_Common.h
|  34| #include·"graphics/Overlay.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/ICmpObstructionManager.h
|  53| class·ICmpObstructionManager·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpObstructionManager:' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpObstructionManager.cpp
| 138| »   BEGIN_PROTECTED_DATA()
|    | [MAJOR] CPPCheckBear (unknownMacro):
|    | There is an unknown macro here somewhere. Configuration is required. If BEGIN_PROTECTED_DATA is a macro then please configure it.

source/simulation2/helpers/VertexPathfinder.h
|  72| class·VertexPathfinder
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classVertexPathfinder{' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2334/display/redirect

wraitii added inline comments.Jun 6 2020, 10:05 AM
source/simulation2/components/CCmpObstructionManager.cpp
143

yes

source/simulation2/components/CCmpPathfinder.cpp
797

Might as well return.

869

It's hard enough. There's a high chance of dumb bugs, and this whole diff is already stupidly faster than svn.

wraitii updated this revision to Diff 12306.Sun, Jun 14, 12:49 PM

Quick rebase.

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/ps/ThreadFrontier.h
|  28| class·ThreadFrontier
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classThreadFrontier{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/ICmpObstructionManager.h
|  53| class·ICmpObstructionManager·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpObstructionManager:' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/VertexPathfinder.h
|  72| class·VertexPathfinder
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classVertexPathfinder{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/Spatial.h
|  35| class·SpatialSubdivision
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classSpatialSubdivision{' is invalid C code. Use --std or --language to configure the language.

source/ps/ThreadUtil.h
|  21| namespace·ThreadUtil
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'namespaceThreadUtil{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpObstructionManager.cpp
| 138| »   BEGIN_PROTECTED_DATA()
|    | [MAJOR] CPPCheckBear (unknownMacro):
|    | There is an unknown macro here somewhere. Configuration is required. If BEGIN_PROTECTED_DATA is a macro then please configure it.

source/simulation2/serialization/SerializeTemplates.h
|  33| template<typename·ELEM>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/LongPathfinder.h
|  33| ·*·compare·two·u16s·in·a·single·operation.
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpPathfinder_Common.h
|  34| #include·"graphics/Overlay.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2431/display/redirect

wraitii commandeered this revision.Sun, Jun 28, 11:14 AM
wraitii edited reviewers, added: Kuba386; removed: wraitii.

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/helpers/LongPathfinder.h
|  32| ·*·The·i/j·components·are·packed·into·a·single·u32,·since·we·usually·use·these
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classPathGoal{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/CCmpObstructionManager.cpp
| 139| »   BEGIN_PROTECTED_DATA()
|    | [MAJOR] CPPCheckBear (unknownMacro):
|    | There is an unknown macro here somewhere. Configuration is required. If BEGIN_PROTECTED_DATA is a macro then please configure it.

source/simulation2/components/CCmpPathfinder_Common.h
|  34| #include·"graphics/Overlay.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/VertexPathfinder.h
|  72| class·VertexPathfinder
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classVertexPathfinder{' is invalid C code. Use --std or --language to configure the language.

source/ps/ThreadUtil.h
|  21| namespace·ThreadUtil
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'namespaceThreadUtil{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/helpers/Spatial.h
|  35| class·SpatialSubdivision
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classSpatialSubdivision{' is invalid C code. Use --std or --language to configure the language.

source/simulation2/serialization/SerializeTemplates.h
|  33| template<typename·ELEM>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/ICmpObstructionManager.h
|  28| template<typename·T>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.

source/ps/ThreadFrontier.h
|  28| class·ThreadFrontier
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classThreadFrontier{' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2542/display/redirect