Quantcast
Channel: Code crashing
Viewing all articles
Browse latest Browse all 11

Code crashing

$
0
0

The code has gone bad.  It is in debug mode and jumping around everywhere

Error = "the process or thread has changed since last step"

Here is the code... I just create the file "start.csv" to initialize the shell command.  This is very unstable for some reason.  When I run line by line in debug mode it starts jumping around irrationally.  It gives me versions of the above error.

Option Strict On
Option Explicit On
Imports System.IO


Module Module1

    Public WithEvents Tmr As New Timers.Timer

    Sub Main()
        Console.WriteLine("Worker is Inactive...")
        'WORKER RUN
        Tmr.Interval = 4000 'Interval where Tmr_Tick is kicked off
        Tmr.Enabled = True
        Tmr.Start()
        Console.ReadLine() 'this prevents the console from closing

    End Sub

    Sub Tmr_Tick() Handles Tmr.Elapsed
        Dim Filepath_Executable As String
        Filepath_Executable = "C:\Users\Administrator\Desktop\Machine\Jobs\CurrentJob\Slave1"
        If File.Exists(Filepath_Executable + "\" + "Start.csv") Then 'Status_File
            Shell(Filepath_Executable + "\" + "program.exe")
            Console.Clear()
            Console.WriteLine("Worker Started Application...")
            ' If File.Exists(Filepath_Executable + "\" + "Start.csv") Then File.Delete(Filepath_Executable + "\" + "Start.csv")
            'Dim ioFile As New StreamWriter(Filepath_Executable & "running.csv")
            'ioFile.Close()
        End If
    End Sub

End Module

 



Viewing all articles
Browse latest Browse all 11

Latest Images

Vimeo 10.7.0 by Vimeo.com, Inc.

Vimeo 10.7.0 by Vimeo.com, Inc.

HANGAD

HANGAD

MAKAKAALAM

MAKAKAALAM

Doodle Jump 3.11.30 by Lima Sky LLC

Doodle Jump 3.11.30 by Lima Sky LLC

Trending Articles


Dibujos para pintar de princesas


Pokemon para colorear


Winx Club para colorear


Orquidea para colorear


Sapos para colorear


Renos para colorear


Dromedario para colorear


Selos Quotes – Tagalog Love Quotes


Long Distance Relationship Tagalog Love Quotes


Tamis Ng tagumpay


Imágenes de Robin Hood para colorear


Dino Rey para colorear


Libros para colorear


Girasoles para colorear


Dibujos para colorear de perros


Toro para colorear


People Walk Away Quotes, Inspire Quotes


Inspirational Tagalog quotes and Motivational English Quotes


Love Quotes Tagalog


RE: Mutton Pies (mely)





Latest Images

Vimeo 10.7.0 by Vimeo.com, Inc.

Vimeo 10.7.0 by Vimeo.com, Inc.

HANGAD

HANGAD

MAKAKAALAM

MAKAKAALAM

Doodle Jump 3.11.30 by Lima Sky LLC

Doodle Jump 3.11.30 by Lima Sky LLC