Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and Delete rows in Database #267

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gh3ttoKinG
Copy link

Implements Issue #130

Sometimes cells for "DialogResource" (TypeId = 11) have the TypeId = 5 (String) and sometimes the intended TypeId = 11, same goes for Characters (TypeId = 6).
This sometimes causes program to crash when entering the cell. This causes the program to crash when entering / editing the cell with wrong TypeId (unless story reloaded).
Presumably this is a bug from Larian Studio in BG3.
Workarounds:

  • Use typeId from first row, if database is not empty (implemented)
  • Create columns with typeId previously copied from another StorySave (implemented)
  • Save and reload the StorySave (implemented)

Might cause problems ingame because it possibly has a different typeId than intended.

Sometimes cells for "DialogResource" (TypeId = 11) have the TypeId = 5 (String) and sometimes the intended TypeId = 11, same goes for Characters (TypeId = 6).
This sometimes causes program to crash when entering the cell.
This causes the program to crash when entering / editing the cell with wrong TypeId (unless story reloaded)
Presumably this is a bug from Larian Studio in BG3.
Workarounds:
- Use typeId from first row, if database is not empty (implemented)
- Create columns with typeId previously copied from another StorySave (implemented)
- Save and reload the StorySave (implemented)
Might cause problems ingame because it possibly has a different typeId than intended.
@Gh3ttoKinG
Copy link
Author

Gh3ttoKinG commented Oct 6, 2024

With this version, with the following pattern in the clipboard you can manually set the cell/column type in an empty database:
actualTypeId {ColumnHeaderTypeName}
Example:
1 {INTEGER};5 {GUIDSTRING};1 {INTEGER}
1 = Integer
5 = String
8 = Guid-String
11 = Dialog-Resource

Example for the unhandled excpetion and crash of the debugger:
image
Used: 1 {INTEGER};8 {GUIDSTRING};1 {INTEGER} (intended according to column header)
Crash with: 1 {INTEGER};8 {GUIDSTRING};1 {INTEGER}
Works with: 1 {INTEGER};5 {STRING};1 {INTEGER}

Details of unhandled exception:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index -1 does not have a value.
   at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
   at System.Windows.Forms.DataGridView.DataGridViewDataConnection.OnRowEnter(DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridView.OnRowEnter(DataGridViewCell& dataGridViewCell, Int32 columnIndex, Int32 rowIndex, Boolean canCreateNewRow, Boolean validationFailureOccurred)
   at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick)
   at System.Windows.Forms.DataGridView.OnCellMouseDown(HitTestInfo hti, Boolean isShiftDown, Boolean isControlDown)
   at System.Windows.Forms.DataGridView.OnCellMouseDown(DataGridViewCellMouseEventArgs e)
   at System.Windows.Forms.DataGridView.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.DataGridView.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)


************** Loaded Assemblies **************
System.Private.CoreLib
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Private.CoreLib.dll
----------------------------------------
ConverterApp
    Assembly Version: 0.0.0.0
    Location: P:\Projects\Repos\Norbyte.LSLib\ConverterApp\bin\Debug\net8.0-windows\ConverterApp.dll
----------------------------------------
System.Runtime
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Runtime.dll
----------------------------------------
System.Threading.Thread
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Threading.Thread.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.8\System.Windows.Forms.dll
----------------------------------------
System.ComponentModel.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.ComponentModel.Primitives.dll
----------------------------------------
System.Windows.Forms.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.8\System.Windows.Forms.Primitives.dll
----------------------------------------
System.Drawing.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Drawing.Primitives.dll
----------------------------------------
System.Collections.Specialized
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Collections.Specialized.dll
----------------------------------------
System.Runtime.InteropServices
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Runtime.InteropServices.dll
----------------------------------------
System.Threading
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Threading.dll
----------------------------------------
System.Diagnostics.TraceSource
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Diagnostics.TraceSource.dll
----------------------------------------
System.Collections
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Collections.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 13.0.0.0
    Location: P:\Projects\Repos\Norbyte.LSLib\ConverterApp\bin\Debug\net8.0-windows\Newtonsoft.Json.dll
----------------------------------------
System.Runtime.Serialization.Formatters
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Runtime.Serialization.Formatters.dll
----------------------------------------
System.ObjectModel
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.ObjectModel.dll
----------------------------------------
LSLib
    Assembly Version: 0.0.0.0
    Location: P:\Projects\Repos\Norbyte.LSLib\ConverterApp\bin\Debug\net8.0-windows\LSLib.dll
----------------------------------------
System.Drawing.Common
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.8\System.Drawing.Common.dll
----------------------------------------
Microsoft.Win32.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\Microsoft.Win32.Primitives.dll
----------------------------------------
System.ComponentModel.EventBasedAsync
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.ComponentModel.EventBasedAsync.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.8\Accessibility.dll
----------------------------------------
System.ComponentModel.TypeConverter
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.ComponentModel.TypeConverter.dll
----------------------------------------
System.Numerics.Vectors
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Numerics.Vectors.dll
----------------------------------------
System.Memory
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Memory.dll
----------------------------------------
Microsoft.Win32.SystemEvents
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.8\Microsoft.Win32.SystemEvents.dll
----------------------------------------
System.ComponentModel
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.ComponentModel.dll
----------------------------------------
System.Collections.Concurrent
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Collections.Concurrent.dll
----------------------------------------
System.Linq.Expressions
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Linq.Expressions.dll
----------------------------------------
System.Runtime.Numerics
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Runtime.Numerics.dll
----------------------------------------
System.Private.Uri
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Private.Uri.dll
----------------------------------------
System.Linq
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Linq.dll
----------------------------------------
System.Runtime.Serialization.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Runtime.Serialization.Primitives.dll
----------------------------------------
System.Data.Common
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Data.Common.dll
----------------------------------------
System.Xml.ReaderWriter
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Xml.ReaderWriter.dll
----------------------------------------
System.Private.Xml
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Private.Xml.dll
----------------------------------------
System.Reflection.Emit.ILGeneration
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Reflection.Emit.ILGeneration.dll
----------------------------------------
System.Reflection.Emit.Lightweight
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Reflection.Emit.Lightweight.dll
----------------------------------------
System.Reflection.Primitives
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Reflection.Primitives.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Location: 
----------------------------------------
System.Runtime.Loader
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Runtime.Loader.dll
----------------------------------------
System.Collections.NonGeneric
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Collections.NonGeneric.dll
----------------------------------------
System.IO.MemoryMappedFiles
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.IO.MemoryMappedFiles.dll
----------------------------------------
System.IO.Compression
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.IO.Compression.dll
----------------------------------------
ZstdSharp
    Assembly Version: 0.7.4.0
    Location: P:\Projects\Repos\Norbyte.LSLib\ConverterApp\bin\Debug\net8.0-windows\ZstdSharp.dll
----------------------------------------
LZ4
    Assembly Version: 1.0.0.0
    Location: P:\Projects\Repos\Norbyte.LSLib\ConverterApp\bin\Debug\net8.0-windows\LZ4.dll
----------------------------------------
LSLibNative
    Assembly Version: 1.0.9045.26831
    Location: P:\Projects\Repos\Norbyte.LSLib\ConverterApp\bin\Debug\net8.0-windows\LSLibNative.dll
----------------------------------------
mscorlib
    Assembly Version: 4.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\mscorlib.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.dll
----------------------------------------
System.Text.Encoding
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Text.Encoding.dll
----------------------------------------
LZ4pn
    Assembly Version: 1.0.0.0
    Location: P:\Projects\Repos\Norbyte.LSLib\ConverterApp\bin\Debug\net8.0-windows\LZ4pn.dll
----------------------------------------
System.Runtime.Intrinsics
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Runtime.Intrinsics.dll
----------------------------------------
System.Threading.ThreadPool
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Threading.ThreadPool.dll
----------------------------------------
System.Diagnostics.StackTrace
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Diagnostics.StackTrace.dll
----------------------------------------
System.Reflection.Metadata
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Reflection.Metadata.dll
----------------------------------------
System.Collections.Immutable
    Assembly Version: 8.0.0.0
    Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Collections.Immutable.dll
----------------------------------------

************** JIT Debugging **************

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant