Share

HeroStats

Tracker: Bugs

5 Constraint Exception Crash when opening Hero Options - ID: 1864938
Last Update: Comment added ( darren )

When playing City of Heroes tonight, I noticed that Hero Stats wasn't
showing my HP/End. I wasn't sure why so I went into Hero Options to check
if I'd unchecked it or something. When I did, I received a message like
the following:

System.Data.ConstraintException: Failed to enable constraints. One or more
rows contain values violating non-null, unique, or foreign-key
constraints.

I'm using HeroStats 3.8.9.0 on a WinXP Professional system.

Here is the full text from the Details tab of the crash dialog. I'm also
including the hsd file, HeroConfigurations.xml and HeroStatsConfig.xml.
I've blanked out my username and password for the websites. :)

I guess I'm not. It won't let me upload that large or a file. I can at
least attach the HeroStatsConfig.xml.

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

************** Exception Text **************
System.Data.ConstraintException: Failed to enable constraints. One or more
rows contain values violating non-null, unique, or foreign-key
constraints.
at System.Data.DataSet.FailedEnableConstraints()
at System.Data.DataSet.EnableConstraints()
at System.Data.DataSet.set_EnforceConstraints(Boolean value)
at System.Data.Merger.MergeDataSet(DataSet source)
at System.Data.DataSet.Merge(DataSet dataSet, Boolean preserveChanges,
MissingSchemaAction missingSchemaAction)
at System.Data.DataSet.Merge(DataSet dataSet)
at HeroStats.HeroConfigForm..ctor()
at HeroStats.MainForm.miViewOptions_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItem.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Command.DispatchID(Int32 id)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&
m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
HeroStats
Assembly Version: 3.8.9.0
Win32 Version: 3.8.9.0
CodeBase: file:///C:/Program%20Files/HeroStats/HeroStats.exe
----------------------------------------
CrashReport
Assembly Version: 3.8.9.0
Win32 Version: 3.8.9.0
CodeBase: file:///C:/Program%20Files/HeroStats/CrashReport.DLL
----------------------------------------
CityOfHeroesData
Assembly Version: 3.8.9.0
Win32 Version: 3.8.9.0
CodeBase: file:///C:/Program%20Files/HeroStats/CityOfHeroesData.DLL
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c56
1934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/Syste
m.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a
3a/System.Drawing.dll
----------------------------------------
StatsEngine
Assembly Version: 3.8.9.0
Win32 Version: 3.8.9.0
CodeBase: file:///C:/Program%20Files/HeroStats/StatsEngine.DLL
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/Sy
stem.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/S
ystem.Xml.dll
----------------------------------------
CityOfHeroes
Assembly Version: 3.8.9.0
Win32 Version: 3.8.9.0
CodeBase: file:///C:/Program%20Files/HeroStats/CityOfHeroes.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f
11d50a3a/System.Configuration.dll
----------------------------------------
HeroControls
Assembly Version: 3.8.9.0
Win32 Version: 3.8.9.0
CodeBase: file:///C:/Program%20Files/HeroStats/HeroControls.DLL
----------------------------------------
StatsData
Assembly Version: 3.8.9.0
Win32 Version: 3.8.9.0
CodeBase: file:///C:/Program%20Files/HeroStats/StatsData.DLL
----------------------------------------
ZedGraph
Assembly Version: 4.3.5.1214
Win32 Version: 4.3.5.1214
CodeBase: file:///C:/Program%20Files/HeroStats/ZedGraph.DLL
----------------------------------------
System.Web
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/Sys
tem.Web.dll
----------------------------------------
ProcessMemoryReader
Assembly Version: 3.8.9.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/HeroStats/ProcessMemoryReader.DLL
----------------------------------------
ICSharpCode.SharpZipLib
Assembly Version: 0.84.0.0
Win32 Version: 0.84.0.0
CodeBase:
file:///C:/Program%20Files/HeroStats/ICSharpCode.SharpZipLib.DLL
----------------------------------------
ReportPrinting
Assembly Version: 0.50.2905.20046
Win32 Version: 0.50.2905.20046
CodeBase: file:///C:/Program%20Files/HeroStats/ReportPrinting.DLL
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3
a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Darren Stalder ( darren ) - 2008-01-06 07:28

5

Closed

Wont Fix

Skip Franklin

HeroStats module

v3.9.x

Public


Comments ( 6 )

Date: 2008-01-08 04:09
Sender: darren


Okay. I just found out from my housemates that there was a power outage
and they restarted the computers. So, it was potential writing to the file
when the power went out.

Thanks for your help.


Date: 2008-01-06 23:57
Sender: ineffablebobProject Admin


Thanks for the info. Well, it's easy to tell why you're getting this error
- that file is horribly corrupted. It has timer/tab entries for
non-existent characters and the default tab settings are duplicated umpteen
times. What I don't know is how it got this way. In theory, it shouldn't be
possible to get to this point with the config file. The only thing I can
think of is that some unexpected error - a crash, Windows lockup, etc. -
caused the file writing to be interrupted at some point in the past, and
since then HeroStats has been slowly corrupting the file every time you
loaded it.

So, long story short, there's nothing in the code I can do with this.
Resetting the config file, like you've already done, is the best solution.
If it does happen again, let us know with another bug report. Anything you
can identify as out of the ordinary that happened will also help. Thanks!


Date: 2008-01-06 22:41
Sender: darren


It allowed me to attach the files now. I'll also attach the hsd file.
Ah. It needs to be less than 256K. Well, here is the
HeroConfigurations.xml

I did actually delete the configuration files and restart. That worked
fine. But it doesn't let you find out what went wrong.


Date: 2008-01-06 22:36
Sender: darren


File Added: HeroConfigurations.xml


Date: 2008-01-06 18:28
Sender: ineffablebobProject Admin


According to the error, this happened in the Hero Config form. The
HeroStatsConfig.xml file is for the main form, not the hero config form.
Can you attach just the HeroConfigurations.xml file? If it's too large, try
emailing it either to me directly or to the bugs list.


Date: 2008-01-06 12:51
Sender: ineffablebobProject Admin


I'll see if I can figure out what's causing it from the config file you
attached. Meanwhile, you can get around it by deleting the config files and
restarting. It's not the ideal solution since you'll have to re-enter your
config, but it's better than crashing.


Attached Files ( 2 )

Filename Description Download
HeroStatsConfig.xml HeroStatsConfig.xml Download
HeroConfigurations.xml HeroConfigurations.xml Download

Changes ( 6 )

Field Old Value Date By
status_id Open 2008-01-06 23:57 ineffablebob
resolution_id None 2008-01-06 23:57 ineffablebob
close_date - 2008-01-06 23:57 ineffablebob
File Added 261102: HeroConfigurations.xml 2008-01-06 22:36 darren
assigned_to msawczyn 2008-01-06 12:51 ineffablebob
File Added 261014: HeroStatsConfig.xml 2008-01-06 07:28 darren