ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Crash in BaseChart method setOutputOptions
Posted by Ulrich Telle on Mar-10-2023 06:27
A user of my component wxChartDir (https://github.com/utelle/wxchartdir) reported an issue involving a call to the BaseChart method setOutputOptions (https://github.com/utelle/wxchartdir/issues/16) causing ocassionally crashes. The user wrote:

"I ran into an issue where the program would occasionally crash in the Render function with a read access violation error code. The problem seems to be in the underlying setOutputOptions ChartDirector function, which seems to have an overflow error when reading the input strings. In rare cases, this overflow results in a crash.
Adding a trailing semicolon to the input string to setOutputOptions avoids the overflow and crash. I only tested this for the case where dpi > 0; I do not know whether there is a similar overflow when only the alpha value is provided.
Issue occurred on win64 using the ChartDirector static library (chartdir70.lib), using MSVC. Have not tested on other platforms."

According to the ChartDirector documentation a trailing semicolon should not be necessary in the options string passed to setOutputOptions.

I have to admit that up to now I wasn't able to reproduce the problem myself. Nevertheless, I'd like to ask whether problems with method setOutputOptions are known.

BTW, the ChartDir libs and DLLs bundled with wxChartDir are the same as the latest available C++ release of ChartDir 7.

Regards,
Ulrich

  Re: Crash in BaseChart method setOutputOptions
Posted by Peter Kwan on Mar-12-2023 03:15
Hi Ulrich,

Thanks for reporting this issue to us. We have checked our code, and we think this is in fact a bug in ChartDirector. The trailing semi-colon can work around it. We will have to release an updated DLL to fix this issue.

Best Regards
Peter Kwan

  Re: Crash in BaseChart method setOutputOptions
Posted by Ulrich Telle on Mar-12-2023 19:27
Hi Peter,

thanks for checking ChartDirector's code. I will add a trailing semicolon for now as a workaround. I will then update later on to the new C++ version when it is available.

Regards,
Ulrich