2025-07-22 20:58 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005415Spring engineGeneralpublic2016-12-13 17:14
Reportergajop 
Assigned Tocleanrock 
PrioritynormalSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target Version104.0Fixed in Version 
Summary0005415: ArchiveScan fails to extract appropriate map names
DescriptionAfter deleting my .cache and rescanning the archives with a new engine, I'm getting nonsensical results (garbage): http://i.imgur.com/CjpkcvJ.jpg
These are all normal maps that have worked before (comet_catcher_redux.sd7 enclaves_v1.sd7 evorts-new_iammas-v05.sd7 titanduel.sd7
emain_macha_v3.sd7 epic40x40_32p.sd7 onyxcauldron1.6.sd7 widepass_fineto.sd7).
The issue remains even if I redownload them with pr-downloader.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0016946

Kloot (developer)

Could be that my changes are responsible, but I also have reason to believe ThreadPool (which is used in ArchiveScanner as well) is completely broken at the moment.

Can you compile without THREADPOOL #defined and see if this still happens?

~0016947

gajop (developer)

Mind telling me how I should do that? I've tried adding "REMOVE_DEFINITIONS (-DTHREADPOOL)" to the builds/legacy/CMakeLists.txt, much like it was done at the top of builds/dedicated/CMakeLists.txt, but it's producing a lot of errors when linking:

../rts/System/ThreadPool.h:468: error: undefined reference to 'ThreadPool::HasThreads()'
/usr/include/c++/6.2.1/bits/atomic_base.h:514: error: undefined reference to 'ITaskGroup::lastId'
../rts/System/ThreadPool.h:121: error: undefined reference to 'ThreadPool::PushTaskGroup(std::shared_ptr<ITaskGroup>&&)'
../rts/System/ThreadPool.h:123: error: undefined reference to 'ThreadPool::WaitForFinished(std::shared_ptr<ITaskGroup>&&)'
../rts/System/ThreadPool.h:468: error: undefined reference to 'ThreadPool::HasThreads()'
/usr/include/c++/6.2.1/bits/atomic_base.h:514: error: undefined reference to 'ITaskGroup::lastId'
../rts/System/ThreadPool.h:121: error: undefined reference to 'ThreadPool::PushTaskGroup(std::shared_ptr<ITaskGroup>&&)'
../rts/System/ThreadPool.h:123: error: undefined reference to 'ThreadPool::WaitForFinished(std::shared_ptr<ITaskGroup>&&)'
../rts/Sim/Misc/LosMap.cpp:569: error: undefined reference to 'ThreadPool::GetThreadNum()'
../rts/Sim/Misc/LosMap.cpp:642: error: undefined reference to 'ThreadPool::GetThreadNum()'
../rts/System/ThreadPool.h:468: error: undefined reference to 'ThreadPool::HasThreads()'
../rts/System/ThreadPool.h:468: error: undefined reference to 'ThreadPool::HasThreads()'
/usr/include/c++/6.2.1/bits/atomic_base.h:514: error: undefined reference to 'ITaskGroup::lastId'
../rts/System/ThreadPool.h:121: error: undefined reference to 'ThreadPool::PushTaskGroup(std::shared_ptr<ITaskGroup>&&)'
../rts/System/ThreadPool.h:123: error: undefined reference to 'ThreadPool::WaitForFinished(std::shared_ptr<ITaskGroup>&&)'
/usr/include/c++/6.2.1/bits/atomic_base.h:514: error: undefined reference to 'ITaskGroup::lastId'
../rts/System/ThreadPool.h:121: error: undefined reference to 'ThreadPool::PushTaskGroup(std::shared_ptr<ITaskGroup>&&)'
../rts/System/ThreadPool.h:123: error: undefined reference to 'ThreadPool::WaitForFinished(std::shared_ptr<ITaskGroup>&&)'
collect2: error: ld returned 1 exit status

~0016948

Kloot (developer)

change https://github.com/spring/spring/blob/develop/CMakeLists.txt#L363 (and delete your cmake cache)

~0016949

gajop (developer)

OK, it compiles now but it still outputs garbage. It seems it's not deterministic: each deletion of ~/.config/spring/cache will produce different map names.

~0016950

Kloot (developer)

Last edited: 2016-12-11 17:12

View 3 revisions

Garbage rarely is.

For completeness, which commit does "a new engine" refer to?

~0016951

abma (administrator)

i can't reproduce this problem.

103.0.1-356-g809e4d3

@gajip:

infolog.txt would be nice...

~0016952

gajop (developer)

I spent some time to bisect it, and I got it to this point:
BAD: 6e14f6f1bda13a09a70cc7b2cefc9df7921ed43a
GOOD: ac665bd6a4319a250fa14eb5ef0541824e0acb07
Travis has some broken builds in between, so I didn't try to go into more detail.

The infolog of the above mentioned bad commit (6e14f6f1bda13a09a70cc7b2cefc9df7921ed43a) is attached.

~0016955

abma (administrator)

Build Environment: boost-106200, GNU libstdc++ version 20160830
Compiler Version: gcc-6.2.1 20160830


mhmm....

~0016956

abma (administrator)

@cleanrock:

as you use Arch-Linux, too: do you have the same problem?

~0016957

gajop (developer)

Additional tests reveal the following:

1. Using the latest static (https://springrts.com/dl/buildbot/default/develop/103.0.1-359-g23912f6/linux64/) worked fine. The issue seems to be with the way I'm building it.

2. I've tried this on Ubuntu 16.04 too (relevant thread: https://springrts.com/phpbb/viewtopic.php?f=12&t=35752&p=580491#p580491), and I had issues there as well, although it "only" happened to roughly 70% of maps - the infolog-ubuntu.txt is attached.
This machine has older boost and GCC (from infolog):
Spring 103.0.1-356-g809e4d3 develop
Build Environment: boost-105800, GNU libstdc++ version 20160609
Compiler Version: gcc-5.4.0 20160609

I also tried another build with no threadpool, but the results are essentially the same (attached).


So the important thing here is that it doesn't happen for all maps. Would you like to know when it happens exactly? That might give us a clue what's going on. So far I've noticed maps that give the "mapfile isn't set in mapinfo.lua, please set it for faster loading!" warning are *less* likely to have issues.

~0016958

Kloot (developer)

That would help since I can't reproduce it either.

~0016960

cleanrock (reporter)

Fix 2c859bcf1747856e4d13c9941eaa2a4528019ab8 committed to develop branch: remove a few std::move calls to fix 0005415

Kloot, I suggest you read
http://thbecker.net/articles/rvalue_references/section_01.html
and then remove the rest of all bad std::move calls., repo: spring changeset id: 7663
+Notes

-Issue History
Date Modified Username Field Change
2016-12-11 13:00 gajop New Issue
2016-12-11 13:00 gajop Description Updated View Revisions
2016-12-11 14:07 abma Severity minor => block
2016-12-11 14:07 abma Target Version => 104.0
2016-12-11 14:22 Kloot Note Added: 0016946
2016-12-11 16:22 gajop Note Added: 0016947
2016-12-11 16:34 Kloot Note Added: 0016948
2016-12-11 16:51 gajop Note Added: 0016949
2016-12-11 17:00 Kloot Note Added: 0016950
2016-12-11 17:12 Kloot Note Edited: 0016950 View Revisions
2016-12-11 17:12 Kloot Note Edited: 0016950 View Revisions
2016-12-11 18:19 abma Note Added: 0016951
2016-12-11 18:19 abma Status new => feedback
2016-12-11 18:33 gajop File Added: infolog.txt
2016-12-11 18:33 gajop Note Added: 0016952
2016-12-11 18:33 gajop Status feedback => new
2016-12-12 01:22 abma Note Added: 0016955
2016-12-12 01:28 abma Note Added: 0016956
2016-12-13 05:08 gajop File Added: infolog-ubuntu.txt
2016-12-13 05:08 gajop Note Added: 0016957
2016-12-13 05:09 gajop File Added: infolog-ubuntu-no-threadpool.txt
2016-12-13 13:41 Kloot Note Added: 0016958
2016-12-13 17:14 cleanrock Changeset attached => spring develop 2c859bcf
2016-12-13 17:14 cleanrock Note Added: 0016960
2016-12-13 17:14 cleanrock Assigned To => cleanrock
2016-12-13 17:14 cleanrock Status new => resolved
2016-12-13 17:14 cleanrock Resolution open => fixed
+Issue History