Page 1 of 1

Cloning Project Bug

Posted: 18 April 2020, 12:08
by apollo1001
Hi All

I don't have time for a full project at the second, so thought I'd bash through a couple of the bounty hunting bugs. I was successfully able to clone a copy of Hanabi a couple of days ago without too many issues (there was a small glitch when trying to start a game, but otherwise fine).

Yesterday, I tried cloning a different game to do a bug fix (Noir : killer vs inspector) and there have been a few issues:
1. During project creation the log noted 3 missing files. (I can't remember which ones, but suspect it may have something to do with another issue below).
2. I renamed the project NoirkviBugFixes although weirdly the gamename in the project became NoirkviBugFixesbugfixes.
3. Due to (2) I got an error when trying to start the game about missing files (the files were all called noirkvibugfixes.<ext> whilst the links were obviously to the longer version. Fixed with find/replace. (same error message as in viewtopic.php?f=12&t=11298&p=35920&hili ... php#p35920)
4. Now trying to start the game I'm getting the error message

Code: Select all

Unknow statistic id: player suspectsKilled  
. I have checked the stats.inc.php and it has definitely been reloaded, but clearly it is not linking to the game. Commenting out all of the references to statistics gets a bit further and game creates.
5. Game then shows 'Could not find:NoirkviBugFixes/NoirkviBugFixes.view.php'.

At this point, I think I'm going to probably leave it for now as there are clearly issues here.

Is it possible to make a bug reports section for the studio? (I don't really want to add this to the one for the main site).

Cheers
Adam


EDIT:
1. Out of curiousity I tried the cloning process again. The three files referenced in (1) were:

Code: Select all

cp: cannot stat '/var/tournoi/games/noirkvi/img/README': No such file or directory
cp: cannot stat '/var/tournoi/games/noirkvi/modules/README': No such file or directory
cp: cannot stat '/var/tournoi/games/noirkvi/misc/README': No such file or directory
2. despite calling it NoirkviApollo, this has gone for NoirkviApolloapollo and the same errors are thus present.

EDIT 2:
I checked my hanabi clone and the gamename was all lowercase and hadn't been repeated. A third test with name 'noirapollotest' has worked first time without any errors.

So (based on limited knowledge) the bug appears to simply be that the new project name must be all lower case.
Hope that helps others if they have a similar problem.

Re: Cloning Project Bug

Posted: 19 April 2020, 18:32
by Victoria_La
Yes the cloning project has some code that does a lot of heuristics because project names used in bunch of place with non-consitent capitalization,
so all lowercase is the best. After clone you have to inspect all string contain all project name (case insensitive) to make sure nothing was missed during rename including file names.

please change title to add [solved] profix

Re: Cloning Project Bug

Posted: 19 April 2020, 19:01
by apollo1001
I'm not going to mark it as solved at the moment - despite finding a workaround, the bug still exists.

Re: Cloning Project Bug

Posted: 19 April 2020, 19:44
by Een
Hi,

As explained on the studio bug bounties page:

"If you want to help, you can create a new project as a copy of the official one (or request access to the official project from studio@boardgamearena.com if that doesn't work: some projects have not been built exactly in line with the BGA Studio standard template)."

Cloning is a facility tool relying on regexp replacement. It works well if the project is standard (no exotic stuff) and if the project name chosen is sufficiently specific so that replacement works well (for project Toc for example, it doesn't work well at all: a lot too many replacements are done and it breaks everything :D )

Re: Cloning Project Bug

Posted: 19 April 2020, 20:00
by apollo1001
Een wrote: 19 April 2020, 19:44 As explained on the studio bug bounties page:
Whilst I take your point, on the Project Creation page in the control panel it states:
"Note: project name using CamelCase, without numbers, spaces or special characters (example: RaceForTheGalaxy)."
which is clearly contrary to the lowercase requirement.

Anyhow, i'm not expecting a fix anytime soon as there is a workaround.

Re: Cloning Project Bug

Posted: 19 April 2020, 20:10
by Een
Yes, it probably means that the original developer didn't use this convention (which may not have been explicit at the time).