Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

'system' Causing Errors - Vb.net


  • Please log in to reply
13 replies to this topic

#1 Sp0nge

Sp0nge

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 07 September 2007 - 06:21 AM

Hi peoples,

maybe some of you have access to the HJT forum and have seen the HJT Assistant. Well its having some troubles at the moment...

I was just adding the final touches, IE: The last few text boxes containing the speeches when all of a sudden appeared 102 error messages ALL containing the word system from the source code. This has made me unable to export it >_<

Here is an example section of the code that is giving the error:

<System.Diagnostics.DebuggerNonUserCode()> _
	Protected Overrides Sub Dispose(ByVal disposing As Boolean)
		If disposing AndAlso components IsNot Nothing Then
			components.Dispose()
		End If
		MyBase.Dispose(disposing)
	End Sub

Weird thing is, i didnt actually write that code... IT DID!!!! its from the form1.designer.vb section.

There are several errors appearing down the bottom.. here they are...

Error 2 Reference to a non-shared member requires an object reference. C:\Documents and Settings\Pat\Desktop\HJT assistant\Form1.Designer.vb 20 6 Canned Speech Library - HJT


Error 3 'Windows' is not a member of 'System.Windows.Forms.TextBox'. C:\Documents and Settings\Pat\Desktop\HJT assistant\Form1.Designer.vb 1967 32 Canned Speech Library - HJT

Error 16 'Diagnostics' is not a member of 'System.Windows.Forms.TextBox'. C:\Documents and Settings\Pat\Desktop\HJT assistant\Form1.vb 176 9 Canned Speech Library - HJT

Error 20 'IO' is not a member of 'System.Windows.Forms.TextBox'. C:\Documents and Settings\Pat\Desktop\HJT assistant\Form1.vb 202 30 Canned Speech Library - HJT

Idk.. maybe someone can help..

I put a lot of time into that program and for it to just not work is disappointing.

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:21 PM

Posted 07 September 2007 - 07:31 AM

Were you adding pieces bit by biot and testing as you went along? Was that part of thecode having problems before? That little snippet pf code does not really help. Gor instance, if you forgot a closing brace somewhere above that bit of code, and variables may be out of scope for that particular piece of code.

Start pulling things out until you find out what is wrong.

#3 Sp0nge

Sp0nge
  • Topic Starter

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 07 September 2007 - 08:07 PM

I took out everything that I added before the error, and the errors are still there.

The buttons have reverted back to the normal standard style, the labels backgrounds have changed, and the fonts are different aswel..

I could show you the entire 1700 lines of code if you like? just kidding :thumbsup:

im at a loss..

Maybe If i system restore, my old one will be restored

#4 Sp0nge

Sp0nge
  • Topic Starter

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 07 September 2007 - 08:10 PM

Ok very weird stuff is happening.

The amount of errors has become ever changing. Its standing at 48 at the moment.

Atleast its going down

#5 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:21 PM

Posted 07 September 2007 - 09:43 PM

I would be willing to bet that you missed a closing brace somewhere.....

#6 Sp0nge

Sp0nge
  • Topic Starter

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 07 September 2007 - 10:32 PM

Wouldnt that show in the error though?

#7 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:21 PM

Posted 08 September 2007 - 08:30 AM

Not necessarily. If for instance you have a for loop that is supposed to accomplish some small task, and you forget to close it, then the application will be looping to the next point that there is a closing brace which may actually belont to another function. That function no longer has a closing brace, so then the parser will be looking for the next closing brace. While that is happening, you will have variables going in and out of scope.

In your original errors, the first one you listed is a scope issue. You are trying to use a variable that has not been instantiated, or appears to the program to have not been instantiated. The other issues are library usage issues that may or may not stem from the original problem. That snippet of code you originally posted appears to be a function to trap errors. It isn't the code that is causing the problem.

So know to ask the stupid question, are you saying that your program is a single procedure 1700 lines long?

#8 Sp0nge

Sp0nge
  • Topic Starter

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 08 September 2007 - 04:01 PM

No all up there are a fair few lines. 1700 was like the first number that jumped into my head.

While im going through these lines of code, why does the amount of errors keep changing?

it was down to 48 yesterday, then I closed vb express and it shot back up to 67. Currently sitting at 62

#9 Sp0nge

Sp0nge
  • Topic Starter

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 08 September 2007 - 04:09 PM

These are the only textbox's above the all the errors... everything else above the errors are msg boxes.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
		fix.Text = fix.Text + " " + speech.Text
	End Sub
	Private Sub MSNcleanerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
		speech.Text = msncleaner.Text
	End Sub
	Private Sub NewdotnetNewNetToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewdotnetNewNetToolStripMenuItem.Click
		speech.Text = newdot.Text
	End Sub
	Private Sub NoLopToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NoLopToolStripMenuItem.Click
		speech.Text = nolop.Text
	End Sub
	Private Sub VundofixToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VundofixToolStripMenuItem.Click
		speech.Text = vundo.Text
	End Sub
	Private Sub Surfsidekick3ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
		speech.Text = surf.Text
	End Sub

I cant see anything wrong with them. Maybe I am looking in the wrong section of code?

Thats from form1.vb

#10 Sp0nge

Sp0nge
  • Topic Starter

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 08 September 2007 - 04:28 PM

Deleted EVERYTHING above those bits of code and the errors were still there.

This is on line 6 of form1.designer.vb

Error 1 Reference to a non-shared member requires an object reference. C:\Documents and Settings\Pat\Desktop\HJT assistant\Form1.Designer.vb 6 6 Canned Speech Library - HJT

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class hjthelper
Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub


It may be of some use..

#11 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:21 PM

Posted 08 September 2007 - 05:40 PM

How about the piece of code that includes line 6?

#12 Sp0nge

Sp0nge
  • Topic Starter

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 08 September 2007 - 05:59 PM

is that a request for the lines of code? Or did you mean, did i delete them as a test and did they do anything?

Btw thx for your help so far, much appreciated :thumbsup:

#13 Sp0nge

Sp0nge
  • Topic Starter

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 09 September 2007 - 04:20 PM

This may be of some help...

<System.Diagnostics.DebuggerNonUserCode()> _
	Protected Overrides Sub Dispose(ByVal disposing As Boolean)
		If disposing AndAlso components IsNot Nothing Then
			components.Dispose()
		End If
		MyBase.Dispose(disposing)
	End Sub

system gives the error...

Error	1	Reference to a non-shared member requires an object reference.	C:\Documents and Settings\Pat\Desktop\HJT assistant\Form1.Designer.vb	6	6	Canned Speech Library - HJT


#14 Sp0nge

Sp0nge
  • Topic Starter

  • Members
  • 643 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sydney, Australia
  • Local time:04:21 PM

Posted 10 September 2007 - 06:08 AM

This is the header on my form1.designer.vb

[codebox]<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class hjthelper
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub[/codebox]

I 'ended' the partial class and all the "system" errors were resolved, but all these new ones appeared. Which makes me think this is the problem, but there is something missing..

Anyone got ideas?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users