PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Exception when generating pdfs with 1.50 beta3b
https://forum.pdfsharp.net/viewtopic.php?f=3&t=3386
Page 1 of 1

Author:  johnzered [ Fri Jul 01, 2016 9:49 am ]
Post subject:  Exception when generating pdfs with 1.50 beta3b

With 1.50 beta3b I sometimes get an System.ArgumentException: An item with the same key has already been added.
Unfortunately I cannot reproduce it, it just happens randomly in production from time to time.

Here's the stacktrace hopefully you can figure something out of this small peace of information:

Code:
   System.ArgumentException: An item with the same key has already been added.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at PdfSharp.Fonts.OpenType.GlyphTypefaceCache.AddGlyphTypeface(XGlyphTypeface glyphTypeface)
   at PdfSharp.Drawing.XGlyphTypeface.GetOrCreateFrom(String familyName, FontResolvingOptions fontResolvingOptions)
   at PdfSharp.Drawing.XFont.Initialize()
   at PdfSharp.Drawing.XFont..ctor(String familyName, Double emSize, XFontStyle style)

Author:  TH-Soft [ Tue Jul 05, 2016 7:33 am ]
Post subject:  Re: Exception when generating pdfs with 1.50 beta3b

Do you use multiple threads?

Could be a duplicate of this thread:
viewtopic.php?p=9816#p9816

If so, it should be fixed with the next release.

Author:  johnzered [ Mon Aug 01, 2016 11:53 am ]
Post subject:  Re: Exception when generating pdfs with 1.50 beta3b

TH-Soft wrote:
Do you use multiple threads?

Could be a duplicate of this thread:
viewtopic.php?p=9816#p9816

If so, it should be fixed with the next release.


It's a web application so I suppose it's using multiple threads, yes. Good to know you have a fix. Do you have any estimation when the next release will be out?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/