AccessViolationException when calling ADXExcelRef.ConvertToA1Style with Office x64

Add-in Express™ Support Service
That's what is more important than anything else

AccessViolationException when calling ADXExcelRef.ConvertToA1Style with Office x64
AccessViolationException when calling ADXExcelRef.ConvertToA1Style with Office x64 
Carlos Gravato


Guest


Hi,

I have a machine with Windows 7 (x64) and Office 2010 (x64) and when I call the method ConvertToA1Style I always get an AccessViolationException.

Here is a sample of the code I use:
AddinExpress.MSO.ADXXLLModule module = Context.Current.Addin.AddinInstanceAsADXXLLModule;

if (module != null)
{
AddinExpress.MSO.ADXExcelRef reference = (AddinExpress.MSO.ADXExcelRef)module.CallWorksheetFunction(AddinExpress.MSO.ADXExcelWorkseetFunction.Caller);

if (reference != null)
{
return reference.ConvertToA1Style();
}

return string.Empty;
}

I've tested it in another x64 machine like mine and it also occurrs. In a x86 machine it does not occur.
Can anyone help me find a way to deal with this?

Thanks
Posted 24 Jan, 2011 12:43:31 Top
Eugene Astafiev


Guest


Hi Carlos,

It looks like this is a bug.I have reproduced the issue you described above on my PC with Excel 2010 x64 and filed it in our bug-tracking system under #2375.

Thank you for pointing this to me!
Posted 25 Jan, 2011 04:53:04 Top
Carlos Gravato


Guest


Thanks Eugene.
Just one more question... Is there an expected date for the bug to be corrected?
I've tried looking if your bug-tracking system had any web access, in order to get that information about the bug, but I didn't find it.
Could you please tell me that information or where I can look for it?

Thanks
Posted 26 Jan, 2011 12:43:18 Top
Eugene Astafiev


Guest


Hi Carlos,

Unfortunately our bug-tracking system doesn't have a public interface. However, we are going to publish a new build in the middle of February, 2011. Please track the ID #2375 in the whatsnew.txt file.
Posted 27 Jan, 2011 07:13:57 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Carlos,

I investigated this issue. The fact is that ConvertToA1Style method uses the xlfReftext XLL worksheet function internally. The xlfReftext function turned out to be callable from commands and macro sheet functions only. You can find more information about xlfReftext in XLL API. If you perform the code above from a COM add-in, I can suggest using the ExecuteExcel4Macro method of the Excel object model to call an XLL macro function which in its turn calls the ConvertToA1Style method.
Posted 02 Feb, 2011 04:53:05 Top
Carlos Gravato


Guest


Hi Sergey,

Thanks for the sugestion, but unfortunately it doesn't apply to my project.
I got a bit confused with your post... Does that mean that it's not possible to fix the ConvertToA1Style bug, or was it simply a sugestion?
Posted 07 Feb, 2011 05:44:37 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Carlos.

There is not any bug in the ConvertToA1Style method. You just need to call it in the appropriate context.
Posted 07 Feb, 2011 05:49:21 Top
Carlos Gravato


Guest


Hi Sergey,

I understand why it has to be called in the appropriate context, but I'm having trouble understanding why the same code works with x86 Office and with x64 Office doesn't.
Is it a specific x64 issue, or it works on x86 by a fluke?

Sorry for asking so much questions but I need to understand why the problem happens, because I have to explain it to the ones that call the shots:).

Thanks
Posted 07 Feb, 2011 06:01:48 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Carlos.

Could you please send me a sample project with this issue? I will test it on my PC in Excel 32 and 64 bits.
Posted 07 Feb, 2011 12:54:51 Top
Carlos Gravato


Guest


Hi Sergey,

I created a sample demo project, and with the last available build, this issue seems to be solved. I'm currently doing some more tests in different environments to make sure this issue doesn't happen.

Since Eugene Astafiev could reproduce the issue I didn't test this much after.
Anyway, the sample project is at http://dl.dropbox.com/u/7497182/AddInTestProject2.zip if you want to take a look yourself. Just use the GetA1Style function in the Excel.

Thank you very much for your help
Posted 08 Feb, 2011 06:02:57 Top