Git Product home page Git Product logo

Comments (7)

dedmen avatar dedmen commented on July 30, 2024

Do you have a array value in there which total length is > 8kb?
Problem is. After parsing a array element you are left with , "next element", "next element" and so on
Now. The parser sees the comma, knows that it has a comma pattern and that it matches perfectly. BUT! The parser has to choose the longest matching pattern. So instead of grabbing the comma as it should. It instead tries the unquoted string pattern
https://github.com/KoffeinFlummi/armake/blob/master/src/rapify.l#L110
But it doesn't find the end of that until his 8kb buffer (16kb on 64 bit afaik) runs out.

I have a fix ready.
[^;,{"' \t\n][^;{\n]*/[ \t\n]*; { in line 110, in the link I posted above. Can you try that out?
I'll test if my change has anything to do with that though.

from armake.

jonpas avatar jonpas commented on July 30, 2024

As said, nothing is changed in that component since last time I tried, but if could've also been broken then and I forgot to make an issue.

Will try.

from armake.

dedmen avatar dedmen commented on July 30, 2024

Okey. Reverting my parser fix makes the error show up again on my test config (Arma AIO export).
Additionally reverting my preprocessor skip quoted strings thing, error still shows up.
Adding my parser fix back, and leaving the preprocessor change out, runs through successfully without error.

Which version of armake did you use previously?
I cannot test old versions with my AIO test because of #90

But with my test config (see attachment) original armake does indeed error. So it's not caused by my change.
test.zip

from armake.

jonpas avatar jonpas commented on July 30, 2024

I think it was 0.6.1. But I'd have to make sure it actually worked with that.

from armake.

dedmen avatar dedmen commented on July 30, 2024

Yes. That's the bug you had.
Your huge array is here: https://github.com/IDI-Systems/acre2/blob/master/addons/sys_prc148/config.cpp#L7
Do you need to have all your ID's in there? for TFAR I only have the base radios. I don't need the others to be placeable in editor or accessible in arsenal or anything anyway.
You have them as scope = 1 anyway. I think CfgPatches should only contain things that are actually supposed to be accessible.
But you are duplicating your whole config class for your radios
https://github.com/IDI-Systems/acre2/blob/f8bd42f9c504e9028154e5505ffb2d57d0e89cff/addons/main/script_radio_macro.hpp#L533
512 times. Even though there is no difference between them. You could reduce your filesize (and increase binarization speed) alot by just doing
class radio_2 : radio_1 {};
class radio_3 : radio_1 {};
class radio_4 : radio_1 {};
and so on for the rest of the classes.

from armake.

jonpas avatar jonpas commented on July 30, 2024

I don't think they are supposed to be there yeah, but without it I wouldn't find this bug! :D

from armake.

dedmen avatar dedmen commented on July 30, 2024

Well I found the bug last week already anyway :D
dedmen@8508357
Just didn't get to making pull requests for my fixes here

from armake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.