Changing the Office theme color throw an exception in debug mode

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

Changing the Office theme color throw an exception in debug mode
 
Xavier N


Guest


Hello,
It seems that changing the Office theme color (in the UI>Acount/options..) throw a System.NullReferenceException exception in debug mode in an unknown Module.(No error message in release mode)
Don't know if you can reproduce the issue..
Regards. Xavier
Posted 24 Nov, 2015 10:51:08 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Xavier,

You can comment out all your code to find out if the issue is reproducible on an add-in with no code.

On what version of what Office application do you see this?


Andrei Smolin
Add-in Express Team Leader
Posted 25 Nov, 2015 03:45:10 Top
Xavier N


Guest


Hello Andrei,
I had difficulty to reproduce the bug now. When i send the post yesterday it happened on my addin and then on the ADX sample DPINotResize Addin many times.
Now it sometimes arrive on my addin (not always ! and not always when a taskpane is open) but anyway always on the ADX sample DPINotResize.
If you want to try to reproduce the bug you can use the DPINotResize sample (http://temp.add-in-express.com/support/DPINotResize.zip). On my side, i updated the .Net framework used to 4.6 for this sample and updated the adxloader to the latest version. Then once the addin is loaded in debug mode (the DPINotResize TP is visible), use the Excel (2016) File > Account > Change theme.. It automatically raise the exception. Maybe you need to change the Theme and restart it once i'm wondering..
NB: the DPINotResize ModuleAddin designer seems to be in instable as it display an error message...
But anyway the message was the same for my addin and for DPINotResize : System.NullReferenceException exception in an unknown Module..
This occurs on Excel 2016. Not tried on an other Excel version...
Regards. Xavier
Posted 25 Nov, 2015 05:55:00 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
I've reproduced this. We've started investigating the issue. Thank you for pointing us to it!


Andrei Smolin
Add-in Express Team Leader
Posted 25 Nov, 2015 06:35:05 Top
Xavier N


Guest


Hello Andrei,

In a past post (Office Theme support, https://www.add-in-express.com/forum/read.php?FID=5&TID=11282&MID=57539#message57539) you said :

You need to use the ADXAddinModule.OfficeColorSchemeChanged event. It occurs when the add-in starts as well as when the color scheme is changed.


It seems the AddinModule Event OfficeColorSchemeChanged is not raised at start up at least on Excel, Word 2016 (but it's correcty handed when the Office theme is then mannualy changed in the UI)- not tested on previous Office version...

Can you reproduce this ? (we need the theme information at startup to manage taskpanes Theme color...)

Maybe this trouble can also be related to the problem discussed at the beginning of this post..

(Thanks for your last answer and post on MSDN on the Office crash at closing - hope Microsoft will solve it..)

Regards. Xavier
Posted 26 Nov, 2015 10:32:44 Top
Xavier N


Guest


Hello Andrei,

My last post is partially useless. At the time i wrote it I didn't know the existence of the OfficeColorScheme property of ModuleAddin and i was trying to get the theme used from the OfficeColorSchemeChanged event. So don't consider it as i can get the information.

Regards. Xavier
Posted 30 Nov, 2015 02:40:45 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Thank you Xavier.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Nov, 2015 06:25:19 Top