I observed some crashes when using wxPdfDoc from multiple threads simultaneously and importing pdf files as templates.
Being able to trace the problem down to wxPdfTokenizer::NextToken(), I found a static wxString buffer there which is obviously not thread-safe. As the buffer is always cleared when entering the function, I see no reason why it should be static. Since I made it non-static, I didn't observe any more crashes.
@Ulrich Telle: Could you please have a look at this?
Thanks in advance
Dieter Schmeer
wxPdfDoc - Crash in wxPdfTokenizer
Re: wxPdfDoc - Crash in wxPdfTokenizer
Thanks for reporting this issue.dschmeer wrote:I observed some crashes when using wxPdfDoc from multiple threads simultaneously and importing pdf files as templates.
No idea why I made that buffer static. I removed the static attribute and committed the change to the wxPdfDocument github repository.dschmeer wrote:Being able to trace the problem down to wxPdfTokenizer::NextToken(), I found a static wxString buffer there which is obviously not thread-safe. As the buffer is always cleared when entering the function, I see no reason why it should be static. Since I made it non-static, I didn't observe any more crashes.
@Ulrich Telle: Could you please have a look at this?
Regards,
Ulrich