C# Need help Same code = issue?

TableFlipGod

Active Coder
May 13, 2019
126
25
29
14
049CBC78-4906-4776-B2D9-6A7DA429A740.png 011FC418-8E97-440B-869C-851D9B1DE6FB.png

So its the same code on a different program. I dont understand why it doesnt work. ( on the first image(the consoleapp) it shows the exact fps) but on the form(second image) it shows .5 .5 then 0 After that its done.
 

Malcolm

Administrator
Administrator
Jan 2, 2018
1,015
277
95
Canada
codeforum.org
Is it possible that you could copy the code and paste it into the built-in code feature on CF? It would be easier for us to look over and give you a better idea on how to fix this issue.
 

eeflores

Coder
Jun 26, 2019
58
17
8
Looks like we need more context for the forms application: would you be able to share the code or project?
 

Ghost

Active Coder
Moderator
Apr 19, 2019
326
149
43
Console.clear() is commented out on the second one.
That's the first one I noticed, but maybe there's more differences.

Try copying & pasting both sets of code into a comparison tool online to auto-detect differences.

It could also be that some sort of dependency or module is missing in the second project...
 

TableFlipGod

Active Coder
May 13, 2019
126
25
29
14
Console.clear() is commented out on the second one.
That's the first one I noticed, but maybe there's more differences.

Try copying & pasting both sets of code into a comparison tool online to auto-detect differences.

It could also be that some sort of dependency or module is missing in the second project...
There is no difference, i commented out that line because when you run a forms application. It prints out to the vs output console, and there isnt a Clear(); function for it.
 

eeflores

Coder
Jun 26, 2019
58
17
8
Is there a difference between how you call that function between the console app and the forms application? Do you create the thread in a different way in the forms app?
 

TableFlipGod

Active Coder
May 13, 2019
126
25
29
14
Is there a difference between how you call that function between the console app and the forms application? Do you create the thread in a different way in the forms app?
No, i have a class with a run function( the Main(); function)
 

TableFlipGod

Active Coder
May 13, 2019
126
25
29
14
No, i have a class with a run function( the Main(); function)
Is there a difference between how you call that function between the console app and the forms application? Do you create the thread in a different way in the forms app?
Currently i moved it into the Form1.cs class but im getting off it now, have a migraine. But i get an error saying value isnt as expected or something ill post it tomarrow.
 

TableFlipGod

Active Coder
May 13, 2019
126
25
29
14
Is it possible that you could copy the code and paste it into the built-in code feature on CF? It would be easier for us to look over and give you a better idea on how to fix this issue.
I dont have access to my pc at this time
 
  • Like
Reactions: Malcolm

Ghost

Active Coder
Moderator
Apr 19, 2019
326
149
43
I dont have access to my pc at this time
If the code is truly exactly the same and it's not working, then clearly there is an issue with a module / dependency, or another file. You will need to show us other attached files that may affect this, as well as anything imported in for the working version. Without this information, there is nothing CF can do to help because if the code truly is identical, then it's definitely something else.
 

TableFlipGod

Active Coder
May 13, 2019
126
25
29
14
If the code is truly exactly the same and it's not working, then clearly there is an issue with a module / dependency, or another file. You will need to show us other attached files that may affect this, as well as anything imported in for the working version. Without this information, there is nothing CF can do to help because if the code truly is identical, then it's definitely something else.
Ok so what can I do?
 

eeflores

Coder
Jun 26, 2019
58
17
8
You mentioned an error about unexpected something or other - could you tell us what that error was?
 

TableFlipGod

Active Coder
May 13, 2019
126
25
29
14
You mentioned an error about unexpected something or other - could you tell us what that error was?
Oh yea here,
Exception thrown: 'System.ArgumentException' in Microsoft.Diagnostics.Tracing.TraceEvent.dll
Value does not fall within the expected range.