Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Page Members not initialized

Reply
Thread Tools

Page Members not initialized

 
 
kreissl@gmail.com
Guest
Posts: n/a
 
      04-04-2008
Hello,

i am really confused. I am working on a ASP.NET project. Language VB,
Framework 3.5. I want to describe the behavior:

Calling a page (including datagrid and a userctrl) I get zero pointer
exceptions. When start the project in debug mode I can see that all
members and fields of the page like Master and so on are all nothing,
including that ones that cannot be zero / nothing!

Now the weird thing: When I make a breakpoint (in my case in preinit)
all instances of the page are created fine and the page is loaded :/

Does anybody has heard of that problem? And I tried long to figure it
out, but the strange thing is that I did not work on that part of the
project. It was like from one day to the other day that that error
appeared. And its the same in release version. Also the designer shows
the page without errors and the partial designer class looks fine
too.

thanks for all hints,

Holger

 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      04-04-2008

Sorry but you will have to rephrase...
I can not make sence out of folowing statements that almost contradict each
other

1.
>"When start the project in debug mode I can see that all
> members and fields of the page like Master and so on are all nothing"


2.
>Now the weird thing: When I make a breakpoint (in my case in preinit)
> all instances of the page are created fine and the page is loaded :/



In case #1 how do you see all members and fields if you did not set
breakpoint? Page object initializes only when called (via browser) and
disposed immediatelly once HTML is rendered.
Hence you need to break somewere between those 2 events to see all members
and fields.

So pretty much behavior is expected given you can explain what you mean by
"I can see that all members and fields of the page ..." in #1...


George.


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> i am really confused. I am working on a ASP.NET project. Language VB,
> Framework 3.5. I want to describe the behavior:
>
> Calling a page (including datagrid and a userctrl) I get zero pointer
> exceptions. When start the project in debug mode I can see that all
> members and fields of the page like Master and so on are all nothing,
> including that ones that cannot be zero / nothing!
>
> Now the weird thing: When I make a breakpoint (in my case in preinit)
> all instances of the page are created fine and the page is loaded :/
>
> Does anybody has heard of that problem? And I tried long to figure it
> out, but the strange thing is that I did not work on that part of the
> project. It was like from one day to the other day that that error
> appeared. And its the same in release version. Also the designer shows
> the page without errors and the partial designer class looks fine
> too.
>
> thanks for all hints,
>
> Holger
>



 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      04-04-2008
The first thing I would do is run through all of the page events and make
sure you did not unwittingly destroy the page through code you added.

