Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic .NET (http://www.programmingforums.org/forum19.html)
-   -   Problem, any help please. (http://www.programmingforums.org/showthread.php?t=3865)

Illuminati May 11th, 2005 5:35 PM

Problem, any help please.
 
OK i finished off writing a program, went to run it and got a stackoverflow, ok so that can be sorted, time to debug.

Well, i set debug at the windows generated code here:
[PHP]
Public Class FormMain
Inherits System.Windows.Forms.Form
'Dim data As New data
#Region " Windows Form Designer generated code "

Public Sub New() '- BREAKPOINT HERE
MyBase.New()

'This call is required by the Windows Form Designer.

[/PHP]

Ran the program, stepped through and it read the code from the line " 'Dim data As New data " and executed it.. which then created a new instance of the data class. Notice how this line had been commented.

Well i thought maybe its just VB being stupid, so i removed the line completely. Same thing happened.

VB .NET appears to be still executing this "invisible code", is there any plausable reason for this?! the code doesnt exist but its still managing to execute it.

Thanks.

Dameon May 11th, 2005 6:14 PM

I've had some wierd issues with the compiler before. I would add a debug line, and it wouldn't print. Try closing and re-opening Visual Basic. If that doesn't work, delete the .exe and .pdb from your Project's bin folder and perhaps from obj/Debug.

Illuminati May 11th, 2005 6:44 PM

good idea on the deleting the exe's

although it didnt work, lol. installed a few updates .net 1.1 etc and now it doesnt even hit any code, just gives an infinite recursion detected error (which is what it does when it hits the "invisible" code) but it doesnt even get to my code now.

this is beginnin to annoy me

Ooble May 11th, 2005 6:47 PM

Copy the code into a completely new project, compile, and see what happens.

Illuminati May 11th, 2005 10:24 PM

copied, pasted, etc many times, didnt work.

i eventually sorted it out, not entirely sure how, but i sorted it anyway lol.

thanks for the help.

Ooble May 12th, 2005 3:42 PM

Congrats.


All times are GMT -5. The time now is 12:53 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC