SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

A surprise exception magically appeared

Last post 09-05-2017 8:40 PM by sbridewell. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-05-2017 6:09 AM

    A surprise exception magically appeared

    Greetings:

    I loaded #Develop, then opened a .sln file that I'd had open a few hours earlier. #Develop correctly loaded the solution and the 2 projects belonging to the solution. I opened the App.Config file and a Rules.cs class file in 1 of the projects. I then let everything sit untouched while I attended to other things. When I looked back at editor around 45 minutes later, an Unhandled Exception window appeared. I don't know what database the exception is referring to as none have been defined in the Project yet. Also, why would this type of exception be thrown in the source code editor? Details follow:

     

    SharpDevelop Version : 4.4.1.9729-7196a277
    .NET Version         : 4.0.30319.42000
    OS Version           : Microsoft Windows NT 6.2.9200.0
    Current culture      : English (United States) (en-US)
    Running under WOW6432, processor architecture: x86-64
    Working Set Memory   : 118368kb
    GC Heap Memory       : 22216kb

    Exception thrown:
    System.Data.SQLite.SQLiteException (0x80004005): The database file is locked
    database is locked
       at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
       at System.Data.SQLite.SQLiteDataReader.NextResult()
       at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
       at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
       at System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection connection, Boolean deferredLock)
       at System.Data.SQLite.SQLiteConnection.BeginDbTransaction(IsolationLevel isolationLevel)
       at System.Data.SQLite.SQLiteConnection.BeginTransaction()
       at ICSharpCode.UsageDataCollector.UsageDataSessionWriter.FlushOutstandingChanges()
       at ICSharpCode.UsageDataCollector.UsageDataSessionWriter.OnTimer(Object state)

    ---- Recent log messages:
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.Enum
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.Boolean
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.Int32
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.String
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.Array
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.Attribute
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.Type
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.Exception
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.AsyncCallback
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.IAsyncResult
    21:35:59.527 [1] WARN - SystemTypes.CreateFromName could not find System.IDisposable
    21:37:20.229 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll
    21:37:20.236 [LoadSolutionProjects] DEBUG - Loading PC for Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL
    21:37:20.239 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\TWT\FleetLINK\WEL\TemperatureAlerts\TempOORAlerts\packages\Newtonsoft.Json.10.0.3\lib et45\en\Newtonsoft.Json.xml
    21:37:20.239 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\TWT\FleetLINK\WEL\TemperatureAlerts\TempOORAlerts\packages\Newtonsoft.Json.10.0.3\lib et45\Newtonsoft.Json.xml
    21:37:10.721 [12] ERROR -
    --> Exception:
    System.Data.SQLite.SQLiteException (0x80004005): The database file is locked
    database is locked
       at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
       at System.Data.SQLite.SQLiteDataReader.NextResult()
       at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
       at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
       at System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection connection, Boolean deferredLock)
       at System.Data.SQLite.SQLiteConnection.BeginDbTransaction(IsolationLevel isolationLevel)
       at System.Data.SQLite.SQLiteConnection.BeginTransaction()
       at ICSharpCode.UsageDataCollector.UsageDataSessionWriter.FlushOutstandingChanges()
       at ICSharpCode.UsageDataCollector.UsageDataSessionWriter.OnTimer(Object state)
    21:37:20.239 [LoadSolutionProjects] DEBUG - Loading XmlDoc for C:\TWT\FleetLINK\WEL\TemperatureAlerts\TempOORAlerts\packages\Newtonsoft.Json.10.0.3\lib et45\Newtonsoft.Json.xml
    21:37:29.724 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\TWT\FleetLINK\WEL\TemperatureAlerts\TempOORAlerts\packages\Newtonsoft.Json.10.0.3\lib et45\Newtonsoft.Json.dll
    21:37:29.724 [LoadSolutionProjects] DEBUG - Loading PC for System.Configuration
    21:37:34.469 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\en\System.Configuration.xml
    21:37:34.470 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.xml
    21:37:34.470 [LoadSolutionProjects] DEBUG - Loading XmlDoc for C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.xml
    21:37:39.220 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.dll
    21:37:39.221 [LoadSolutionProjects] DEBUG - Loading PC for System.Core
    21:37:39.224 [12] WARN - Stack trace of last exception log:
       at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at ICSharpCode.Core.MessageService.ShowException(Exception ex, String message)
       at ICSharpCode.Core.MessageService.ShowException(Exception ex)
       at ICSharpCode.UsageDataCollector.UsageDataSessionWriter.OnTimer(Object state)
       at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.TimerQueueTimer.CallCallback()
       at System.Threading.TimerQueueTimer.Fire()
       at System.Threading.TimerQueue.FireNextTimers()
       at System.Threading.TimerQueue.AppDomainTimerCallback()

    ---- Post-error application state information:
    Installed 3rd party AddIns:
    Workbench.ActiveContent: --> Exception thrown by the state getter:
    System.InvalidOperationException: This operation can be called on the main thread only.
       at ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.AssertMainThread()
       at ICSharpCode.SharpDevelop.Gui.WpfWorkbench.get_ActiveContent()
       at ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.<InitializeWorkbench>b__0()
       at ICSharpCode.Core.ApplicationStateInfoService.GetCurrentApplicationStateInfo()
    ProjectService.OpenSolution: [Solution: FileName=C:\TWT\FleetLINK\WEL\TemperatureAlerts\TemperatureAlerts.sln, HasProjects=True, ReadOnly=False]
    ProjectService.CurrentProject: [CSharpProject: TempOORAlerts]

     

  • 09-05-2017 8:40 PM In reply to

    Re: A surprise exception magically appeared

    Delving into the source code at ICSharpCode.UsageDataCollector.UsageDataSessionWriter.FlushOutstandingChanges(), (project UsageDataCollector.csproj within the folder structure AddIns -> Misc -> UsageDataCollector), it looks like this is attempting to insert records into a SQLite database file called usageData.dat, which is used to record how often you use different features of SharpDevelop, which in turn allows the SharpDevelop development team to see which features are most popular. This file will most likely be in C:\Users\(your username)\AppData\Roaming\ICSharpCode\SharpDevelop5 (or maybe SharpDevelop4).

    What could be locking this file I don't know I'm afraid, I've never seen this particular exception before.

    If you're getting this exception a lot and it's annoying you, you could turn off usage data collection via the tools menu -> options -> general -> usage data collector (and you can also see there what data is being collected).

    Simon

     

     

Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.