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

Config Export messes up last line #1158

Closed
jonpas opened this issue May 13, 2015 · 8 comments
Closed

Config Export messes up last line #1158

jonpas opened this issue May 13, 2015 · 8 comments
Assignees
Labels
Milestone

Comments

@jonpas
Copy link
Member

jonpas commented May 13, 2015

ACE3 Version: 3.0.0.3 cf635d4

Mods:

  • @cba_a3
  • @ace3

Placed ACE3 Modules:

  • Allow Config Export

Description:
Config Export messes up last line in the pasted export, examples:

class ace_medical_medicSetting_SurgicalKit {
    value = 1;
    typeName = "SCALAR";
;
class ace_advanced_ballistics_simulationRadius {
    value = 3000;
    typeName = "SCALAR";
    force = 1;
};;

Steps to reproduce:

  • Place Allow Config Export module
  • Export Config
  • Check last line in pasted export

Where did the issue occur?
Singplayer - Editor

RPT log file:
N/A

Issue found by @Jastreb

@thojkooi thojkooi self-assigned this May 13, 2015
@thojkooi thojkooi added this to the 3.1.0 milestone May 13, 2015
@Jastreb
Copy link

Jastreb commented May 13, 2015

Confirmed, same with PWS final version of ACE3. Making server crash on start:

Server crash on start

On first export I was missing };
Second attempt got just ;
Third was };; and all the rest.

Nothing in RPT.

@jaynus
Copy link
Contributor

jaynus commented May 14, 2015

Is this because of my clipboard exports or because of the builder, @Glowbal?

@Jastreb
Copy link

Jastreb commented May 20, 2015

Still issue in 3.0.1

@PabstMirror
Copy link
Contributor

CBA_fnc_split doesn't work past 10,000 chars in non-scheduled.
With user settings it's arround 13k.

I think we also stick an extra ; on the end of any output.

We could just spawn that part of the code or:

we could chunk data to the extension via:

_countSent = 0;
while {_countSent < (count _compiledConfig)} do {
    "ace_clipboard" callExtension (_compiledConfig select [_countSent, CHARS_PER_EXT_CALL]);
    _countSent = _countSent + CHARS_PER_EXT_CALL;
};
"ace_clipboard" callExtension "--COMPLETE--";

but I've been getting occasional crashes with both it and the original version.

@thojkooi
Copy link
Contributor

Why do we need to split the input?

@PabstMirror
Copy link
Contributor

Biki says There is a maximum size for how much data an extension can transfer to the game. When the feature was initially released it was 4k, it has since been raised to 8k, 16k, and is now down to 10kB. So far it has only changed between versions of arma, not while the particular arma process is running.

Although the line above it mentions java, so the data might be a little old 😄 and it's talking about return data length, but I'm guessing there is some kind of max string length for input.

I tried sending 9000 chars at once. I only got 8191 in my clipboard and my game crashed.

@thojkooi
Copy link
Contributor

Ok, but why split? We are compiling the actual content. Why not sent it to the extension while we are doing that, one setting at a time?

@thojkooi
Copy link
Contributor

https://github.com/acemod/ACE3/blob/master/addons/optionsmenu/functions/fnc_exportSettings.sqf#L58
We could just directly send _compiledConfigEntry to the extension no?

thojkooi added a commit that referenced this issue May 20, 2015
Sent directly to extension instead of splitting it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants