stoneharry / WoW-Spell-Editor

A Spell Editor for WoW versions WOTLK 3.3.5, TBC 2.4.3, or Vanilla 1.12.1.
260 stars 119 forks source link

KeyNotFoundException #105

Closed rozalba-ng closed 2 years ago

rozalba-ng commented 4 years ago

Spell editor version Release Build v1.9.3, win10

Describe the bug Loading Spell.dbc for 3.3.5 crashes with KeyNotFoundException My spell.dbc contains more than 60000 rows (i tried with different sets of spells - never loaded more than 50000)

To Reproduce Steps to reproduce the behavior:

  1. Go to Import/export
  2. Click on import selected files (custom spell.dbc wich contain more than 50000 rows)
  3. Loading process starts normally and then stops with exception
  4. in database i can see only 50000 rows

Expected behavior Expect to load all the rows

Screenshots 6b1a50313c4278f657442127c1db0cf5

stoneharry commented 4 years ago

Can you upload your DBC files for me to test with please? I will not be able to reproduce this using the enUS Blizzlike ones.

I also noticed you are using ruRU client - make sure that all of the DBC files being used are for the ruRU client. Do not just add the ruRU spell.dbc while leaving the other DBC's default. See #55 for more details on this - the program does not support mixed locale dbc files.

rozalba-ng commented 4 years ago

Problem still present in Release Build v1.9.7

66afdaac9fc1fea75ffe8f67fc676197 a013863f90276373153bbf6ade88c32e

My_DBC_wotlk.zip

stoneharry commented 2 years ago

So this seems like a very corrupt DBC to me, but I managed to force it to load:

screenshot

Some of the string fields where pointing to string offsets that did not exist in the file. Instead of throwing an exception (which is what you were seeing) I have changed it to now return Unknown String: <offset>. The disadvantage of this approach is that it is silently failing - there is no easy way to see which strings have been modified. I can add logging to the debug_output.txt to highlight this.

There was errors in the spell visual DBCs where multiple rows existed with the same ID. The database enforces a primary key on the ID column, so it fails when importing.

stoneharry commented 2 years ago

v2.0.2 https://github.com/stoneharry/WoW-Spell-Editor/releases/tag/v2.0.2 might help with this.

stoneharry commented 2 years ago

v2.0.3 fixes this.