Skip to content
This repository has been archived by the owner on May 28, 2018. It is now read-only.

problems with reading #5

Closed
soulfrost opened this issue May 15, 2018 · 12 comments
Closed

problems with reading #5

soulfrost opened this issue May 15, 2018 · 12 comments

Comments

@soulfrost
Copy link

soulfrost commented May 15, 2018

File name                           LoadTime             Record count
---------------------------------------------------------------------
Difficulty                        00:00:00.0295287             22
Faction                           00:00:00.0075067             601
Achievement                       00:00:00.0395472             5378
FactionTemplate                   00:00:00.0025118             1398
Item                              00:00:00.0297584             122686
DBC loaded in 00:00:00.118.

Необработанное исключение: System.AggregateException: Произошла одна или несколько ошибок. ---> System.Reflection.TargetInvocationException: Адресат вызова создал исключение. ---> System.IO.EndOfStreamException: Чтение после конца потока невозможно.
   в System.IO.__Error.EndOfFile()
   в System.IO.BinaryReader.ReadByte()
   в DBFilesClient.NET.Reader`1.ReadInlineString()
   в DBFilesClient.NET.Reader`1.ReadTableString()
   в DBFilesClient.NET.WDB5.Reader`1.ReadTableString()
   в lambda_method(Closure , Reader`1 )
   в DBFilesClient.NET.WDB6.Reader`1.LoadRecord(Int64 recordPosition, Int32 key, Boolean forceKey)
   в DBFilesClient.NET.WDB5.Reader`1.LoadRecords()
   в DBFilesClient.NET.Reader`1.Load()
   в DBFilesClient.NET.Storage`1.FromStream(Stream dataStream)
   в DBFilesClient.NET.Storage`1..ctor(String fileName, Boolean readOnly)
   --- Конец трассировки внутреннего стека исключений ---
   в System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   в System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   в System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   в System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   в System.Activator.CreateInstance(Type type, Object[] args)
   в WowPacketParser.DBC.DBC.<>c.<Load>b__22_0(Type type) в C:\F\WPP_LEGION\WowPacketParser\DBC\DBC.cs:строка 69
   в System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   в System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   в System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
   --- Конец трассировки внутреннего стека исключений ---
   в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   в System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   в System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   в System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   в System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
   в WowPacketParser.DBC.DBC.<Load>d__22.MoveNext() в C:\F\WPP_LEGION\WowPacketParser\DBC\DBC.cs:строка 80
--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
   в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   в System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   в System.Threading.ThreadPoolWorkQueue.Dispatch()

C:\F\WPP_LEGION\WowPacketParser\bin\Debug>pause
@soulfrost
Copy link
Author

@Warpten any ideas why this happens? db2 from 7.3.5, stuctures right

@Warpten
Copy link
Owner

Warpten commented May 15, 2018

What's the file signature? I'm currently rewriting the entire library under a new namespace. Judging by your error you structure is wrong as it appears to be reading an int32 as a string offset into the stringtable, but that ends up being outside the file, either because a) this file does not have a string table or b) your structure is wrong.

@soulfrost
Copy link
Author

library supporting db2 format from 7.3.5 ( 26365 ) ?

@Warpten
Copy link
Owner

Warpten commented May 15, 2018

if it's not supported, an exception is thrown.

@soulfrost
Copy link
Author

okay, lets me check structure again

@soulfrost
Copy link
Author

@Warpten trying to parse with fresh compiled clean TC wpp, 7.3.5.26365 db2 files,

namespace WowPacketParser.DBC.Structures
{
    [DBFile("Achievement")]

    public sealed class AchievementEntry
    {
        public string Title;
        public string Description;
        public string Reward;
        public uint Flags;
        public short InstanceID;
        public ushort Supercedes;
        public ushort Category;
        public ushort UIOrder;
        public ushort SharesCriteria;
        public sbyte Faction;
        public byte Points;
        public byte MinimumCriteria;
        public uint ID;
        public uint IconFileDataID;
        public uint CriteriaTree;
    }
}

and got this

InvocationException: Адресат вызова создал исключение. ---> System.InvalidOperationException: Structure AchievementEntry is missing properties (0 found, 15 expected).
   в DBFilesClient.NET.Reader`1.GenerateRecordLoader()
   в DBFilesClient.NET.WDB6.Reader`1.GenerateRecordLoader()
   в DBFilesClient.NET.Reader`1.Load()
   в DBFilesClient.NET.Storage`1.FromStream(Stream dataStream)
   в DBFilesClient.NET.Storage`1..ctor(String fileName, Boolean readOnly)

DBFilesClient.NET.dll version 1.2.0 - latest update from nuget

@Warpten
Copy link
Owner

Warpten commented May 15, 2018

Properties, not fields

@soulfrost
Copy link
Author

@Warpten still cant solve that issue... can did u help me and say how to fix that problem with properties?

@Warpten
Copy link
Owner

Warpten commented May 17, 2018

@soulfrost
Copy link
Author

image
problem in signature, isnt it ?

@Pveska
Copy link

Pveska commented May 27, 2018

Same problem. Any progress with this issue?

@Warpten
Copy link
Owner

Warpten commented May 28, 2018

‼️ Support for DBFilesClient.NET has been discontinued. For an up-to-date libary, see DBClientFiles.NET.

@Warpten Warpten closed this as completed May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants