Click here to Skip to main content
15,922,145 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: sqaur root Pin
QuiJohn22-Oct-03 2:47
QuiJohn22-Oct-03 2:47 
General256 colors icon getting modified without a reason Pin
DaFrawg21-Oct-03 21:15
DaFrawg21-Oct-03 21:15 
GeneralRe: 256 colors icon getting modified without a reason Pin
Johnny ²21-Oct-03 21:44
Johnny ²21-Oct-03 21:44 
GeneralRe: 256 colors icon getting modified without a reason Pin
Atif Mushtaq22-Oct-03 20:16
Atif Mushtaq22-Oct-03 20:16 
GeneralRe: 256 colors icon getting modified without a reason Pin
DaFrawg27-Oct-03 1:53
DaFrawg27-Oct-03 1:53 
GeneralRe: Cbutton Pin
DaFrawg21-Oct-03 20:58
DaFrawg21-Oct-03 20:58 
GeneralTool Bar Pin
Neelesh K J Jain21-Oct-03 20:29
Neelesh K J Jain21-Oct-03 20:29 
GeneralRe: Tool Bar Pin
twing21-Oct-03 22:56
twing21-Oct-03 22:56 
Generalpostfix to infix Pin
ranjjj21-Oct-03 18:54
ranjjj21-Oct-03 18:54 
GeneralRe: postfix to infix Pin
David Crow22-Oct-03 2:33
David Crow22-Oct-03 2:33 
GeneralHelp w/ IPicture please Pin
Anonymous21-Oct-03 18:34
Anonymous21-Oct-03 18:34 
Generalassembly help Pin
Sirrius21-Oct-03 18:28
Sirrius21-Oct-03 18:28 
GeneralRe: assembly help Pin
ZoogieZork22-Oct-03 1:53
ZoogieZork22-Oct-03 1:53 
Generalcharacter set conversion(UTF8 and UCS2) Pin
convert_sg21-Oct-03 17:03
convert_sg21-Oct-03 17:03 
GeneralRe: character set conversion(UTF8 and UCS2) Pin
Joe Woodbury21-Oct-03 17:58
professionalJoe Woodbury21-Oct-03 17:58 
GeneralRe: character set conversion(UTF8 and UCS2) Pin
convert_sg21-Oct-03 19:03
convert_sg21-Oct-03 19:03 
Questionhow can i reach the same result in vc++? Pin
Habbit21-Oct-03 16:31
Habbit21-Oct-03 16:31 
AnswerRe: how can i reach the same result in vc++? Pin
David Crow21-Oct-03 16:51
David Crow21-Oct-03 16:51 
Generalthanks Pin
Habbit21-Oct-03 16:55
Habbit21-Oct-03 16:55 
GeneralRe: how can i reach the same result in vc++? Pin
includeh1022-Oct-03 4:49
includeh1022-Oct-03 4:49 
GeneralRe: how can i reach the same result in vc++? Pin
David Crow22-Oct-03 5:10
David Crow22-Oct-03 5:10 
GeneralDisable Auto Bitmap Scroll in CScrollView Pin
Swinefeaster21-Oct-03 15:45
Swinefeaster21-Oct-03 15:45 
GeneralRe: Disable Auto Bitmap Scroll in CScrollView Pin
John R. Shaw22-Oct-03 3:53
John R. Shaw22-Oct-03 3:53 
GeneralRe: Disable Auto Bitmap Scroll in CScrollView Pin
Swinefeaster22-Oct-03 7:15
Swinefeaster22-Oct-03 7:15 
GeneralEXCEPTION_ACCESS_VIOLATION Pin
John R. Shaw21-Oct-03 15:05
John R. Shaw21-Oct-03 15:05 
Below you will find a partial copy of the trace output from the code I am currently
working on. The "|" indicate the depth (scope) of th call, "->" indicate of function call, "<-" indicates a return from the function call, and "=" at the right indicate the value returned by the call or the result of a library function call.

Note: If you have a copy of Jeffrey Richters' Book "Programming Applications of Microsoft
Winodows'" then you might have some understanding of my problem here.

According to the book this should not be causing an EXCEPTION_ACCESS_VIOLATION.
But I would like to note that if I ignore the violation then the next allocation made with new (or malloc()) causes the EXCEPTION_ACCESS_VIOLATION "Attempt to WRITE data at address 00555555" instead of "Attempt to WRITE data at address 00414141". Therefore, I tend to beleive the address may be bogus (Windows internal thing). If I allocate using GlobalAllocate() or LocalAllocate() the the assess violation occurs at the next allocation made with new.

I would also like to point out that this only occurs on the second time the high level funtion (not shown) is called.

Questions:
Has any body seen this behavior before?
Has any body any idea what could be causing this to happen.

| |->CExBitmap::CExBitmap()
| |<- CExBitmap::CExBitmap()
| | CreateCompatibleBitmap(dcDest, 220, 240) = TRUE
| |-> CDibData::CDibData()
| |<- CDibData::CDibData()
| |-> CreateDIB(pBitmap, FALSE)
| | |-> CreateBitmapInfo(pBitmap, 0012EFFC)
| | |<- CreateBitmapInfo() = 020F0198
| | | new BYTE[53864] : EXCEPTION_ACCESS_VIOLATION
| | | ExceptionCode = 0xC0000005
| | | ExceptionFlags = 0x00000000
| | | ExceptionAddress = 0x77F596CF
| | | NumberParameters = 0x00000002
| | | ExceptionInformation[0] = 0x00000001
| | | ExceptionInformation[1] = 0x00414141
| | | Attempt to WRITE data at address 00414141
| | | BaseAddress = 00414000
| | | AllocationBase = 00400000
| | | AllocationProtect = PAGE_EXECUTE_WRITECOPY
First-chance exception in SPaint.exe (NTDLL.DLL): 0xC0000005: Access Violation.
First-chance exception in SPaint.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
| | | "There is nothing you can do to this region to raise an
| | | access violation. Attempt to write to memory in this
| | | page cause the system to give the process its own
| | | private copy of the page (backed by the paging file)."
| | | RegionSize = 188416
| | | State = MEM_COMMIT
| | | Protect = 32
| | | Type = MEM_IMAGE


INTP

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.