Debugger getting confused - any suggestions?

Debugger getting confused - any suggestions?

am 15.02.2007 12:20:43 von Griff

Hi - I have completely rebuilt my PC from scratch and it's running XPsp2 and
VS2003 sp1.

Sometimes when I run my ASP code (this is CLASSIC asp by the way) through
the VS2003 debugger, I get the following error message (the following is an
example):
---------------
Microsoft VBScript compilation (0x800A0408)
Invalid Character
/x/x/x/specificPage.asp, line yyy, column z
abc[]ef = hijk
---------------
- the [] is supposed to represent a square box used to display a non-ASCII
character.

However, the SAVED code line in question is:
abcdef = hij.

To get rid of this problem, I have to re-start IIS and re-start the
debugging process. It usually then falls over on a later line with the same
error message.

As you can imagine, it's a little frustrating, but can't think how best to
go about fixing the problem. Any suggestions would be appreciated (By the
way, this combination of IIS, VS2003 & Classic ASP has worked well for about
2 years now so it's not that they're inheriently incompatible).

Griff

Re: Debugger getting confused - any suggestions?

am 15.02.2007 12:36:28 von reb01501

Griff wrote:
> Hi - I have completely rebuilt my PC from scratch and it's running
> XPsp2 and VS2003 sp1.
>
> Sometimes when I run my ASP code (this is CLASSIC asp by the way)
> through the VS2003 debugger, I get the following error message (the
> following is an example):
> ---------------
> Microsoft VBScript compilation (0x800A0408)
> Invalid Character
> /x/x/x/specificPage.asp, line yyy, column z
> abc[]ef = hijk
> ---------------
> - the [] is supposed to represent a square box used to display a
> non-ASCII character.

This has happened to me when I've edited a file in a different editor that
saved the file in unicode format. It has also happened when I've pasted text
that contained unicode characters into an asp file and saved it. The only
way I've ever been able to prevent it is to make sure VS never saves a file
in unicode (it does prompt me when unicode characters are encountered). When
the error occurs, I wind up having to retype the affected portion to get rid
of the unicode character(s).
>
> However, the SAVED code line in question is:
> abcdef = hij.

Yes, that's what it looks like in the text editor. However, you can rest
assured that there is a unicode character in there.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: Debugger getting confused - any suggestions?

am 15.02.2007 12:44:06 von Anthony Jones

"Griff" wrote in message
news:%23iayXNPUHHA.1016@TK2MSFTNGP04.phx.gbl...
> Hi - I have completely rebuilt my PC from scratch and it's running XPsp2
and
> VS2003 sp1.
>
> Sometimes when I run my ASP code (this is CLASSIC asp by the way) through
> the VS2003 debugger, I get the following error message (the following is
an
> example):
> ---------------
> Microsoft VBScript compilation (0x800A0408)
> Invalid Character
> /x/x/x/specificPage.asp, line yyy, column z
> abc[]ef = hijk
> ---------------
> - the [] is supposed to represent a square box used to display a
non-ASCII
> character.
>
> However, the SAVED code line in question is:
> abcdef = hij.
>
> To get rid of this problem, I have to re-start IIS and re-start the
> debugging process. It usually then falls over on a later line with the
same
> error message.
>
> As you can imagine, it's a little frustrating, but can't think how best to
> go about fixing the problem. Any suggestions would be appreciated (By the
> way, this combination of IIS, VS2003 & Classic ASP has worked well for
about
> 2 years now so it's not that they're inheriently incompatible).
>

This is unlikely to have anything to do with VS2003 it isn't responsible for
the VBScript parser complaining about an invalid character.

Open the ASP file in question and goto File|Save As... what encoding does
does it think the file is using?

Does the page contain a <%@codepage directive? If so what is it?

Can you give a real example of the error instead of the pretend one you've
given?

The only possible relationship to VS2003 is that it may be saving the files
as UTF-8 instead of an OEM codepage but without a <%@codepage directive (not
recommended in this case unless applied globally to all pages) this could be
confusing the parser.

Re: Debugger getting confused - any suggestions?

am 15.02.2007 15:34:26 von Griff

> However, you can rest assured that there is a unicode character in there.

Hi Bob

I'm not sure that is the case though...

The file is often one that hasn't been edited for some weeks. It would have
the ReadOnly property set to TRUE. Restarting IIS then results in the file
being correctly parsed without any change to the file on disc.

Griff

Re: Debugger getting confused - any suggestions?

am 15.02.2007 15:41:46 von Griff

Hi Anthony

Answers below each specific question. Also please refer to my reply to Bob
Barrows

> Open the ASP file in question and goto File|Save As... what encoding does
> does it think the file is using?

I opened the text file using Notepad and the encoding was ANSI

> Does the page contain a <%@codepage directive? If so what is it?

It does not contain a code page directive.

> Can you give a real example of the error instead of the pretend one you've
> given?

Okay - in the property below the m_Menu1Colour was changed to
m_Menu[]Colour:

Public Property Let Menu1Colour(ByVal sValue)
m_Menu1Colour = sValue
End Property

> The only possible relationship to VS2003 is that it may be saving the
> files
> as UTF-8 instead of an OEM codepage but without a <%@codepage directive
> (not
> recommended in this case unless applied globally to all pages) this could
> be
> confusing the parser.

Unfortunately I find no evidence that it is anything other than ANSI

Re: Debugger getting confused - any suggestions?

am 15.02.2007 18:23:26 von Nathan

In article ,
Griff wrote:
>The file is often one that hasn't been edited for some weeks. It
>would have the ReadOnly property set to TRUE. Restarting IIS then
>results in the file being correctly parsed without any change to the
>file on disc.

I'd recommend a scan for bad memory in your computer. Go to
http://www.memtest.org/ , download the .iso file, burn that to a CD,
and boot off of it. Let it run overnight, and see if it finds
anything.

Nathan Mates

--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein

Re: Debugger getting confused - any suggestions?

am 12.03.2007 11:57:10 von Griff

Nathan

I took your advice and yup - I had a memory problem. Memory duly swapped
and no sign of a problem, so thanks.

One thing to note - before booting from the ISO image you recommended, I
first downloaded a memory tester that works within Windows (obviously not as
thorough but quicker if it identifies the problem) from
http://hcidesign.com/memtest/ . It so happened that this identified the
memory problem immediately, so a bit of a short cut....

Griff