Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Russian localization of key names #1246

Closed
YetheSamartaka opened this issue Oct 30, 2019 · 34 comments · Fixed by #1250
Closed

Error with Russian localization of key names #1246

YetheSamartaka opened this issue Oct 30, 2019 · 34 comments · Fixed by #1250
Assignees
Labels
Milestone

Comments

@YetheSamartaka
Copy link
Contributor

After yesterday's update (Update 1.96) I'm getting this error :

11:20:50 [CBA] (settings) INFO: Reading settings from settings file.
11:20:50 [CBA] (settings) INFO: Finished reading settings from settings file.
11:20:50 [CBA] (settings) INFO: Mission Config: File [cba_settings.sqf] loaded successfully.
11:20:51 Error in expression <ring [10, 13, 9, 32] joinString "";
};

parseSimpleArray (["[", _string, "]"] jo>
11:20:51 Error position: <parseSimpleArray (["[", _string, "]"] jo>
11:20:51 Error Generic error in expression
11:20:51 File x\cba\addons\settings\fnc_parse.sqf..., line 30
11:20:51 [ACE] (common) INFO: Parsed Settings Configs [50.0 ms]
11:20:51 "SquadBarDefault: false"
11:20:51 String STR_RHS_FAC_VDV_45 not found
11:20:51 String STR_RHS_FAC_VDV_45 not found
11:20:51 [15431,237.92,0,"XEH: PreInit finished."]
11:20:51 Setting invalid pitch 0.0000 for Zeus1
11:20:59 [CBA] (settings) INFO: Mission Config: File [cba_settings.sqf] loaded successfully.
11:20:59 Error in expression <ring [10, 13, 9, 32] joinString "";
};

parseSimpleArray (["[", _string, "]"] jo>
11:20:59 Error position: <parseSimpleArray (["[", _string, "]"] jo>
11:20:59 Error Generic error in expression
11:20:59 File x\cba\addons\settings\fnc_parse.sqf..., line 30

It makes missions unstartable, ArmA III just crashes or freezes.

@commy2
Copy link
Contributor

commy2 commented Oct 30, 2019

Please upload the full RPT file.

@YetheSamartaka
Copy link
Contributor Author

Please upload the full RPT file.

Found out, that VCOM settings in CBA_SETTINGS are causing this error, will try to isolate the problem if it isn't whole VCOM.

@YetheSamartaka
Copy link
Contributor Author

YetheSamartaka commented Oct 30, 2019

Please upload the full RPT file.

Found the exact line:
force VCM_SIDEENABLED = [WEST,EAST,GUER];

If it is included it causes that error, will try to modify it, but for the moment I recommend to exclude it as comment //force VCM_SIDEENABLED = [WEST,EAST,GUER];

Edit:
Tried to modify it into force VCM_SIDEENABLED = [west,east,resistance]; but it causes the same error.

@YetheSamartaka
Copy link
Contributor Author

Please upload the full RPT file.

Arma3_x64_2019-10-30_12-37-32.txt

@bux
Copy link
Contributor

bux commented Oct 30, 2019

needs another Lingor /s

the amount of UBCs though ...

@YetheSamartaka
Copy link
Contributor Author

Problem is restricted to the virtual zeus. Zeus with body and players are not affected.

@dedmen
Copy link
Contributor

dedmen commented Oct 30, 2019

Can someone get me the string thats provided to parseSimpleArray please?
There are other issues with that command, need to know if this is a new one.

@dedmen
Copy link
Contributor

dedmen commented Oct 30, 2019

force VCM_SIDEENABLED = [WEST,EAST,GUER];
If the string "[WEST,EAST,GUER]" is being passed to parseSimpleArray like that, then thats invalid, it only parses a few specific keywords (true,false,nil,null,,any)
They need to be strings
force VCM_SIDEENABLED = ["WEST","EAST","GUER"];

@commy2
Copy link
Contributor

commy2 commented Oct 30, 2019

Dedmen is right. SIDE types are not supported by settings, only NUMBER, STRING and ARRAYs of these. This is because SIDE types cannot be serialized by default and I don't want to make everything ugly just to support them as they provide no functionality that cannot be achieved with supported types.

Idk whether this is an issue by VCOM or by @YetheSamartaka. It definitely is a not a problem with CBA or the update 1.96. Close?

@commy2 commy2 changed the title After Update 1.96 error makes missions unstartable, ArmA III just crashes or freezes. After Update 1.96 error makes missions unstartable, Arma 3 just crashes or freezes. Oct 30, 2019
@YetheSamartaka
Copy link
Contributor Author

After some testing, it is not related to the VCOM, problem is still there.

@commy2
Copy link
Contributor

commy2 commented Oct 30, 2019

RPT of a session with as few as possible mods?

@dedmen
Copy link
Contributor

dedmen commented Oct 30, 2019

Please attach your settings.sqf file.

@YetheSamartaka
Copy link
Contributor Author

Please attach your settings.sqf file.

cba_settings.txt

@commy2
Copy link
Contributor

commy2 commented Oct 31, 2019

And RPT?

@dedmen
Copy link
Contributor

dedmen commented Nov 2, 2019

force ace_common_checkPBOsWhitelist = "[js

That string might cause the double quote escape issue (Which btw has been fixed on RC)

@commy2
Copy link
Contributor

commy2 commented Nov 4, 2019

Likely the parseSimpleArray bug from v1.96 which is now hotfixed.

Nope, unrelated. Issue discussion is continued here: #1255

All comments below are unrelated and changed the issue subject.

@dedmen
Copy link
Contributor

dedmen commented Nov 13, 2019

Liquid gave me data!

19:31:13 "[""Web-клавиша ""Home""""]"
19:31:13 Error in expression <_formatedKeyname != "[""""""]") then {
(parseSimpleArray _formatedKeyname) selec>
19:31:13   Error position: <parseSimpleArray _formatedKeyname) selec>
19:31:13   Error Общая ошибка в выражении
19:31:13 File x\cba\addons\keybinding\XEH_preStart.sqf..., line 175

19:31:13 "[""Web-клавиша ""Поиск""""]"
19:31:13 "[""Web-клавиша ""Избранное""""]"
19:31:13 "[""Web-клавиша ""Обновить""""]"
19:31:13 "[""Web-клавиша ""Стоп""""]"
19:31:13 "[""Web-клавиша ""Вперед""""]"
19:31:13 "[""Web-клавиша ""Назад""""]"

I guess something with the quotes in here?
Also looks like 1.96 bug, but not fixed.

@commy2
Copy link
Contributor

commy2 commented Nov 13, 2019

Should've never used parseSimpleArray. They only ever added this, because of performance autism. Too many low skilled people are tinkering with it and it is broken every other version.

@dedmen
Copy link
Contributor

dedmen commented Nov 13, 2019

KK says that string is completely invalid, call compile fails on it too.
It should never have worked. Despite that we didn't get any reports about that in the last 3 years that code has been there.

@dedmen
Copy link
Contributor

dedmen commented Nov 13, 2019

Discord_2019-11-13_18-22-06

@severgun
Copy link
Contributor

severgun commented Nov 13, 2019

Despite that we didn't get any reports about that in the last 3 years that code has been there.

Seems nobody use Web keys for arma hotkeys. Or at least in russian community.
It is also simpler to rebind than create ticket.

@commy2
Copy link
Contributor

commy2 commented Nov 13, 2019

I have a feeling that beginning from dedmen's post today, this is a completely different thing than what OP wrote.

@severgun
Copy link
Contributor

severgun commented Nov 13, 2019

yep. but fix needed here

private _formatedKeyname = format ["[%1]", keyName _x];

[GVAR(keyNamesHash), str (_x select 0), parseSimpleArray format ["[%1]", keyName (_x select 1)] select 0] call CBA_fnc_hashSet;

@commy2
Copy link
Contributor

commy2 commented Nov 13, 2019

Nah. The point of those lines is to strip away the double quote marks the keyName command returns. If the command does not return strings with double quote marks (anymore? In Russian UI only?), then there is no point in using parseSimpleArray at all.

So the question is, what does keyName report in the English UI in 1.96? And what does it report in the Russian UI?

@commy2 commy2 changed the title After Update 1.96 error makes missions unstartable, Arma 3 just crashes or freezes. Error with Russian localization of key names Nov 13, 2019
@commy2 commy2 added this to the 3.13 milestone Nov 13, 2019
@commy2
Copy link
Contributor

commy2 commented Nov 13, 2019

Sry OP, you thread is repurposed.

@severgun
Copy link
Contributor

So the question is, what does keyName report in the English UI in 1.96? And what does it report in the Russian UI?

All in Dedmen's posts above.
keyName 0xb2
English
"""Web Home"""
Russian
"""Web-клавиша ""Home"""""

@commy2
Copy link
Contributor

commy2 commented Nov 14, 2019

If I were to follow the suggested code, it gets rid of the script error, but now reports useless bull shit:

private _keyEN = """Web Home""";
private _keyRU =  """Web-клавиша ""Home""""";

parseSimpleArray format ["[%1]", _keyEN] select 0 // "Web Home"
parseSimpleArray format ["[%1]", str _keyEN] select 0 // """""Web Home"""""
parseSimpleArray format ["[%1]", _keyRU] select 0 // "Web-клавиша " + Script error
parseSimpleArray format ["[%1]", str _keyRU] select 0 // """""Web-клавиша """"Home"""""""""

Now if I avoid parseSimpleArray, I get the correct results:

private _keyEN = """Web Home"""; 
private _keyRU =  """Web-клавиша ""Home"""""; 
 
private _s = str text _keyEN;
_s select [1, count _s - 2] // "Web Home"

private _s = str text _keyRU;
_s select [1, count _s - 2] // "Web-клавиша ""Home"""

Perfectly escaped quote marks inside strings.

The part I am angry about is, that I specifically remember having tested this, and it worked before parseSimpleArray was changed (recently or months ago, changes happen frequently it seems).

@commy2 commy2 reopened this Nov 14, 2019
@commy2 commy2 self-assigned this Nov 14, 2019
@commy2
Copy link
Contributor

commy2 commented Nov 14, 2019

Seems nobody use Web keys for arma hotkeys. Or at least in russian community.
It is also simpler to rebind than create ticket.

All key names are converted and cached at game start (it is a preStart script after all). It does not matter what key is bound to what.

Anyway, thanks for the help everyone. Fix on weekend.

@commy2
Copy link
Contributor

commy2 commented Nov 14, 2019

Changed to RUSSKIE localization:

0xB2 call CBA_fnc_localizeKey // "Web-клавиша ""Home"""

No errors.

@Dystopian
Copy link
Contributor

meanwhile in Development Branch Changelog

Fixed: Un-escaping double quotes in parseSimpleArray

@commy2
Copy link
Contributor

commy2 commented Nov 15, 2019

Yeah, but at this point, I am just tired of their shit. They will likely break it again.

@severgun
Copy link
Contributor

severgun commented Nov 15, 2019

All key names are converted and cached at game start (it is a preStart script after all). It does not matter what key is bound to what.

As I understand this strings are used in keybinding menu. So because no one use Web keys no one notice corrupted strings.

0xB2 call CBA_fnc_localizeKey // "Web-клавиша ""Home"""

Double double quotes inside are not correct actually. But better than error I think.

meanwhile in Development Branch Changelog

Most part of log is copy paste from stable branch released 2 days ago. So I think it's behaviour is equal to what KK told on discord sreenshots

@commy2
Copy link
Contributor

commy2 commented Nov 15, 2019

As I understand this strings are used in keybinding menu. So because no one use Web keys no one notice corrupted strings.

All keynames are cached on game start. The current code results in a script error. Script errors on game start have a high chance to crash the application, due to a bug with the error popup message. This is not a trivial bug.

Double double quotes inside are not correct actually. But better than error I think.

But those are not double quotes when displayed on controls. They are escaped quote marks. Just execute:

hintSilent "Web-клавиша ""Home"""

It will look exactly as intended.

@dedmen
Copy link
Contributor

dedmen commented Nov 18, 2019

Fixed: Un-escaping double quotes in parseSimpleArray

not related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants