Die Datenquelle ist ein selbst erzeugtes XML. In LL 21 gab es keine Probleme, aber nach einem Upgrade auf LL 22 kommt dieser Fehler:
Object reference not set to an instance of an object. at combit.ListLabel22.DataProviders.XmlTableRow.InitColumns(Boolean forStructureParsing)
at combit.ListLabel22.DataProviders.XmlTableRow.get_Columns()
at combit.ListLabel22.ElementBaseCollection.AddFromInterface(ITableRow value, String Prefix, AutoDefineElementHandler AutoDefineElements)
at combit.ListLabel22.ListLabel.DefineData(IDataProvider dataSource, ITableRow row, String prefix, Int32 level, Int32 recursionLevel)
at combit.ListLabel22.ListLabel.PassFirstRow(IDataProvider dataSource, ITable table)
at combit.ListLabel22.ListLabel.PassDataStructureFromRelationalDataSource(IDataProvider dataSource, Boolean forDesigner)
at combit.ListLabel22.ListLabel.DesignFromRelationalDataSource(IDataProvider dataSource, String designerTitle, LlProject projectType, String projectFile, Boolean showFileSelect)
at combit.ListLabel22.ListLabel.AutoDesign(String designerTitle, LlProject projectType, String projectFile, Boolean showFileSelect)
at combit.ListLabel22.ListLabel.Design(Object userData, IntPtr windowHandle, String designerTitle, LlProject projectType, String projectFile, Boolean showFileSelect)
at combit.ListLabel22.ListLabel.Design(LlProject projectType)
Ich habe das XML manuell verändert und manchmal funktioniert das Laden des XMLs (wenn ich manche Teile entferne). Ich habe aber noch keine Stelle identifiziern können, die das Verhalten nachweisbar beeinflusst.
Der Stacktrace im Debug-Log sieht ein wenig anders aus:
CXLL22 : 09:26:05.723 00001d40/00 6 [L04 EXT]: Inner Exception: IndexOutOfRangeException (Index was outside the bounds of the array.)
CXLL22 : 09:26:05.723 00001d40/00 7 [L04 EXT]: Stack Trace:
CXLL22 : 09:26:05.723 00001d40/00 8 [L04 EXT]: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
CXLL22 : 09:26:05.723 00001d40/00 9 [L04 EXT]: at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
CXLL22 : 09:26:05.723 00001d40/00 0 [L04 EXT]: at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner1 source, ParallelOptions parallelOptions, Action1 simpleBody, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
CXLL22 : 09:26:05.723 00001d40/00 1 [L04 EXT]: at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
CXLL22 : 09:26:05.723 00001d40/00 2 [L04 EXT]: at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, Action1 body)
CXLL22 : 09:26:05.723 00001d40/00 3 [L04 EXT]: at combit.ListLabel22.DataProviders.XmlDataProvider.CheckAddTableAndRelation(String tableName, XPathNavigator parentItem, String navigationId)
CXLL22 : 09:26:05.723 00001d40/00 4 [L04 EXT]: at combit.ListLabel22.DataProviders.XmlDataProvider.BuildDom(XPathNavigator item, XPathNavigator parentItem, String navigationId)
CXLL22 : 09:26:05.723 00001d40/00 5 [L04 EXT]: at combit.ListLabel22.DataProviders.XmlDataProvider.BuildDom(XPathNavigator item, XPathNavigator parentItem, String navigationId)
CXLL22 : 09:26:05.723 00001d40/00 6 [L04 EXT]: at combit.ListLabel22.DataProviders.XmlDataProvider.Init()
CXLL22 : 09:26:05.723 00001d40/00 7 [L04 EXT]: at combit.ListLabel22.DataProviders.XmlDataProvider.combit.ListLabel22.DataProviders.IDataProvider.get_Tables()
CXLL22 : 09:26:05.723 00001d40/00 8 [L04 EXT]: at combit.ListLabel22.ListLabel.PrintReportFromRelationalDataSourceNewMode(IDataProvider dataSource, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, IntPtr windowHandle, String dialogTitle, Boolean showPrintOptions, String tempPath)
CXLL22 : 09:26:05.723 00001d40/00 9 [L04 EXT]: at combit.ListLabel22.ListLabel.AutoPrint(LlProject projectType, String projectFile, Boolean showFileSelect, LlPrintMode printMode, LlBoxType boxType, IntPtr windowHandle, String dialogTitle, Boolean showPrintOptions, String tempPath)
;1000;21.09.2017 08:27:56.431;3;LL.Generic;90C;100:2=CMLL22:diamonds:101:1=2; WRN: This job is being used by a thread that is different from the thread that created it. This should be avoided, as a job is neither guaranteed to be threadsafe in itself (unless needed internally) nor are handles crossthreadsafe.