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

IS YOUR SERVER BROKEN SINCE 1.64 UPDATE? READ THIS #104

Closed
BoGuu opened this issue Sep 22, 2016 · 151 comments
Closed

IS YOUR SERVER BROKEN SINCE 1.64 UPDATE? READ THIS #104

BoGuu opened this issue Sep 22, 2016 · 151 comments
Labels
major-bug For issues that are reporting a game breaking bug.

Comments

@BoGuu
Copy link
Member

BoGuu commented Sep 22, 2016

Please make the changes from this commit: db66e54, to your life_server/Functions/MySQL/fn_mresArray.sqf. If you use a headless client, change the relevant file in life_hc also.

Update:

If you have malformed entries in your DB (contains ``) then replace your mresToArray with the following:

http://hastebin.com/omikofajej.cpp

https://gist.github.com/BoGuu/c552b652f752378f06a42c809150032e

Over time they should fix themselves, and you can revert back to the original.

@setoy
Copy link
Contributor

setoy commented Sep 22, 2016

Hmm, have applied this to my server but the error still persists... Same error in the log files.

@tkcjesse
Copy link
Contributor

tkcjesse commented Sep 22, 2016

I mean did you clear the column if you already joined?

Like if the column still has `` you need to fix that lmfao.

@DarkSilencerZA Can you confirm this fixed it for 4.5? As this solution for me is currently running on 3 live servers just fine however they're using 3.1.4.8 but have the exact same code for licenses.

@setoy
Copy link
Contributor

setoy commented Sep 22, 2016

Yeah, I've cleared the columns.

It appears on our modded server as well as on our clean one:
http://hastebin.com/eyepabiget.vbs

I've also run the update script and have seen that while the server is running, more rows are getting updated. So even when fixing all columns, 10 minutes later there are more malformed cells. Which indicates there's still that bug somewhere.

@riskingfusion
Copy link

When ever I use that query code and execute it, it works but then when they re-join the server it re-appears with the '','' instead of ',' ?? Any fixes ?

@tkcjesse
Copy link
Contributor

If you're using the HC you need to update that file as well...

@tkcjesse
Copy link
Contributor

@setoy your error clearly says : DB_fnc_mresToArray

@vabene1111
Copy link

vabene1111 commented Sep 22, 2016

Any ideas what the reason for this could be:

