Code Monkey home page Code Monkey logo

Comments (5)

atilaneves avatar atilaneves commented on July 3, 2024

That looks fine to me. Which version of excel-d?

from excel-d.

taylorh140 avatar taylorh140 commented on July 3, 2024

first 0.2.18 that didn't work so i updated to 0.3.8. and it worked better but I still get this error.
Book1.xlsx

from excel-d.

atilaneves avatar atilaneves commented on July 3, 2024

Thanks for attaching the spreadsheet that causes it. I'll take a look.

from excel-d.

taylorh140 avatar taylorh140 commented on July 3, 2024

I also have a small project this belongs too if it helps. I am using (excel 2016 32bit)
ultrafunctions.zip

from excel-d.

atilaneves avatar atilaneves commented on July 3, 2024

I had to use Visual Studio to get a stack trace, but when I did it was fairly trivial to find out what was going on once I checked out the source code for std.regex. It turns out that it memoizes the returns, which means it's storing the string parameters passed to URegexMatch. Unfortunately for everyone, those string parameters aren't allocated on the GC, meaning the memory for them is reused and... boom.

I need to adjust the documentation to tell users to not escape function parameters in any way. In fact, the best thing to do is make all parameters to functions meant to be called by Excel scope and compile with -dip1000.

I don't think there's any way in the language as it is today to enforce this however.

In short, call .dup on the strings (InputStr, RegexStr) that you're inadvertently escaping and the bug goes away.

from excel-d.

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.