Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

InvalidOperationException when creating event handler (ServiceOutputEventHandler)

$
0
0

Source:

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;
using FirebirdSql.Data.FirebirdClient;
using FirebirdSql.Data.Services;

...

voidRunBackup(string b_usr, string b_psw, string b_dbf, string b_fname)

{
            FbConnectionStringBuilder cs = newFbConnectionStringBuilder();

            cs.UserID = b_usr;
            cs.Password = b_psw;
            cs.Database = b_dbf;
            
            FbBackup backupSvc = newFbBackup();

            backupSvc.ConnectionString = cs.ToString();
            backupSvc.BackupFiles.Add(newFbBackupFile(b_fname, 2048));
            backupSvc.Verbose = true;

            backupSvc.Options = FbBackupFlags.IgnoreLimbo;

            backupSvc.ServiceOutput += new ServiceOutputEventHandler(ServiceOutput);

            backupSvc.Execute();
        }

 

Exception:

SharpDevelop Version : 5.1.0.5071-Beta 2-5f965cb9
.NET Version         : 4.5.50938
OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture      : Hungarian (Hungary) (hu-HU)
Running under WOW6432, processor architecture: x86-64
Working Set Memory   : 203480kb
GC Heap Memory       : 85813kb

Exception thrown:
System.InvalidOperationException: A sorozat egynél több elemet tartalmaz. (The range consists ofmore than oneitem.)
   a következő helyen: System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   a következő helyen: Debugger.Value.GetFieldValue(String name)
   a következő helyen: ICSharpCode.SharpDevelop.Services.WindowsDebugger.debuggedProcess_DebuggingPaused(Object sender, DebuggerPausedEventArgs e)
   a következő helyen: Debugger.Process.OnPaused(DebuggerPausedEventArgs e)
   a következő helyen: Debugger.ManagedCallback.<>c__DisplayClass1.<ExitCallback>b__0()
   a következő helyen: Debugger.MTA2STA.<>c__DisplayClass4.<EnqueueCall>b__1()
   a következő helyen: Debugger.MTA2STA.PerformCall()
   a következő helyen: Debugger.MTA2STA.PerformAllCalls()
   a következő helyen: System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   a következő helyen: System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   a következő helyen: System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   a következő helyen: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   a következő helyen: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   a következő helyen: System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   a következő helyen: System.Windows.Forms.Control.InvokeMarshaledCallbacks()

---- Recent log messages:
10:50:49.967 [1] DEBUG - Update Foldings
10:50:50.008 [12] DEBUG - Resolved (Line 102, Col 16) to [ResolveResult System.Void]
10:50:50.018 [6] DEBUG - Resolved (Line 1018, Col 1) to
10:50:50.018 [10] DEBUG - Resolved (Line 23, Col 3) to
10:50:50.018 [6] DEBUG - Resolved (Line 15, Col 33) to
10:50:50.032 [1] DEBUG - ParseInformationUpdated C:\Develop\Tangible_Assets\Rutins.cs (updated)
10:50:50.042 [1] DEBUG - ParseInformationUpdated C:\Develop\Tangible_Assets\MainForm.cs (updated)
10:50:50.042 [1] DEBUG - ParseInformationUpdated C:\Develop\Tangible_Assets\Alapadat.cs (updated)
10:50:50.042 [1] DEBUG - ParseInformationUpdated C:\Develop\Tangible_Assets\Form1.cs (updated)
10:50:50.182 [21] DEBUG - Resolved (Line 90, Col 11) to
10:50:50.182 [21] DEBUG - Resolved (Line 29, Col 23) to [TypeResolveResult FirebirdSql.Data.FirebirdClient.FbConnection]
10:50:50.182 [18] DEBUG - Resolved (Line 65, Col 1) to [ResolveResult System.Void]
10:50:50.182 [1] DEBUG - Update Foldings
10:50:50.182 [21] DEBUG - Resolved (Line 110, Col 14) to [MemberResolveResult [Property System.Windows.Forms.DataGridViewColumn.HeaderText]]
10:50:50.182 [1] DEBUG - Update Foldings
10:50:50.182 [1] DEBUG - Update Foldings
10:50:50.182 [1] DEBUG - Update Foldings
10:50:59.228 [7] DEBUG - Telling worker process to exit
10:50:59.228 [7] DEBUG - Waiting for thread-join
10:50:59.228 [15] DEBUG - Cannot read from WorkerProcess 4576: end of stream
10:50:59.228 [15] DEBUG - Stopped reading from WorkerProcess 4576.
10:50:59.228 [15] DEBUG - Telling worker process to exit
10:50:59.228 [15] DEBUG - End of reader thread on WorkerProcess 4576.
10:50:59.228 [7] DEBUG - Joined!
10:51:05.864 [1] ERROR - ThreadException caught
--> Exception:
System.InvalidOperationException: A sorozat egynél több elemet tartalmaz. (The range consists ofmore than oneitem.)
   a következő helyen: System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   a következő helyen: Debugger.Value.GetFieldValue(String name)
   a következő helyen: ICSharpCode.SharpDevelop.Services.WindowsDebugger.debuggedProcess_DebuggingPaused(Object sender, DebuggerPausedEventArgs e)
   a következő helyen: Debugger.Process.OnPaused(DebuggerPausedEventArgs e)
   a következő helyen: Debugger.ManagedCallback.<>c__DisplayClass1.<ExitCallback>b__0()
   a következő helyen: Debugger.MTA2STA.<>c__DisplayClass4.<EnqueueCall>b__1()
   a következő helyen: Debugger.MTA2STA.PerformCall()
   a következő helyen: Debugger.MTA2STA.PerformAllCalls()
   a következő helyen: System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   a következő helyen: System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   a következő helyen: System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   a következő helyen: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   a következő helyen: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   a következő helyen: System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   a következő helyen: System.Windows.Forms.Control.InvokeMarshaledCallbacks()

---- Post-error application state information:
Installed 3rd party AddIns:
ProjectService.CurrentSolution: [Solution C:\Develop\Tangible_Assets\Tangible_Assets.sln with 1 projects]
ProjectService.CurrentProject: [CSharpProject: Tangible_Assets]
Workbench.ActiveContent: [AvalonEditViewContent C:\Develop\Tangible_Assets\Backup.cs]

 


Viewing all articles
Browse latest Browse all 1764

Trending Articles