Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008212opensim[GRID] Inventory Servicepublic2017-07-22 14:402017-07-24 05:45
ReporterGrumly57 
Assigned To 
PrioritynoneSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0008212: Exception in SQLiteXinventoryData.cs at IncrementFolderVersion method
DescriptionException occurs (undefined connection) in the SQLiteXinventoryData module in the IncrementFolderVersion method when running OpenSim in debug mode with full exception break.
Steps To ReproduceSome random inventory (folder ?) manipulation in the Viewer.
Additional InformationThe reason of the exception is quite obvious: no connections are defined for the SqliteCommand.

Fixed code:

using(SqliteCommand cmd = new SqliteCommand())
{
    cmd.CommandText = "update inventoryfolders set version=version+1 where folderID = ?folderID";
    cmd.Parameters.Add(new SqliteParameter(":folderID", folderID));

    if(ExecuteNonQuery(cmd, m_Connection) == 0)
        return false;
}

Existing code:

using (SqliteCommand cmd = new SqliteCommand())
{
    cmd.CommandText = "update inventoryfolders set version=version+1 where folderID = ?folderID";
    cmd.Parameters.Add(new SqliteParameter(":folderID", folderID));

    try
    {
        cmd.ExecuteNonQuery();
    }
    catch (Exception)
    {
        return false;
    }
}
TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region)
Physics EngineODE
Environment.NET / Windows64
Mono VersionNone
Viewer
Attached Files

- Relationships

-  Notes
(0032161)
UbitUmarov (administrator)
2017-07-22 15:34

changed master dev branch according to your suggestion. Thanks
(0032162)
Grumly57 (reporter)
2017-07-23 05:45

Oops, sorry I forgot the bad SQL fix: the ? has to be replaced by a : to comply with SQlite parameter prefixing.

so:

    cmd.CommandText = "update inventoryfolders set version=version+1 where folderID = :folderID";

instead of:

    cmd.CommandText = "update inventoryfolders set version=version+1 where folderID = ?folderID";
(0032163)
UbitUmarov (administrator)
2017-07-23 06:31

Ok on master, thx again

- Issue History
Date Modified Username Field Change
2017-07-22 14:40 Grumly57 New Issue
2017-07-22 15:34 UbitUmarov Note Added: 0032161
2017-07-23 05:45 Grumly57 Note Added: 0032162
2017-07-23 06:31 UbitUmarov Note Added: 0032163
2017-07-24 05:45 Grumly57 Status new => resolved
2017-07-24 05:45 Grumly57 Resolution open => fixed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker