Error system reflection targetinvocationexception playlist finder

IDE: Visual Studio 2008

IDE: Visual Studio 2008

OS: Vista Home Premium

Developer Level: Intermediate

I’m writing a home automation speech recognition application, and just today I started receiving the following error:

System.Reflection.TargetInvocationException was unhandled
  Message=»Exception has been thrown by the target of an invocation.»
  Source=»mscorlib»
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       at System.Windows.Forms.Control.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at Enotek.Trinity.FormMain.Main() in C:UsersJasonDocumentsVisual Studio 2008ProjectsTrinityTrinityFormMain.cs:line 21
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Reflection.TargetInvocationException
       Message=»Exception has been thrown by the target of an invocation.»
       Source=»mscorlib»
       StackTrace:
            at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
            at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
            at System.Delegate.DynamicInvokeImpl(Object[] args)
            at System.Speech.Internal.AsyncSerializedWorker.WorkerProc(Object ignored)
       InnerException: System.InvalidOperationException
            Message=»Cannot perform this operation while the recognizer is doing recognition.»
            Source=»System.Speech»
            StackTrace:
                 at System.Speech.Recognition.RecognizerBase.RecognizeAsync(RecognizeMode mode)
                 at System.Speech.Recognition.SpeechRecognitionEngine.RecognizeAsync(RecognizeMode mode)
                 at Enotek.Trinity.SVREngine.ResumeListening() in C:UsersJasonDocumentsVisual Studio 2008ProjectsTrinityTrinitySVREngine.cs:line 279
                 at Enotek.Trinity.SVREngine.SpeechRecoEngine_SpeechRecognized(Object sender, SpeechRecognizedEventArgs e) in C:UsersJasonDocumentsVisual Studio 2008ProjectsTrinityTrinitySVREngine.cs:line 237
                 at System.Speech.Recognition.SpeechRecognitionEngine.SpeechRecognizedProxy(Object sender, SpeechRecognizedEventArgs e)
            InnerException:

Code Snippet

[STAThread]

static void Main()

{


Application.EnableVisualStyles();


Application.SetCompatibleTextRenderingDefault(false);


Application.Run(new FormMain()); // This is where the error is being thrown

}

I’ve figured out the following code is what is causing the error:

Code Snippet


private void ResumeListening()

{


SetStatus(«Listening…»);


// Just to make sure the engine is not running

_speechRecoEngine.RecognizeAsyncCancel();


// This line is where the error is being thrown


_speechRecoEngine.RecognizeAsync(RecognizeMode.Multiple);


_isListening = true;

}

For some reason it keeps telling me «Cannot perform this operation while the recognizer is doing recognition».

Can anyone help? I’m so lost right now.. Been trying to figure this out for about 18 hours total now.

Please let me know if you need any more info to help me troubleshoot. All help is appreciated!

  • Remove From My Forums
  • Вопрос

  • Hi,

    The error message shown below appeared when I setup a new syslog collection rule (to a new management pack) by following the instructions on this web page…

    http://support.microsoft.com/kb/942863

    Can anyone explain what this is trying to tell me?  When I closed the message the console «stopped working» according to Vista and was shut down.

    Thanks in advance.

    -lehmans-sysadmin

    Date: 6/18/2008 9:25:33 AM
    Application: System Center Essentials
    Application Version: 6.0.1885.0
    Severity: Error
    Message:

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.ApplicationException: Attempt to release mutex not owned by caller. (Exception from HRESULT: 0x00000120)
       at System.Threading.ReaderWriterLock.ReleaseReaderLockInternal()
       at Microsoft.EnterpriseManagement.Common.ReaderWriterLockWrapper.Dispose()
       at Microsoft.EnterpriseManagement.Configuration.TypeSpaceCache.GetMonitoringClass(Guid managedTypeId)
       at Microsoft.EnterpriseManagement.ManagementGroup.GetMonitoringClass(Guid id)
       at Microsoft.EnterpriseManagement.ManagementGroup.Microsoft.EnterpriseManagement.Configuration.IO.IManagementPackSearch.GetClass(ManagementPackElementReference`1 reference)
       at Microsoft.EnterpriseManagement.Configuration.ManagementPackElementReference`1.FetchElement(IManagementPackSearch searcher)
       at Microsoft.EnterpriseManagement.Configuration.ManagementPackElementReference`1.GetElement()
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Views.RuleWrapper.get_InheritedFrom()
       — End of inner exception stack trace —
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
       at Microsoft.EnterpriseManagement.Mom.Internal.UI.Controls.GridControl.GridViewCellValueNeeded(Object sender, DataGridViewCellValueEventArgs e)
       at System.Windows.Forms.DataGridView.OnCellValueNeeded(DataGridViewCellValueEventArgs e)
       at System.Windows.Forms.DataGridView.OnCellValueNeeded(Int32 columnIndex, Int32 rowIndex)
       at System.Windows.Forms.DataGridViewCell.GetValue(Int32 rowIndex)
       at System.Windows.Forms.DataGridViewTextBoxCell.GetPreferredSize(Graphics graphics, DataGridViewCellStyle cellStyle, Int32 rowIndex, Size constraintSize)
       at System.Windows.Forms.DataGridViewCell.GetPreferredWidth(Int32 rowIndex, Int32 height)
       at System.Windows.Forms.DataGridViewCell.OnCellDataAreaMouseEnterInternal(Int32 rowIndex)
       at System.Windows.Forms.DataGridViewCell.OnMouseMoveInternal(DataGridViewCellMouseEventArgs e)
       at System.Windows.Forms.DataGridView.OnCellMouseMove(DataGridViewCellMouseEventArgs e)
       at System.Windows.Forms.DataGridView.UpdateMouseEnteredCell(HitTestInfo hti, MouseEventArgs e)
       at System.Windows.Forms.DataGridView.OnMouseMove(MouseEventArgs e)
       at System.Windows.Forms.Control.WmMouseMove(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.DataGridView.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.DoEvents()
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.MomExtensionsCommon.Run(Object[] userData)
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Common.WizardLauncher.RunExtension(Object[] data)
    System.ApplicationException: Attempt to release mutex not owned by caller. (Exception from HRESULT: 0x00000120)
       at System.Threading.ReaderWriterLock.ReleaseReaderLockInternal()
       at Microsoft.EnterpriseManagement.Common.ReaderWriterLockWrapper.Dispose()
       at Microsoft.EnterpriseManagement.Configuration.TypeSpaceCache.GetMonitoringClass(Guid managedTypeId)
       at Microsoft.EnterpriseManagement.ManagementGroup.GetMonitoringClass(Guid id)
       at Microsoft.EnterpriseManagement.ManagementGroup.Microsoft.EnterpriseManagement.Configuration.IO.IManagementPackSearch.GetClass(ManagementPackElementReference`1 reference)
       at Microsoft.EnterpriseManagement.Configuration.ManagementPackElementReference`1.FetchElement(IManagementPackSearch searcher)
       at Microsoft.EnterpriseManagement.Configuration.ManagementPackElementReference`1.GetElement()
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Views.RuleWrapper.get_InheritedFrom()

Ответы

  • Hi,

    It seems the remote console itself has the problem. Or it may be caused by the software conflict.

    Try to reinstall the console to see if it helps. You can try to uninstall some 3-rd party softwares from the computer to find out the possible culprit.

Describe the bug
Since updating a project to the latest version of WinUI3 (Reunion 0.5) we receive the following error whenever trying to debug:

System.Reflection.TargetInvocationException
  HResult=0x80131604
  Message=Exception has been thrown by the target of an invocation.
  Source=System.Private.CoreLib
  StackTrace:
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
   at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache) in /_/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs:line 4005
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions) in /_/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs:line 4062
   at System.Activator.CreateInstance[T]() in /_/src/libraries/System.Private.CoreLib/src/System/Activator.RuntimeType.cs:line 151
   at WinRT.WeakLazy`1.get_Value()
   at Microsoft.UI.Xaml.Application._IApplicationStatics.get_Instance()
   at Microsoft.UI.Xaml.Application.Start(ApplicationInitializationCallback callback)
   at Project.Program.Main(String[] args) in C:UsersUSERSourceReposProjectProject.UIProject.UIobjx64Debugnet5.0-windows10.0.19041.0App.g.i.cs:line 26

  This exception was originally thrown at this call stack:
    System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(int) in Marshal.cs
    WinRT.BaseActivationFactory.BaseActivationFactory(string, string)
    Microsoft.UI.Xaml.Application._IApplicationStatics._IApplicationStatics()

Inner Exception 1:
COMException: Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))

Steps to reproduce the bug
We used a project created in WinUI3 v3 and followed the official instructions to upgrade to Reunion 0.5. The original project works as expected until Reunion is installed/WinUI3 removed — then we are unable to run the project with the CLASSNOTREG error.

Expected behavior
The project will run as before.

Screenshots
image

Version Info
NuGet package version:
Microsoft.ProjectReunion-v0.5.0-prerelease
Microsoft.ProjectReunion.Foundation-v0.5.0-prerelease
Microsoft.ProjectReunion.WinUI-v0.5.0-prerelease

Windows app type:
Win32

Windows 10 version Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042) Yes
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Data.SqlClient;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace AirTransportation
{
    public partial class Form1 : Form
    {
        SqlConnection sqlConnection;
 
        public Form1()
        {
            InitializeComponent();
        }
 
        private async void Form1_Load(object sender, EventArgs e)
        {
            string connectionString = @"C:UserskrasikDesktopМИДОКурсовойС# 6 семAirTransportationPaspisanie.mdf";
 
            sqlConnection = new SqlConnection(connectionString);
 
            await sqlConnection.OpenAsync();
 
            SqlDataReader sqlReader = null; // позволяет получать данные в табличном виде
 
            SqlCommand command = new SqlCommand("SELECT * FROM [Paspisanie]",sqlConnection);
 
            try
            {
                sqlReader = await command.ExecuteReaderAsync();
 
                while (await sqlReader.ReadAsync())
                {
                    listBox1.Items.Add(Convert.ToString(sqlReader["Id"]) + "   " + "-" + "  " + Convert.ToString(sqlReader["otpravleniya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["prubutiya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["Pasagiri"] + "  " + "Пассажиров"))));
                                  
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString(), ex.Source.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
                throw;
            }
            finally
            {
                if (sqlReader != null)
                    sqlReader.Close();
            }
        }
 
        private void выходToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (sqlConnection != null && sqlConnection.State!=ConnectionState.Closed) 
            {
                sqlConnection.Close();
            }
            Application.Exit();
        }
 
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (sqlConnection != null && sqlConnection.State != ConnectionState.Closed)
            {
                sqlConnection.Close();
            }
        }
 
        // добавление рейса
        private async void button1_Click(object sender, EventArgs e)
        {
            if (addSuccessMessage.Visible)
            {
                addSuccessMessage.Visible = false;
            }
            if (addErrorMessage.Visible)
            {
                addErrorMessage.Visible = false;
            }
 
            if (!String.IsNullOrEmpty(tb1.Text) && !String.IsNullOrWhiteSpace(tb1.Text) &&
                !String.IsNullOrEmpty(tb2.Text) && !String.IsNullOrWhiteSpace(tb2.Text) &&
                !String.IsNullOrEmpty(tb3.Text) && !String.IsNullOrWhiteSpace(tb3.Text))
            {
                SqlCommand insert = new SqlCommand("INSERT INTO [Paspisanie] (otpravleniya, prubutiya, Pasagiri) VALUES (@otpravleniya, @prubutiya, @Pasagiri)", sqlConnection);
 
                insert.Parameters.AddWithValue("otpravleniya", tb1.Text);
                insert.Parameters.AddWithValue("prubutiya", tb2.Text);
                insert.Parameters.AddWithValue("Pasagiri", tb3.Text);
               await insert.ExecuteNonQueryAsync();
               
               addSuccessMessage.Visible = true;
               tb1.Clear();
               tb2.Clear();
               tb3.Clear();
               
             // обновление базы
               listBox1.Items.Clear();
 
               SqlDataReader sqlReader = null; // позволяет получать данные в табличном виде
 
               SqlCommand command = new SqlCommand("SELECT * FROM [Paspisanie]", sqlConnection);
 
               try
               {
                   sqlReader = await command.ExecuteReaderAsync();
 
                   while (await sqlReader.ReadAsync())
                   {
                       listBox1.Items.Add(Convert.ToString(sqlReader["Id"]) + "   " + "-" + "  " + Convert.ToString(sqlReader["otpravleniya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["prubutiya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["Pasagiri"] + "  " + "Пассажиров"))));
                   }
               }
               catch (Exception ex)
               {
                   MessageBox.Show(ex.Message.ToString(), ex.Source.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
                   throw;
               }
               finally
               {
                   if (sqlReader != null)
                       sqlReader.Close();
               }
 
            }
            else
            {
                addErrorMessage.Visible = true;
            }
        
        }
 
        //метод обновления базы данных (инструменты -> обновить)
        private async void обновитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
 
            SqlDataReader sqlReader = null; // позволяет получать данные в табличном виде
 
            SqlCommand command = new SqlCommand("SELECT * FROM [Paspisanie]", sqlConnection);
 
            try
            {
                sqlReader = await command.ExecuteReaderAsync();
 
                while (await sqlReader.ReadAsync())
                {
                    listBox1.Items.Add(Convert.ToString(sqlReader["Id"]) + "   " + "-" + "  " + Convert.ToString(sqlReader["otpravleniya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["prubutiya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["Pasagiri"] + "  " + "Пассажиров"))));
                    
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString(), ex.Source.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
                throw;
            }
            finally
            {
                if (sqlReader != null)
                    sqlReader.Close();
            }
        }
        //изменение базы данных
        private async void ChangeButton_Click(object sender, EventArgs e)
        {
             if (errorlblChange.Visible)
            {
                errorlblChange.Visible = false;
            }
             if (successChnglbl.Visible)
             {
                 successChnglbl.Visible = false;
             }
 
             if (!String.IsNullOrEmpty(otpravleniyachange.Text) && !String.IsNullOrWhiteSpace(otpravleniyachange.Text) &&
                 !String.IsNullOrEmpty(prubutiyachange.Text) && !String.IsNullOrWhiteSpace(prubutiyachange.Text) &&
                 !String.IsNullOrEmpty(PasagiriChange.Text) && !String.IsNullOrWhiteSpace(PasagiriChange.Text)&&
                 !String.IsNullOrEmpty(raceNumberChange.Text) && !String.IsNullOrWhiteSpace(raceNumberChange.Text))
             {
                 SqlCommand updatecommand = new SqlCommand("UPDATE [Paspisanie] SET [otpravleniya]=@otpravleniya, [prubutiya]=@prubutiya,[Pasagiri]=@Pasagiri WHERE [Id]=@Id", sqlConnection);
                 
                 updatecommand.Parameters.AddWithValue("Id",raceNumberChange.Text);
             
                 updatecommand.Parameters.AddWithValue("otpravleniya",otpravleniyachange.Text);
                 
                 updatecommand.Parameters.AddWithValue("prubutiya",prubutiyachange.Text);
             
                 updatecommand.Parameters.AddWithValue("Pasagiri",PasagiriChange.Text);
                 
                 await updatecommand.ExecuteNonQueryAsync();
 
                 successChnglbl.Visible = true;
 
                 raceNumberChange.Clear();
                 otpravleniyachange.Clear();
                 prubutiyachange.Clear();
                 PasagiriChange.Clear();
 
                 //обновление базы
                 listBox1.Items.Clear();
 
                 SqlDataReader sqlReader = null; // позволяет получать данные в табличном виде
 
                 SqlCommand command = new SqlCommand("SELECT * FROM [Paspisanie]", sqlConnection);
 
                 try
                 {
                     sqlReader = await command.ExecuteReaderAsync();
 
                     while (await sqlReader.ReadAsync())
                     {
                         listBox1.Items.Add(Convert.ToString(sqlReader["Id"]) + "   " + "-" + "  " + Convert.ToString(sqlReader["otpravleniya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["prubutiya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["Pasagiri"] + "  " + "Пассажиров"))));
                         
                     }
                 }
                 catch (Exception ex)
                 {
                     MessageBox.Show(ex.Message.ToString(), ex.Source.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
                     throw;
                 }
                 finally
                 {
                     if (sqlReader != null)
                         sqlReader.Close();
                 }
 
             }
             else
             {
                 errorlblChange.Visible = true;
             }
        }
 
     //удаление рейса из базы
        private async void DeleteBtn_Click(object sender, EventArgs e)
        {
            if (SuccessDelLbl.Visible)
            {
                SuccessDelLbl.Visible = false;
            }
 
            if (Deletelbl.Visible)
            {
                Deletelbl.Visible = false;
            }
 
            if (!String.IsNullOrEmpty(DeleteId.Text) && !String.IsNullOrWhiteSpace(DeleteId.Text))
            {
                SqlCommand deletecommand = new SqlCommand("DELETE FROM [Paspisanie] WHERE [Id]=@Id", sqlConnection);
 
                deletecommand.Parameters.AddWithValue("Id", DeleteId.Text);
 
                await deletecommand.ExecuteNonQueryAsync();
 
                SuccessDelLbl.Visible = true;
 
                DeleteId.Clear();
            }
            else
            {
                Deletelbl.Visible = true;
            }
            
            //обновление базы данных
            listBox1.Items.Clear();
 
            SqlDataReader sqlReader = null; // позволяет получать данные в табличном виде
 
            SqlCommand command = new SqlCommand("SELECT * FROM [Paspisanie]", sqlConnection);
 
            try
            {
                sqlReader = await command.ExecuteReaderAsync();
 
                while (await sqlReader.ReadAsync())
                {
                    listBox1.Items.Add(Convert.ToString(sqlReader["Id"]) + "   " + "-" + "  " + Convert.ToString(sqlReader["otpravleniya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["prubutiya"] + "   " + "-" + "  " + Convert.ToString(sqlReader["Pasagiri"] + "  " + "Пассажиров"))));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString(), ex.Source.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
                throw;
            }
            finally
            {
                if (sqlReader != null)
                    sqlReader.Close();
            }
 
 
        }
 
        private async void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {  
       
 
          
          
        }
 
        private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
        {
 
        }
 
        private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string item = listBox1.SelectedItem.ToString();
            EditRoute message = new EditRoute(item);
            message.ShowDialog();
        }
 
        private void tabPage2_Click(object sender, EventArgs e)
        {
 
        }
 
        private void tabPage3_Click(object sender, EventArgs e)
        {
 
        }
 
 
 
    }
}

При запуске лаунчер выдает ошибку

Чтобы отвечать, сперва войдите на форум


Фото

Kwizi
Наблюдатель
На форуме с
09 августа 19

System.Reflection.TargetInvocationException:Адресат вызова создал исключение

Прикрепленные миниатюры

  • PN27NxAqDEA.jpg


Фото

aby
Создатель портала
На форуме с
23 мая 06

в директории %localappdata% удалите папку strikearena.ru должно помочь


Фото

Ogurchik_
Наблюдатель
На форуме с
21 февраля 20

в директории %localappdata% удалите папку strikearena.ru должно помочь

нашел только*strikearena* удалил, не помогло


Фото

Sania(ZoS)
Администратор портала
На форуме с
06 октября 19

нашел только*strikearena* удалил, не помогло

ваш скриншот и текст проблемы в студию


Фото

Ogurchik_
Наблюдатель
На форуме с
21 февраля 20

ваш скриншот и текст проблемы в студию

собственно вот:

появляется при запуске *launcher_SA.exe

если это важно конечно, то оффлайн запускается

Изменено: Ogurchik_, 23 февраля 2020 — 05:04

Прикрепленные миниатюры

  • Снимок.PNG


Фото

Ogurchik_
Наблюдатель
На форуме с
21 февраля 20


Фото

Sania(ZoS)
Администратор портала
На форуме с
06 октября 19

i need help

попробуй переустановить/обновить net framework до версии 4.8


Фото

VovaDok
Наблюдатель
На форуме с
22 февраля 20

попробуй переустановить/обновить net framewor

У меня была похожая проблема ! Лаунчер ,не как не хотел открываться все танцы с бубном я проделал. Но так и не чего не помогло . Тогда я скачал клиент игры 1,7 с другого ресурса. Закинул туда апдейтер , все им проверил , долго и нудно. Закинул лаунчер и ….  все заработало вчера погонял на 2 сервере  онлайн 55 челов)))


Фото

Ogurchik_
Наблюдатель
На форуме с
21 февраля 20

попробуй переустановить/обновить net framework до версии 4.8

не помогло! Есть еще  варианты?

У меня была похожая проблема ! Лаунчер ,не как не хотел открываться все танцы с бубном я проделал. Но так и не чего не помогло . Тогда я скачал клиент игры 1,7 с другого ресурса. Закинул туда апдейтер , все им проверил , долго и нудно. Закинул лаунчер и ….  все заработало вчера погонял на 2 сервере  онлайн 55 челов)))

можно ссылку? в личку  или так, хочу попробовать


Фото

Sania(ZoS)
Администратор портала
На форуме с
06 октября 19

не помогло! Есть еще  варианты?

можно ссылку? в личку  или так, хочу попробовать

есть, отписать Абу с личного кабинета или на сайте тут же, либо винду переставить


Фото

Ogurchik_
Наблюдатель
На форуме с
21 февраля 20

есть, отписать Абу с личного кабинета или на сайте тут же, либо винду переставить

что такое *абу*?


Фото

Sania(ZoS)
Администратор портала
На форуме с
06 октября 19


Фото

rogachef
Наблюдатель
На форуме с
13 июля 20

Народ столкнулся с такой же проблемой при запуске лаунчера. Офлайн версия работает.

Подскажите что сделать?

Изменено: rogachef, 14 июля 2020 — 01:02


Фото

-=VeteR=-
Администратор портала =========== Гоняет стаи туч
На форуме с
14 июля 19

Народ столкнулся с такой же проблемой при запуске лаунчера. Офлайн версия работает.

Подскажите что сделать?

Скриншот приложите


Фото

-=VeteR=-
Администратор портала =========== Гоняет стаи туч
На форуме с
14 июля 19

В папке с игрой находите DayZ Fixer, открываете,, выключаете защитник, брандмауэр и смарт скрин. Если есть дополнительные антивирусы (Аваст) — удаляете или полностью выключаете. После этого в папке с игрой открываете updater, выбираете любой из 4 серверов и нажимаете «Начать». После завершения должно работать.

Изменено: -=VeteR=-, 14 июля 2020 — 01:44


Фото

rogachef
Наблюдатель
На форуме с
13 июля 20

Победил, скачав заново только лаунчер, и добавил его в исключение антивируса. Апдейтером 3 раза проверял, не помогло.

Подскажите еще где скачать папку с модами @STALKERDZ? В дискорде ссылки нет для нон-стим.

Изменено: rogachef, 14 июля 2020 — 02:25


Фото

-=VeteR=-
Администратор портала =========== Гоняет стаи туч
На форуме с
14 июля 19

Победил, скачав заново только лаунчер, и добавил его в исключение антивируса. Апдейтером 3 раза проверял, не помогло.

Подскажите еще где скачать папку с модами @STALKERDZ? В дискорде ссылки нет для нон-стим.

То что я писал нужно было делать в порядке очереди….

Понравилась статья? Поделить с друзьями:
  • Error system perl at usr bin perl must be present before installation
  • Error system locked bios lenovo
  • Error system locked bios acer
  • Error system fan has failed как исправить
  • Error system fan has failed service pc to prevent damage to the system