OutOfMemoryException

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

OutOfMemoryException
 
Bobby M.




Posts: 21
Joined: 2015-11-09
Hi Add-in Express Team,

one of our users has installed our addin, but it seems that the addin does not work. When the user starts outlook
he gets the follwing exception:

Exception Source: System.Drawing
Exception Type: System.OutOfMemoryException
Exception Message: Out of memory.
Exception Target Site: FromHbitmap

---- Stack Trace ----
System.Drawing.Image.FromHbitmap(hbitmap As IntPtr, hpalette As IntPtr)
System.Drawing.dll: N 0041 (0x29) IL
System.Drawing.Image.FromHbitmap(hbitmap As IntPtr)
System.Drawing.dll: N 0010 (0xA) IL
System.Windows.Forms.ImageList.GetBitmap(index As Int32)
System.Drawing.dll: N 0130 (0x82) IL
System.Windows.Forms.ImageCollection.get_Item(index As Int32)
System.Drawing.dll: N 0063 (0x3F) IL
AddinExpress.MSO.ADXCommandBarButton.PutImage()
System.Drawing.dll: N 0438 (0x1B6) IL

We are using the following AddinExpress Versions:
Addin Express Regions for Outlook and VSTO,Professional 3.0.2407
Addin Express for Microsoft Office and .NET,Professional 8.0.4430


Can you help me diagnose the cause of this exception?
Posted 09 Sep, 2016 04:31:51 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Bobby,

What is the format of the image you use on that button?


Andrei Smolin
Add-in Express Team Leader
Posted 09 Sep, 2016 07:50:37 Top
Bobby M.




Posts: 21
Joined: 2015-11-09
Hey Andrei,
thanks for your fast answer.

we are using a .png file
I just added the png file into an imageList and then assigned that imageList to an ADXRibbonButton.

Here are some more information:
Name:06_AttachItemButton.png
PhysicalDimension:256;256
Pixelformat:Format32bppArgb
RawFormat:MemoryBmp
Size:256;256
VerticalResolution:96
HorizontalResolution:96
Posted 09 Sep, 2016 08:13:40 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Bobby,

Could you please send it to me for testing? You can find the support email address in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 09 Sep, 2016 08:23:18 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
In what version of Office does this occur? Is that Office properly updated?


Andrei Smolin
Add-in Express Team Leader
Posted 09 Sep, 2016 08:24:06 Top
Bobby M.




Posts: 21
Joined: 2015-11-09
The problem is, that this exception only occurs on that one pc. We cannot reproduce the exception on other pc's.
We are using Outlook 2016 and Windows 10.
Posted 09 Sep, 2016 09:02:48 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Thank you for sending me the image file.

Bobby M. writes:
We are using Outlook 2016 and Windows 10.


Does the customer use Outlook 2016?


Andrei Smolin
Add-in Express Team Leader
Posted 09 Sep, 2016 09:30:37 Top
Bobby M.




Posts: 21
Joined: 2015-11-09
Yes the customer uses Outlook 2016 and Windows 10.
Posted 09 Sep, 2016 09:35:10 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
You've sent me a .PNG with a different set of properties. Please send me the image that causes the issue. Also in your project, select the corresponding ImageList on the add-in module and send me a screenshot showing the Properties window.


Andrei Smolin
Add-in Express Team Leader
Posted 09 Sep, 2016 09:50:03 Top
Bobby M.




Posts: 21
Joined: 2015-11-09
Hi Andrei,

at first i want to thank you for your support.
We solved this problem. We used 64x64 png files, but we've set the corresponding ImageLists size as 256x256.
After I changed the imageLists size to 64x64 it worked.

thank you.
Posted 15 Sep, 2016 04:51:32 Top