2016/09/22, 21:26:45 Error in expression <m 0 to (count _old)-1 do { _data = _old select _i; _old set[_i,[_data select 0, > 2016/09/22, 21:26:45 Error position: <select _i; _old set[_i,[_data select 0, > 2016/09/22, 21:26:45 Error Generic error in expression 2016/09/22, 21:26:45 File life_server\Functions\MySQL\fn_queryRequest.sqf, line 70 `

We Updated the mresArray functions and restored the original Database (so no double quotes or anything broken) .. it kinda looks like the array has a different format ? running v4.4

@tkcjesse
Copy link
Contributor

Dark has it working fine on 4.5 - https://i.gyazo.com/e3649b70802132e4c9faee2bb355bba1.png

@riskingfusion
Copy link

@tkcjesse I have never had a headless client file so I assume I am not using it. But is there any other ideas that may cause it to almost back track to the '','' instead of ',' even though I used that query code ?

@riskingfusion
Copy link

We are using 4.4

@allstar-uk
Copy link
Contributor

It works fine for me. I'm using as close to the main build as possible, but just a ton of customized stuffs.

4.4 seems a little outdated.

@riskingfusion
Copy link

@DarkSilencerZA Yeah I had the issue when first updated I used the query code, It works then you disconnect re-log to the server and it is like it back tracks it self so you come back naked. So I am wondering if there was anything else you edited ?

@setoy
Copy link
Contributor

setoy commented Sep 22, 2016

your error clearly says : DB_fnc_mresToArray

Yeah, but that file wasn't changed / fixed / whatever

@BoGuu
Copy link
Member Author

BoGuu commented Sep 22, 2016

If you are having problems post your mresArray and mresToArray, please

@setoy
Copy link
Contributor

setoy commented Sep 22, 2016

@riskingfusion
Copy link

fn_mresArray.sqf
http://pastebin.com/A6zrQhXb

fn_mresToArray
http://pastebin.com/i0urCVYq

@TMschar
Copy link
Contributor

TMschar commented Sep 22, 2016

I get these errors when joining after applying @tkcjesse fix.

http://hastebin.com/xivobukafi.bash

@ace16huey
Copy link

ace16huey commented Sep 22, 2016

That SQL command is changing all the empty strings to have one ` instead of the 2 needed.

@riskingfusion
Copy link

@ace16huey Some people are having the problem when they use that when you re-log to the server all them empty strings come back and make you naked again

@ace16huey
Copy link

@riskingfusion I had a player that couldn't spawn in as a civ, I am gonna dump the table and replace them that way and hope for the best. I already messed up the licenses column by working to quick and not checking my work.

@riskingfusion
Copy link

@ace16huey Oh right. Thats why you make backups :P

@rebornfuel
Copy link

rebornfuel commented Sep 22, 2016

any news on a fix or 4.4r3? as the current changes to fn_mresArray.sqf does not fix a thing

@ace16huey
Copy link

@riskingfusion Had a back up from a couple days ago, applied it and it got corrupted in the process... Arma updates give me the worst luck D:

@riskingfusion
Copy link

@rebornfuel not currently I think most of us are waiting on a fix for a similar issue

@riskingfusion
Copy link

@ace16huey I think they give everyone bad luck xD

@harmdhast
Copy link
Contributor

3.1.4.8
players table fix.

UPDATE `players` 
 SET `cop_licenses` = replace(cop_licenses, '``', '`'),
 `civ_licenses` = replace(civ_licenses, '``', '`'),
 `med_licenses` = replace(med_licenses, '``', '`'),
 `aliases` = replace(aliases, '``', '`'),
 `cop_gear` = replace(cop_gear, '``', '`'),
 `civ_gear` = replace(civ_gear, '``', '`'),
 `med_gear` = replace(med_gear, '``', '`')
    WHERE `aliases` LIKE '"[``%'

@ace16huey
Copy link

That might break more then fix to be honest @harmdhast. did that to a couple columns and it cause all the empty strings to break and what not.

@harmdhast
Copy link
Contributor

Please note the Where.

@CarbineLife
Copy link

@Jawshy will do thanks for the info

@3LGStevo
Copy link

Neither the MresArray.sqf file or MresToArray.sqf file changes have fixed the issue. When my players still sync their data, it still inserts `` into the database.

@BoGuu
Copy link
Member Author

BoGuu commented Sep 25, 2016

@3LGStevo

It would seem you have not correctly edited the files then. The only cause for the double would be by not changing the files correctly. You should have some though, in between commas, such as:

[`XXXX`,``,``,`XXXX`]

@chelseaboyc18
Copy link

@BoGuu im having same problem as 3LGStevo it allows me into server and can relog as many times as i want but soon as i sync data and then relog i get received request from server validating

@chelseaboyc18
Copy link

Or even items or licences anythink to do with arrays the way arrays are inserted into DB is not correct, they have to rewrite the two functions that format arrays OR remove em completely because they are not needed

@3LGStevo
Copy link

Yeah, someone posted a "fix" in one of the replies which didn't fix it, and the hastebin links weren't working for me.

@chelseaboyc18
I'll post you the files tomorrow, you'll need to repair your database entries. Better to take your server down to prevent further corruptions.

@Emma-L
Copy link
Contributor

Emma-L commented Sep 26, 2016

@3LGStevo The gist link is working just fine for me, the hastebin link has been crossed out for a reason..

@BoGuu
Copy link
Member Author

BoGuu commented Sep 26, 2016

Or even items or licences anythink to do with arrays the way arrays are inserted into DB is not correct

It will be correct after applying the mresArray changes in the OP (correct as in pre update).

they have to rewrite the two functions that format arrays OR remove em completely because they are not needed

One has been, as you know, the other doesn't need to change seeing as the format will be no different. However, you are right in saying they are not needed anymore (and haven't really been for a long time).

Yeah, someone posted a "fix" in one of the replies which didn't fix it, and the hastebin links weren't working for me.

Gist link works, although it's not a fix, it's a hack to fix database entries.

@chelseaboyc18 @3LGStevo

The changes have worked for servers running every version there is, so if you still have persistent problems then you've either still got malformed arrays (and no mresToArray changes), the malformed arrays have caused null entries, or your problem is something specific to your setup.

@3LGStevo
Copy link

3LGStevo commented Sep 27, 2016

@BoGuu
My server has been working for a few days now, dude. I thought the fix didn't work because someone posted a "fix" using pastebin which did nothing to rectify the issue. The hastebin links didn't work (and are now crossed out) but the working link was added in afterwards.

Anyway, @chelseaboyc18 , replace the files in life_server\functions\MySQL\ with the two files below. Any database entries with '' will need to be manually corrected. I say manually, because each of the automated methods above just fucks a different part of the database for that record, so just have some patience and work through them manually. It's easier if you filter the table with the records that are broken (like searching for '%[''%').

MREStoArray.sqf
`
/*
File: fn_mresToArray.sqf
Author: Bryan "Tonic" Boardwine";

Description:
Acts as a mres (MySQL Real Escape) for arrays so they
can be properly inserted into the database without causing
any problems. The return method is 'hacky' but it's effective.

*/
private["_array"];
_array = [_this,0,"",[""]] call BIS_fnc_param;
if (_array isEqualTo "") exitWith {[]};
_array = toArray(_array);

for "_i" from 0 to (count _array)-1 do
{
_sel = _array select _i;
if (_sel == 96) then
{
_array set[_i,39];
};
};

_array = toString(_array);
_array = call compile format["%1", _array];
_array;
`

MRESArray.sqf
`
/*
File: fn_mresArray.sqf
Author: Bryan "Tonic" Boardwine";

Description:
Acts as a mres (MySQL Real Escape) for arrays so they
can be properly inserted into the database without causing
any problems. The return method is 'hacky' but it's effective.

*/
private["_array"];
_array = [_this,0,[],[[]]] call BIS_fnc_param;
_array = str(_array);
_array = toArray(_array);

for "_i" from 0 to (count _array)-1 do
{
_sel = _array select _i;
if ((_i != 0 && _i != ((count _array)-1))) then
{
if (_sel isEqualTo 34) then
{
_array set[_i,96];
};
};
};

str(toString(_array));`

@Jawshy
Copy link
Contributor

Jawshy commented Sep 27, 2016

@3LGStevo, code blocks are formatted with three backticks ` above and below; not one. However, with the amount of code you have there you should upload the files to GitHub instead as said at #104 (comment).

@chelseaboyc18
Copy link

@BoGuu thanks for that finally got it working now. Appreciate your help.
Also i noticed in your MREStoArray.sqf you have str(toString(_array));` should be str(toString(_array));
just pointing out as anyone else might make the mistake of adding the extra '
(:

@harmdhast
Copy link
Contributor

@chelseaboyc18
It seems to be markdown related.

@VladmirVorkeshky
Copy link

Can someone please help me with this? I am new to GitHub and would prefer if someone could help me through Steam @vladmir Vorkeshky. I did everything he said to do and I still am having the same problem. I have a community and they're all waiting on me to fix it I would REALLY REALLY appreciate it if anyone could help. Thanks!

@OfficialTemp
Copy link

OfficialTemp commented Oct 1, 2016

@VladmirVorkeshky Make sure you have followed ALL the steps listed by Boguu. If you still cannot fix it, join the ArmA RPG Life discord and ask for help by someone there. https://discordapp.com/invite/sEcQdPn

@Crip12
Copy link

Crip12 commented Nov 11, 2016

UPDATE players
SET cop_licenses = replace(cop_licenses, '', ''),
aliases = replace(aliases, '', ''),
cop_gear= replace(cop_gear, '', '`') WHERE `cop_licenses` LIKE '"[[%';

UPDATE players
SET civ_licenses = replace(civ_licenses, '', ''),
civ_gear = replace(civ_gear, '', ''),
aliases= replace(aliases, '', '`') WHERE `civ_licenses` LIKE '"[[%';

UPDATE players
SET med_licenses = replace(med_licenses, '', ''),
aliases = replace(aliases, '', ''),
med_gear= replace(med_gear, '', '`') WHERE `med_licenses` LIKE '"[[%';

UPDATE gangs
SET members = replace(members, '', '')
WHERE members LIKE '"[`%';

UPDATE containers
SET gear = replace(gear, '', '')
WHERE gear LIKE '"[[`%';

UPDATE containers
SET inventory = replace(inventory, '', '')
WHERE inventory LIKE '"[[[`%';

UPDATE vehicles
SET gear = replace(gear, '', '')
WHERE gear LIKE '"[[`%';

UPDATE vehicles
SET inventory = replace(inventory, '', '')
WHERE inventory LIKE '"[[[`%';

@Jawshy Jawshy added major-bug For issues that are reporting a game breaking bug. and removed READ ME labels Nov 16, 2016
@JamesMason580
Copy link

JamesMason580 commented Dec 30, 2016

Really don't want to sound like a broken record, but I am comparatively new to running an Arma 3 server. We're using the old CG mission file with a few modifications of our own. Now I've run into this issue, gear saving works perfectly, but when anyone loads in after having saved gear, they spawn in naked. A temporary fix I instituted was to if(count _itemArray == 0) exitWith within the loadGear.sqf to if(count 0 == 0) exitWith so that it always evaluates to true and give everyone the default gear. My problem is that I'm unsure how to debug this, or I could probably figure it out. Any help would be greatly appreciated.

EDIT: Maybe this sheds some light? From one of our users logging in. http://pastebin.com/rGqRgrQy

EDIT: Could be it's cutting off before it acutally finishes loading the data?

@Wilson-WilliV2
Copy link

So there isnt a fix?

@CarlosGilbertoHF
Copy link
Contributor

@wilsonJude Did you read this issue at least?

@Wilson-WilliV2
Copy link

Now it says Setting Up Client, Please wait

@Emma-L
Copy link
Contributor

Emma-L commented Jan 9, 2017

@wilsonJude if you have followed all of the steps and still can't get it working, please join the ArmA RPG Life discord: invite.

@BoGuu BoGuu closed this as completed Feb 24, 2017
@AsYetUntitled AsYetUntitled deleted a comment from riskingfusion Jul 29, 2017
@AsYetUntitled AsYetUntitled deleted a comment from tkcjesse Jul 29, 2017
@AsYetUntitled AsYetUntitled deleted a comment from Jawshy Mar 13, 2018
@AsYetUntitled AsYetUntitled deleted a comment from tkcjesse Mar 13, 2018
@AsYetUntitled AsYetUntitled deleted a comment from harmdhast Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-bug For issues that are reporting a game breaking bug.
Projects
None yet
Development

No branches or pull requests