![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | NET6 Creating a series without creating a chart causes program to crash | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | Edu <edu> |
| Component: | Series | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | --- | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
There's a workaround to solve this issue which is creating a TChart before creating any series. However, to offer another option, we've decided to make the Chart method "private void InitTypes()" public and static instead. This way, users can call the method like this: Steema.TeeChart.TChart.InitTypes(); So they can work with series without the need to create a Chart. There's a workaround to solve this issue which is creating a TChart before creating any series. However, to offer another option, we've decided to make the Chart method "private void InitTypes()" public and static instead. This way, users can call the method like this: Steema.TeeChart.TChart.InitTypes(); So they can work with series without the need to create a Chart. Commit: 1e13f4ace80b183c43e1565780b4f3f5a7f85595 [1e13f4a] |
It only happens with NET6. When creating a series without having created a chart previously, this crash happens: (Series.cs) public IChartBrush Brush { get; set; } = (IChartBrush)Activator.CreateInstance(ChartBrushType, null, Utils.EmptyColor, true); -- Exception Unhandled, 'Value cannot be null' because "ChartBrushType" is null. The way our code works is (NET6 only!!) When creating a Chart, the method private void InitTypes() is executed. Via that method, multiple Types get their value. If a series were to be created without having created a TChart first, those types would be null and therefore cause an unhandled exception.