This project has moved. For the latest updates, please go here.

Ogama 4.5 crash (Failed to enable constraints)

Apr 12, 2015 at 6:38 PM
Hello!

First of all, thank you for the great software. However, I'm having some troubles with Ogama crashing quite often during recording. The error report looks like this:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.------------------------------------
Method name:EnableConstraints
Line: 0
Column: 0
Message: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Source: System.Data
TargetSite: Void EnableConstraints()
StackTrace:    kohteessa System.Data.DataTable.EnableConstraints()
   kohteessa System.Data.DataTable.set_EnforceConstraints(Boolean value)
   kohteessa System.Data.DataTable.EndLoadData()
   kohteessa Ogama.Modules.Common.Tools.Queries.SaveDataToTable(RawData[] lstRawData, RawdataDataTable 
)
I'm using Windows 7 (64bit) and an Eye Tribe tracker together with Ogama 4.5 (32bit).

The crash happens most often during browser slides, flash slides and desktop recording. It usually happens when the slideshow is changing from one slide to the next.

This is kind of urgent because I am using Ogama in my master's thesis and can't proceed until I get Ogama running properly. So any help is appreciated a lot!

Best regards,
Antti
Coordinator
Apr 15, 2015 at 7:24 PM
Hi Antti,
Failed to enable constraints. One or more rows contain values
violating non- null, unique, or foreign-key
constraints.------------------------------------
This error indicates an error in your raw data table relations.
Maybe ogama wants to write the raw data table but there is no subject or trial in the referring tables that the raw data may belong to cause of an foregoing error when writing data to the database.
This error isn´t easy to fix.
You should open the mdf database file with sql management studio express and find the broken relations.
See http://www.ogama.net/sites/default/files/pdf/OGAMA-DescriptionV25.pdf 1.3 Database Layout to understand the database structure.
But this doesn´t solve your problem in the future, cause once a new recording fails the error might be there again.

Do you have any idea what could cause the crash and is there anything
I could do to solve the problem? The crash happens most often during
browser slides, flash slides and desktop recording.
These three types are not recommended to be used for research studies, cause ogama was designed for slide show stimuli, not for dynamic content, so I don´t expect it to be bug free on this site.
I recommend to use a clean slide show design for your study, this will work without problems.

It usually happens when
the slideshow is changing from one slide to the next. It does not
happen every time, sometimes the recording finishes successfully.
That´s because the data is written to database whenever the slide changes.

However, it
crashes so frequently that I can not recruit real participants until I
get Ogama running properly.
Sure. And if this error occured once, it will occur over and over again, cause your database is corrupted. You have to create a new experiment with the same slideshow to get rid of it or use the sql management studio to find and fix the error.

If you have any idea what I could do to solve this, please let me
know. Any help is appreciated a lot!
Sorry. Think these are no good news for you.
I recommend to think about changing your study design in such a way that you don´t need browser slides, flash slides and desktop recording.

Here are my system specs:
Windows 7 Home Premium (64bit) Service Pack 1 Eye Tribe tracker Ogama
4.5.5259 (32bit) Microsoft .NET Framework (4.5.2) Microsoft SQL Server
2014 Express Local DB (I also have older versions installed, could
that be a
problem?) Microsoft Visual C++ 2010 (10.0.40219) Apple Bonjour
(3.0.0.10)
I recommend to downgrade to sql server 2012, but think that this is not the core problem.
Adrian