After updating addin-express version, clients are getting (new) gdi errors related to i think word taskpanes

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

After updating addin-express version, clients are getting (new) gdi errors related to i think word taskpanes
 
Subscribe
Tim Smet




Posts: 49
Joined: 2015-10-06
Hi Andrei,

We updated our addin-express version to the latest version and recompiled our word addin, due to the taskpane problems that occured. However multiple clients and even some collegues now get different GDI+ errors realted to also i think word taskpanes. At least i see it going through taskpanes code.

The error also shows us a stack trace but it's not code we added to show this

The error happens on multiple ways when our addin is loaded
- just starting word from a shortcut
- opening file inside word
- opening a file from inside explorer.exe by double clicking a word file

with the clients affected if we replace our addin build against latest addin express version with the version where we were using an older addin express version (from about 2-3 years ago i think) the error does not happen



Exceptions:
============
coDcsWordAddIn error (TadxWDContainerPane2016.WndProc(F, 0, 0).): the add-in has fired an exception.
(GDI+ Error) One of the arguments passed to the method was not valid

System Info:
============
Time: 05/12/2024 18:12:56
Package: Unknown
ADX Version:10.1.1705
ADX Extensions Version 7.0.1210
Word version: 16.0

Log:
============
05/12/2024 18:13:01              10356 Show time: 05/12/2024 18:13:01
05/12/2024 18:12:59              10356 TadxWordTaskPanesCollectionItem.FindForm
05/12/2024 18:12:59              10356 TadxWordTaskPanesCollectionItem.SetAppWindowProperty
05/12/2024 18:12:59              10356 TadxWordTaskPanesManager.DoShowForm
05/12/2024 18:12:59              10356 TadxWordTaskPanesManager.DoShowForms
05/12/2024 18:12:59              10356 DoProcessActiveAPIWindow 1
05/12/2024 18:12:59              10356                TadxWordTaskPanesCollectionItem.DeleteFormsForNotVisibleHostHandle 1
05/12/2024 18:12:59              10356                TadxWordTaskPanesManager.DeleteFormsForNotVisibleHostHandle
05/12/2024 18:12:59              10356 TadxWordTaskPanesManager.DoProcessActiveAPIWindow
05/12/2024 18:12:59              10356 |-------------------------
05/12/2024 18:12:59              10356 |coDcsWordAddIn error (TadxWDContainerPane2016.WndProc(F, 0, 0).): the add-in has fired an exception.
(GDI+ Error) One of the arguments passed to the method was not valid
05/12/2024 18:12:59              10356 |Exception time: 05/12/2024 18:12:59
05/12/2024 18:12:59              10356 |=========================
05/12/2024 18:12:59              10356 
05/12/2024 18:12:59              10356 <<<<<<<<<<<<<<<< TCustomWindowMessage
05/12/2024 18:12:59              10356 after OnADXBeforeTaskPaneShow raising
05/12/2024 18:12:59              10356 raise OnADXBeforeTaskPaneShow
05/12/2024 18:12:59              10356 TadxWordTaskPane.AdxWdShow
05/12/2024 18:12:59              10356 TadxWordTaskPane.InitializeForm
05/12/2024 18:12:59              10356 TadxForm.Create: After inherited TForm.Create(AOwner)
05/12/2024 18:12:59              10356 TadxForm.Create: Before inherited TForm.Create(AOwner)
05/12/2024 18:12:59              10356 TadxWordTaskPane.CreateEx
05/12/2024 18:12:59              10356 TadxWordTaskPanesCollectionItem.CreateForm
05/12/2024 18:12:59              10356 TadxWordTaskPanesCollectionItem.GetForm
05/12/2024 18:12:59              10356 TadxWordTaskPanesCollectionItem.FindForm
05/12/2024 18:12:59              10356 TadxWordTaskPanesCollectionItem.SetAppWindowProperty
05/12/2024 18:12:59              10356 TadxWordTaskPanesManager.DoShowForm
05/12/2024 18:12:59              10356 TadxWordTaskPanesManager.DoShowForms
05/12/2024 18:12:59              10356 DoProcessActiveAPIWindow 1
05/12/2024 18:12:59              10356                TadxWordTaskPanesCollectionItem.DeleteFormsForNotVisibleHostHandle 0
05/12/2024 18:12:59              10356                TadxWordTaskPanesManager.DeleteFormsForNotVisibleHostHandle
05/12/2024 18:12:59              10356 TadxWordTaskPanesManager.DoProcessActiveAPIWindow
05/12/2024 18:12:59              10356 TadxWordTaskPanesManager.DoAddInStartupComplete
05/12/2024 18:12:59              10356 Event: OnAddInStartupComplete
05/12/2024 18:12:59              10356                TadxReceiverWindow.AddReceiverCustomMessage(TCustomWindowMessage)5
05/12/2024 18:12:59              10356                TadxReceiverWindow.AddReceiverCustomMessage(TCustomWindowMessage)4
05/12/2024 18:12:59              10356                TadxReceiverWindow.AddReceiverCustomMessage(TCustomWindowMessage)3
05/12/2024 18:12:59              10356                TadxReceiverWindow.AddReceiverCustomMessage(TMayBeViewWasChangedMessage)2
05/12/2024 18:12:59              10356 AddMayBeViewWasChangedMessageToReceiver
05/12/2024 18:12:59              10356                TadxReceiverWindow.AddReceiverCustomMessage(TRegionCloseButtonClickMessage)1
05/12/2024 18:12:59              10356 AddCloseButtonClickMessageToReceiver
05/12/2024 18:12:59              10356 TadxWordTaskPanesManager.DoAddInInitialize
05/12/2024 18:12:59              10356 Event: OnAddInInitialize
05/12/2024 18:12:56              10356 TadxWordTaskPanesCollectionItem.DeleteAllForms 0
05/12/2024 18:12:56              10356 TadxWordTaskPanesCollectionItem.SetFormClassName
05/12/2024 18:12:56              10356 TadxWordTaskPanesCollectionItem.FormsHideShow
05/12/2024 18:12:56              10356 TadxWordTaskPanesManager.Create


