BugCheck : PAGE_FAULT_IN_NONPAGED_AREA

hi, all
i am trying to read the Packet in NDIS IM driver (network\ndis\passthru)

when i call
NdisQueryPacket()

NdisQueryBuffer()

NdisMoveMemory(
lpBuffer,
&VirtualAddress[offset],
length);
and trying to print
DbgPrint(“buffer is %s\n”,lpBuffer);
i am getting the above BugCheck
i wanted to see all the 74 bytes of the packet.

waiting for your reply
thanks
/m


Get free email and a permanent address at http://www.netaddress.com/?N=1


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi there!

Just a hint, maybe this will work: check whether lpBuffer is valid - maybe
you’re writing beyond its boundaries. If you want do DbgPrint it, you should
zero the last byte, otherwise DbgPrint will continue scanning the string until
it finds a zero byte… Maybe DbgPrint tries to read from an area that does
not represent a valid address.

Greetings,
Alex

hi, all
i am trying to read the Packet in NDIS IM driver (network\ndis\passthru)

when i call

NdisQueryPacket()

NdisQueryBuffer()

NdisMoveMemory(
lpBuffer,
&VirtualAddress[offset],

length);
and trying to print
DbgPrint(“buffer is %s\n”,lpBuffer);
i am getting the above BugCheck
i wanted to see all the 74 bytes of the packet.

waiting for your reply
thanks
/m


Get free email and a permanent address at http://www.netaddress.com/?N=
1


You are currently subscribed to ntdev as: xxxxx@gmx.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

thanks Alexander
Validity means we need to allocate memory for lpBuffer ? or how to check
validity ?

Alexander Platonow wrote:
Hi there!

Just a hint, maybe this will work: check whether lpBuffer is valid - maybe
you’re writing beyond its boundaries. If you want do DbgPrint it, you should
zero the last byte, otherwise DbgPrint will continue scanning the string
until
it finds a zero byte… Maybe DbgPrint tries to read from an area that does
not represent a valid address.

Greetings,
Alex

> hi, all
> i am trying to read the Packet in NDIS IM driver (network\ndis\passthru)
>
> when i call
>
> NdisQueryPacket()
> …
> NdisQueryBuffer()
> …
> NdisMoveMemory(
> lpBuffer,
> &VirtualAddress[offset],
>
> length);
> and trying to print
> DbgPrint(“buffer is %s\n”,lpBuffer);
> i am getting the above BugCheck
> i wanted to see all the 74 bytes of the packet.
>
> waiting for your reply
> thanks
> /m
>
>
>
>
> Get free email and a permanent address at http://www.netaddress.com/?N=
> 1
>
> —
> You are currently subscribed to ntdev as: xxxxx@gmx.net
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


You are currently subscribed to ntdev as: xxxxx@usa.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


Get free email and a permanent address at http://www.netaddress.com/?N=1


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> ----------

From: shiva mallu[SMTP:xxxxx@usa.net]
Reply To: NT Developers Interest List
Sent: Friday, May 04, 2001 8:05 AM
To: NT Developers Interest List
Subject: [ntdev] BugCheck : PAGE_FAULT_IN_NONPAGED_AREA

hi, all
i am trying to read the Packet in NDIS IM driver (network\ndis\passthru)

when i call
NdisQueryPacket()

NdisQueryBuffer()

NdisMoveMemory(
lpBuffer,
&VirtualAddress[offset],
length);
and trying to print
DbgPrint(“buffer is %s\n”,lpBuffer);
i am getting the above BugCheck
i wanted to see all the 74 bytes of the packet.

What did you expect when tried to print packet as an ASCIIZ string? At
first, take debugger, step through and check lpBuffer value and memory area
addressed. To see if copied data are correct examine NDIS_PACKET structure
directly or use PACKET command if you’re using SoftICE from DS 2.x. At the
second, change debug print to print individual bytes up to data length.
Don’t cross buffer boundaries, trying to touch non-allocated memory causes
bugchecks as you had.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com