I would then step through the entire page (possibly even into the .NET code
(http://tinyurl.com/yqsokg)) and see where the values are getting munged.

Another option is to manually clear out the ASP.NET temporary files, found
under %WIN_DIR%/Microsoft .Net/Framework/v{version number}/Temporary ASP.NET
Files. If anything is munged there, please post back, as I have been
following issues with files here and informally cataloguing them (have
posted one bug based on them).

Worst case, exclude the page and set up a new page with the same code. You
can do this with a simple copy and paste operation. If this works, then .NET
is holding something somewhere.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> i am really confused. I am working on a ASP.NET project. Language VB,
> Framework 3.5. I want to describe the behavior:
>
> Calling a page (including datagrid and a userctrl) I get zero pointer
> exceptions. When start the project in debug mode I can see that all
> members and fields of the page like Master and so on are all nothing,
> including that ones that cannot be zero / nothing!
>
> Now the weird thing: When I make a breakpoint (in my case in preinit)
> all instances of the page are created fine and the page is loaded :/
>
> Does anybody has heard of that problem? And I tried long to figure it
> out, but the strange thing is that I did not work on that part of the
> project. It was like from one day to the other day that that error
> appeared. And its the same in release version. Also the designer shows
> the page without errors and the partial designer class looks fine
> too.
>
> thanks for all hints,
>
> Holger
>



 
Reply With Quote
 
kreissl@gmail.com
Guest
Posts: n/a
 
      04-04-2008
On 4 Apr., 17:53, "George Ter-Saakov" <(E-Mail Removed)> wrote:
> Sorry but you will have to rephrase...
> I can not make sence out of folowing statements that almost contradict each
> other


> In case #1 how do you see all members and fields if you did not set
> breakpoint? Page object initializes only when called (via browser) and
> disposed immediatelly once HTML is rendered.


Because the debugger fetches the exception an breaks at the first null
pointer exception.
In my code is that a usercontrol. There I can watch "me" and see that
all members including Master are not initialized...

ty holger

 
Reply With Quote
 
kreissl@gmail.com
Guest
Posts: n/a
 
      04-04-2008
On 4 Apr., 18:01, "Cowboy \(Gregory A. Beamer\)"
<(E-Mail Removed)> wrote:
> The first thing I would do is run through all of the page events and make
> sure you did not unwittingly destroy the page through code you added.
>
> I would then step through the entire page (possibly even into the .NET code
> (http://tinyurl.com/yqsokg)) and see where the values are getting munged.
>
> Another option is to manually clear out the ASP.NET temporary files, found
> under %WIN_DIR%/Microsoft .Net/Framework/v{version number}/Temporary ASP.NET
> Files. If anything is munged there, please post back, as I have been
> following issues with files here and informally cataloguing them (have
> posted one bug based on them).
>
> Worst case, exclude the page and set up a new page with the same code. You
> can do this with a simple copy and paste operation. If this works, then .NET
> is holding something somewhere.



Ty for the reply. The .NET debugger brought not much... Will try it
tomorrow again.
The 3.5 directory has no temporary folder. Maybe its located somewhere
else?
If nothing works I will have to make the page again.
holger
 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      04-05-2008
3.5 temp files under the 2.0 directory, as it is an add on to 2.0. Sorry for
not mentioning it.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On 4 Apr., 18:01, "Cowboy \(Gregory A. Beamer\)"
> <(E-Mail Removed)> wrote:
>> The first thing I would do is run through all of the page events and make
>> sure you did not unwittingly destroy the page through code you added.
>>
>> I would then step through the entire page (possibly even into the .NET
>> code
>> (http://tinyurl.com/yqsokg)) and see where the values are getting munged.
>>
>> Another option is to manually clear out the ASP.NET temporary files,
>> found
>> under %WIN_DIR%/Microsoft .Net/Framework/v{version number}/Temporary
>> ASP.NET
>> Files. If anything is munged there, please post back, as I have been
>> following issues with files here and informally cataloguing them (have
>> posted one bug based on them).
>>
>> Worst case, exclude the page and set up a new page with the same code.
>> You
>> can do this with a simple copy and paste operation. If this works, then
>> .NET
>> is holding something somewhere.

>
>
> Ty for the reply. The .NET debugger brought not much... Will try it
> tomorrow again.
> The 3.5 directory has no temporary folder. Maybe its located somewhere
> else?
> If nothing works I will have to make the page again.
> holger



 
Reply With Quote
 
kreissl@gmail.com
Guest
Posts: n/a
 
      04-06-2008
I have a working site know.. But i am not really happy.. I moved the
code from pre_init to page_load. Now it looks like the error is gone.
I tried to clear the temporary asp files and I created a new page...
That did not work. So it looks like that for some reason the page
doesnt init correct. I tried to debug it but that doesnt make really
sence, because like i said, when I breakpoint in pre_init everything
looks fine... Only when it runs without the breakpoint the objects
there are uninitialized and the exceptions are caused.

Than I am not sure if it has something to do with the clearing of the
asp temp folder or if its normal because of the new .net debugger
settings. I get tonns of first chance exceptions after first project
start (when webserver starts first time). The first comes in
mscorlib.dll!
System.Globalization.CultureTableRecord.CultureTab leRecord(string
cultureName, bool useUserOverride) Line 756: Culturename
"uploads" ???


A first chance exception of type 'System.Net.Sockets.SocketException'
occurred in System.dll
A first chance exception of type 'System.TypeLoadException' occurred
in System.Web.dll
'WebDev.WebServer.EXE' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL
\System.resources\2.0.0.0_de_b77a5c561934e089\Syst em.resources.dll'
A first chance exception of type 'System.TypeLoadException' occurred
in System.Web.dll
.... (about 100 times
A first chance exception of type 'System.TypeLoadException' occurred
in System.Web.dll
'WebDev.WebServer.EXE' (Managed): Loaded 'C:\Windows\Microsoft.NET
\Framework\v2.0.50727\Temporary ASP.NET Files\root
\dc083b87\b1353192\App_Web_ur8tsq9t.dll', Symbols loaded.
A first chance exception of type 'System.TypeLoadException' occurred
in System.Web.dll

When i break into such an exception its something like:

Type System.Web.UI.WebControls.WebParts.ContentPlaceHol der in Assembly
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a could not be loaded.
Type System.Web.UI.ContentPlaceHolder in der Assembly
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35 could not be loaded.
Type System.Web.UI.Image in der Assembly System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 ...

Maybe its a normal behavior and I can ignore it. But i am interessted
in the reasons for that...


Other Question: It doesnt save the symbols permanent. Should it? I
need to click Load Symbols every time, also when I still loaded it in
a previos session.

thanks a lot for all replys

holger
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are members of a c++ class initialized to 0 by the default constructor ? Skybuck Flying C++ 2 06-21-2011 02:33 PM
Static const integral data members can be initialized? Immortal Nephi C++ 15 07-23-2010 06:07 PM
Class members that MUST be initialized by temporary objects in amember initialization list Olumide C++ 4 12-09-2007 10:10 AM
Which members are created automatically, which members are not inherited? lovecreatesbeauty C Programming 43 02-06-2006 11:36 PM
Should pointer members be zero initialized by default? Steven T. Hatton C++ 4 08-27-2004 03:47 PM



Advertisments