please advise
Posted 06 Dec, 2024 14:48:13 Top
Andrei Smolin


Add-in Express team


Posts: 19068
Joined: 2006-05-11
Hello Tim,

We don't reproduce this issue. What Word build are you using? Is it 32bit or 64bit? Will a new empty add-in project showing a TadxWordTaskPane in the same layout work or not?

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 09 Dec, 2024 11:56:24 Top
Tim Smet




Posts: 49
Joined: 2015-10-06
Hi Andrei,

We always run 32 bit versions of office and our addins, we are not capable of using 64 bit due to other reasons.

The collegue having the issue is running windows 11 enterprize

User added an image

and has this word versions, which is fairly new, i had to manually press update in word to get same version:

User added an image

I have the exact same version on a windows 10 pc en with me the issue does not occur, i do not know if all the clients reporting the errors are using windows 11 only or if other clients had the issue also on windows 10 pc's i do not have enough insights into that.

I also tried creating a small word addin project that does the same things as our "full" word addin, buyt since that project is rather big, it's hard to simulate exact specifcs as it relies on certain variables and so being present in word documents. I did try that version on my coworkers pc and it did not seem to produce an error but it is a very toned down version of the addin and probably it's not doing exactly the same things to trigger the error as our full addon. OR something changed in add in express'es code that made old code incompatible but that would be weird as we always build our addin dll against addin express sources directly
Posted 09 Dec, 2024 15:48:41 Top
Tim Smet




Posts: 49
Joined: 2015-10-06
hi Andrei,

It also seems to happen on older builds of word, but again this was a client with again windows 11, i asked our support to let me know if it are always users with windows 11 or not that repor the error but this version + windows 11 also has the issue :

User added an image
Posted 09 Dec, 2024 16:25:56 Top
Andrei Smolin


Add-in Express team


Posts: 19068
Joined: 2006-05-11
Hello Tim,

We would fix this if we could reproduce the issue. Currently, all our attempts end with nothing. If the issue is reproducible for you, could you please help us locate the issue, even in a rough, unconcreted direction?

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 10 Dec, 2024 12:04:02 Top
Tim Smet




Posts: 49
Joined: 2015-10-06
Hello Andrei,

I myself can not reproduce it on my development pc but i got a suspicision this is because i have a windows 10 development pc and not windows 11 but that's only a guess i'm not aware of a client having the issue with windows 10 just yet

Also doesn't the strack trace in my 1st post, which seems to be generated by code from addin express itself help you pinpoint more or less where the error happens ? From what i see in that stacktrace it's trying to set a window property "TadxWordTaskPanesCollectionItem.SetAppWindowProperty" and we do have minimize buttons disabled on the taskpane so maybe it's trying to set that and then it does a TadxWordTaskPanesCollectionItem.FindForm in that function it seems to get the error. But that's just based on the stack trace i provided on my initial post generated by code from addin express as far as i can tell and not something i personally withnessed on my own pc as i can not reproduce it on my own development pc.

We also hide / show the taskpane a lot in documentchange, documentnew, documentclose events based on a certain condition (availability of certain document variable) but i'm not sure this could cause it as well as said i can not reproduce it on my own development pc so i can not debug it. But it happens with a lot of our clients and at least one collegue (running windows 11 also)

it's gotten so bad with clients that are getting the error and calling support that we are reverting to an old word addin dll build against the old addin expres version. Its less anoying to have a taskpane not working than getting an error when starting up word or when opening documents and so
Posted 10 Dec, 2024 13:06:35 Top
Andrei Smolin


Add-in Express team


Posts: 19068
Joined: 2006-05-11
Hello Tim,

We can't reproduce this issue on a 32bit Word as well.

Tim Smet writes:
we always build our addin dll against addin express sources directly


The question is: do you update the source code of Add-in Express?

Tim Smet writes:
it's trying to set a window property "TadxWordTaskPanesCollectionItem.SetAppWindowProperty"


No-no-no. That our internal logics where some names are misleading.

Tim Smet writes:
i have a windows 10 development pc and not windows 11 but that's only a guess


We do not exclude this scenario: some components on your form may behave differently in Windows 10 and Windows 11. Still, this issue can originate from our code. The problem is: we can't reproduce the issue.

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 10 Dec, 2024 14:29:12 Top
Tim Smet




Posts: 49
Joined: 2015-10-06
he question is: do you update the source code of Add-in Express?


Yes we do, we always have been doing this the same way for each version ever since we started using it and put everything the installer installs on git, we had no issues at all doing it this way for years

No-no-no. That our internal logics where some names are misleading.

ok thats very misleading then but thats what happens if i only have your stack trace to go by and can't reproduce it on my development pc either

We do not exclude this scenario: some components on your form may behave differently in Windows 10 and Windows 11. Still, this issue can originate from our code.

i had another collegue that also had windows 11 and same version of word and the addin and the issue did not occur on his (dev) pc either yet with a lot of clients and some collegues (but no dev's) it does happen and using old addin express code it does not happen (by replacing the addin dll with previous version before we upgraded)

The problem is: we can't reproduce the issue.

Neither can i atm, we just have not identified de correct circumstance to make it happen doesn't mean there is no issue since it can't be reproduced if so many of our clients are having the issue and all we did was upgrade addin express (with the changes related to taskpanes). I'm still investigating and trying to reproduce
Posted 10 Dec, 2024 14:50:33 Top
Tim Smet




Posts: 49
Joined: 2015-10-06
Hi Andrei,

I got some more information but not sure if it will help... I remote debugged the pc of my collegue where the issue occurs so i got a "correct" stack trace and also the cause of failure (check top left in 1st screenshot).

Somehow on the pc of my collegue it gets a WM_PAINT message (i do not know where it originates from) and it pass through some function to draw a rounded rect eventually it will call TAdxGraphics.FillPath but the nativegraphics parameter is nil for some reason and i think that causes the gdi error.

also i'm not sure if it's relevant but the taskpane is hidden when this error occurs

User added an image

for some reason on my windows (10) pc that wm_paint does not seem to occur and i do not pass by the drawroundedrect function, i'm not sure how to explain that but maybe it's realted to the rounded windows on windows 11 ?

User added an image

User added an image

I am still not able to reproduce the issue on my pc however and i also have no clue where the wmpaint message originates from.

here is the full stack trace copied from delphi itself while remote debugging

:76d4b342 KERNELBASE.RaiseException + 0x62
adxGdiPAPI.TadxGPGraphics.FillPath($135C16B0,$135C1670)
adxWSbcls.TadxContainerPane.DrawRoundedRect($135C1658,(0, 0, -1, -1, (0, 0), (-1, -1)),8,4292138196,4294967295)
adxWSbcls.TadxWDContainerPane2016.DrawMainArea($135C1658,(0, 0, -1, -1, (0, 0), (-1, -1)))
adxWSbcls.TadxPanePartMain.Paint($135C1658)
adxWSbcls.TadxContainerPane.PaintBitmap(0,0)
adxWSbcls.TadxContainerPane.PaintTo(453060160,0,0)
adxWSbcls.TadxContainerPane.Paint
Vcl.Controls.TCustomControl.PaintWindow(1879126634)
Vcl.Controls.TWinControl.PaintHandler((15, (), 0, 0, 0))
Vcl.Controls.TWinControl.WMPaint((15, (), 0, 0, 0))
Vcl.Controls.TCustomControl.WMPaint((15, (), 0, 0, 0))
Vcl.Controls.TControl.WndProc((15, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
Vcl.Controls.TWinControl.WndProc((15, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
adxWSbcls.TadxTheme.WndProc((15, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
adxWSbcls.TadxContainerPane.WndProc((15, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
adxWSbcls.TadxWDContainerPane.WndProc((15, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
Vcl.Controls.TWinControl.MainWndProc((15, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
System.Classes.StdWndProc(2036376,15,0,0)
:75d432d3 ; C:WindowsSysWOW64USER32.dll
:75d340c6 ; C:WindowsSysWOW64USER32.dll
:75d33b4a ; C:WindowsSysWOW64USER32.dll
:75d3dabf USER32.GetPropW + 0xff
:77d6916d ntdll.KiUserCallbackDispatcher + 0x4d
:75d324d0 USER32.DispatchMessageW + 0x10
:5c5c05ee ; C:Program Files (x86)Microsoft Office
ootOffice16wwlib.dll
:5c5bbb3b ; C:Program Files (x86)Microsoft Office
ootOffice16wwlib.dll
:00051aa9 ; C:Program Files (x86)Microsoft Office
ootOffice16WINWORD.EXE
:0005114a ; C:Program Files (x86)Microsoft Office
ootOffice16WINWORD.EXE
:766c7ba9 KERNEL32.BaseThreadInitThunk + 0x19
:77d5c0cb ntdll.RtlInitializeExceptionChain + 0x6b
:77d5c04f ntdll.RtlClearBits + 0xbf
Posted 11 Dec, 2024 16:06:26 Top
Andrei Smolin


Add-in Express team


Posts: 19068
Joined: 2006-05-11
Hello Tim,

Thank you very much! That's create a ground for our next steps.

We would like to look into your changes of the Add-in Express code. Is this possible? Please send the changed code to support@add-in-express.com.

Note that the method that raises the exception is called when Add-in Express draws rounded corners which only occurs if Outlook build number > 17628.

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Dec, 2024 15:33:38 Top