Giter VIP home page Giter VIP logo

Comments (8)

govert avatar govert commented on July 26, 2024

Thanks for reporting this - it is the first report of an issue with the framework update and 64-bit Excel.

Can you describe the simplest case that fails?
If you open the release version Distribution\ExcelDna64.xll (from the .zip file here: https://github.com/Excel-DNA/ExcelDna/releases/download/v0.33.9/ExcelDna-0.33.9.zip) and just run it, is there a problem?
Otherwise, what is the simplest function that fails?

You could check whether there is still some flag to go back to the old JIT compiler.
Perhaps this discussion is still valid: https://github.com/Microsoft/dotnet/blob/master/docs/testing-with-ryujit.md#disable-ryujit

The next step would be to get a VM set up with the failing versions and Visual Studio.
You can do that in some Remote Desktop-accessible machine, (AWS or Azure or your own) or I have to get something together.

from exceldna.

zmohamedfakier avatar zmohamedfakier commented on July 26, 2024

Just tested a clean build from 0.33.9.zip. The simple case is working (this is after doing some uninstalls and re-installs of the framework). Let me try the old JIT and see if there is anything there. Will try and get a simple case from failing again from the DNA samples.

from exceldna.

zmohamedfakier avatar zmohamedfakier commented on July 26, 2024

Some feedback.

Replicated the #NUM. This happens when debugging 64 bit. Seems like the functions do not register the parameter types correctly. When I remove the #if debug code from SetTypeInfo in XlParameterInfo.cs, all works. When compiling for Release all works as well.

Seems like it might be our code changes and some change in Framework Update 4.6.1.

from exceldna.

govert avatar govert commented on July 26, 2024

What is the signature of your function?
Do you mean to problem only occurs when debugging, or that some other bad thing happens when not debugging?

From: zmohamedfakier [mailto:[email protected]]
Sent: 8 February 2016 13:11
To: Excel-DNA/ExcelDna [email protected]
Cc: Govert van Drimmelen [email protected]
Subject: Re: [ExcelDna] Framework update 4.6.1 and Excel DNA (#59)

Some feedback.

Replicated the #NUM. This happens when debugging 64 bit. Seems like the functions do not register the parameter types correctly. When I remove the #if debug code from SetTypeInfo in XlParameterInfo.cs, all works. When compiling for Release all works as well.

Seems like it might be our code changes and some change in Framework Update 4.6.1.


Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-181311355.

from exceldna.

zmohamedfakier avatar zmohamedfakier commented on July 26, 2024

The issues of functions returning #NUM only happens when debugging. In release the function works correctly. I downloaded the zip file and compiled and ran (in debug) and thought something was wrong when I saw #NUM. This incorrectly led me to believe something was wrong with DNA interacting with framework 4.6.1. ie. This behaviour (while not nice for someone playing with DNA for the first time on 64bit excel) is not related to my issue.

As for my issue, I have isolated the issue to our code changes. We modified the CreateMethodDelegate() function to bypass execution when Excels function wizard or find/replace dialogs are open. This helps performance when our Analysts have sheets with thousands of calls. The previous IL code worked fine - up until the update.

Thanks for the quick responses. This can be closed.

from exceldna.

govert avatar govert commented on July 26, 2024

Can you explain the debug issue a bit - how would one encounter the #NUM under the debugger?

Thanks for the quick responses.

Cool - you can buy me a pizza when you're in Joburg some time ;-)

from exceldna.

zmohamedfakier avatar zmohamedfakier commented on July 26, 2024

Steps to reproduce: (Windows 7 64bit + Microsoft Office 2010 64bit)

  1. Extract distribution
  2. Open Source\ExcelDna.sln
  3. Set ExcelDNA to startup project
  4. Select x64 Platform
  5. Change Project Properties for debugging:
    5.1 Set Command to C:\Program Files\Microsoft Office\Office14\EXCEL.EXE
    5.2 Set Command Argument to "$(TargetPath)"
  6. Build
  7. Copy Distribution\ExcelDna64.dna to Source\ExcelDna\Debug64\ExcelDna64.dna
  8. Run
  9. In excel enter the formula =Addthem(1,2)
  10. The function returns #NUM!

from exceldna.

govert avatar govert commented on July 26, 2024

OK - so you mean you need to make a Debug build of Excel-DNA, not just run your own library under the debugger?

Under the debug build, Excel-DNA uses the pre-Excel 2007 marshaling. I guess there's some code there which does not work for 64-bit. For a release build, any 64-bit version of Excel will use the Excel 2007 marshaling, so should be OK?

An alternative to making your own build of Excel-DNA is to use the Registration helpers to create your own function wrappers, which add features like the function wizard detection.

from exceldna.

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.