System.InvalidCastException
graphixillusion opened this issue · 3 comments
graphixillusion commented
Hi there. First of all, thank you for all the effort about fixing this annoying bug. I can confirm that it still occurrs under Windows 10 version 1809. So looking for a solution, i found this page but i got an issue during the run so let me explain it. When i launch the tool, i choose the option to fix one interface: on my system, the interface i want to fix is the number 0. I enter 0 then press enter. At this point, nothing happens: just the blinking cursor to a new line. If i hit enter again, this error will show up:
System.InvalidCastException: Cast non valido dalla stringa "" al tipo 'Integer'. ---> System.FormatException: Formato della stringa di input non corretto.
in Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
in Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
--- Fine della traccia dello stack dell'eccezione interna ---
in Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
in ShareFix.MainModule.FixRegistry(Boolean silent) in C:\Users\Filippo\Documents\GitHub\ShareFix\ShareFix\ShareFix\MainModule.vb:riga 107
in ShareFix.MainModule.Main() in C:\Users\Filippo\Documents\GitHub\ShareFix\ShareFix\ShareFix\MainModule.vb:riga 26
Press a key to exit
Any clue?
gstarrett2 commented
Hi Gabe & Filippo,
Hmm... I think I see the problem. Line 107 is asking for another
value.... but the app already has the value.
ElseIf Integer.TryParse(input, Nothing) Then
Dim indexToFix = CInt(Console.ReadLine)
I'm thinking it should instead be:
ElseIf Integer.TryParse(input, Nothing) Then
Dim indexToFix = CInt(input)
While you're at it, it looks like this line is wrong as well (should
show 0...N instead of 1...N):
Console.Write("Please select index of interface to fix (E:exit,
A:All, 1..N: single interface):")
Let me know if you need me to post it and send you a pull request...
Note that I haven't tested these, just trying to get it in email here.
Regards,
Glen Starrett
On 3/12/2019 7:05 PM, Gabe wrote:
Hi there. First of all, thank you for all the effort about fixing this
annoying bug. I can confirm that it still occurrs under Windows 10
version 1809. So looking for a solution, i found this page but i got
an issue during the run so let me explain it. When i launch the tool,
i choose the option to fix one interface: on my system, the interface
i want to fix is the number 0. I enter 0 then press enter. At this
point, nothing happens: just the blinking cursor to a new line. If i
hit enter again, this error will show up:
|System.InvalidCastException: Cast non valido dalla stringa "" al tipo
'Integer'. ---> System.FormatException: Formato della stringa di input
non corretto. in
Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String
Value, NumberFormatInfo NumberFormat) in
Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String
Value) --- Fine della traccia dello stack dell'eccezione interna ---
in Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String
Value) in ShareFix.MainModule.FixRegistry(Boolean silent) in
C:\Users\Filippo\Documents\GitHub\ShareFix\ShareFix\ShareFix\MainModule.vb:riga
107 in ShareFix.MainModule.Main() in
C:\Users\Filippo\Documents\GitHub\ShareFix\ShareFix\ShareFix\MainModule.vb:riga
26 Press a key to exit |
Any clue?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/Anxq_7Aw79aEqGyEq6XpZhkbfa2rhwxJks5vWEDSgaJpZM4bsH4o>.
--
Glen Starrett
gstarrett2 commented
P.S. For a quick workaround, just enter the same interface you already
entered again (in this case 0).
On 3/12/2019 7:05 PM, Gabe wrote:
Hi there. First of all, thank you for all the effort about fixing this
annoying bug. I can confirm that it still occurrs under Windows 10
version 1809. So looking for a solution, i found this page but i got
an issue during the run so let me explain it. When i launch the tool,
i choose the option to fix one interface: on my system, the interface
i want to fix is the number 0. I enter 0 then press enter. At this
point, nothing happens: just the blinking cursor to a new line. If i
hit enter again, this error will show up:
|System.InvalidCastException: Cast non valido dalla stringa "" al tipo
'Integer'. ---> System.FormatException: Formato della stringa di input
non corretto. in
Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String
Value, NumberFormatInfo NumberFormat) in
Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String
Value) --- Fine della traccia dello stack dell'eccezione interna ---
in Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String
Value) in ShareFix.MainModule.FixRegistry(Boolean silent) in
C:\Users\Filippo\Documents\GitHub\ShareFix\ShareFix\ShareFix\MainModule.vb:riga
107 in ShareFix.MainModule.Main() in
C:\Users\Filippo\Documents\GitHub\ShareFix\ShareFix\ShareFix\MainModule.vb:riga
26 Press a key to exit |
Any clue?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/Anxq_7Aw79aEqGyEq6XpZhkbfa2rhwxJks5vWEDSgaJpZM4bsH4o>.
--
Glen Starrett
filippobottega commented
Hi Gabe & Glen,
thank you for your support.
I have published a new release v1.0.4 with your correction.
Best regards,
Filippo.