|
Is this stepping over any call such as this, or is this a specific class's InitDialog() and CreateInstance() calls?
-dz
|
|
|
|
|
Seems to be any call like this, not restricted to specific classes, or specific API calls.
|
|
|
|
|
ok.. does it compile and run fine, and only crash when you are debuging?
could you give the top level code where you are actually overriding OnInitDialog and what line it is crashing.. because going that deep into the assembler means nothing to me
p.s. if it compiles and runs fine and is just messed up when you are debugging then im clueless
-dz
|
|
|
|
|
Yeah, it compiles and runs great normally, it just falls over when I try debugging.
It's not specifically overriding functions that causes problems, it's just calling them.
the assembly means nothing to me either, but I thought it might be a good clue for someone
|
|
|
|
|
moredip wrote:
the assembly means nothing to me either, but I thought it might be a good clue for someone
What is the line above the line. fs:[0000018] is the thread environment bock. Puzzling that it crashes there.
|
|
|
|
|
Are you using .dll ? Are you sure these are compatible with debug mode ? When you say it compiles and runs, is it in Debug or Release ?
~RaGE();
|
|
|
|
|
I'm using "MFC as static library". I think they're the standard debug libs, cos they worked fine until about a day ago - and no, I can't think of anything I changed.
It compiles and runs in Debug mode.
|
|
|
|
|
here's the function that fails:
BOOL DProjectLoader::OnInitDialog()
{
CDialog::OnInitDialog();
...
...
here's the call stack:
KERNEL32! 77e83a14()
CThreadSlotData::GetThreadValue(int 1) line 259 + 12 bytes
CThreadLocalObject::GetData(CNoTrackObject * (void)* 0x00564410 CThreadLocal<_AFX_THREAD_STATE>::CreateObject(void)) line 400 + 17 bytes
CThreadLocal<_AFX_THREAD_STATE>::GetData() line 173 + 13 bytes
CThreadLocal<_AFX_THREAD_STATE>::operator _AFX_THREAD_STATE *() line 183 + 15 bytes
AfxGetModuleState() line 235 + 10 bytes
AfxGetResourceHandle() line 22 + 11 bytes
CWnd::ExecuteDlgInit(const char * 0x000000bd) line 3248 + 5 bytes
CDialog::OnInitDialog() line 670 + 15 bytes
DProjectLoader::OnInitDialog() line 71
here's the assembly:
...
...
...
77E839EC pop eax
77E839ED ret
77E839EE or eax,0FFFFFFFFh
77E839F1 ret
77E839F2 mov eax,[7FFE0018]
77E839F7 mov edx,dword ptr ds:[7FFE0014h]
77E839FD cmp eax,dword ptr ds:[7FFE001Ch]
77E83A03 jne 77E839F2
77E83A05 mov ecx,dword ptr [esp+4]
77E83A09 mov dword ptr [ecx],edx
77E83A0B mov dword ptr [ecx+4],eax
77E83A0E ret 4
77E83A11 push ebp
77E83A12 mov ebp,esp
77E83A14 mov <---- eax,fs:[00000018]
77E83A1A mov ecx,dword ptr [ebp+8]
77E83A1D cmp ecx,40h
77E83A20 jae 77EB86EB
77E83A26 and dword ptr [eax+34h],0
77E83A2A mov eax,dword ptr [eax+ecx*4+0E10h]
77E83A31 pop ebp
77E83A32 ret 4
77E83A35 push ebp
...
...
...
|
|
|
|
|
Look like it's a debugger problem. What happens when you run the app and then attach to the debugger. Sometimes, that works.
|
|
|
|
|
um.... how do I attach to a running process
I'm embarrased to admit I've never learnt how to do that with VC++
|
|
|
|
|
1. Launch VC++ without your project open
2. Launch your app from explorer
3. In VC++ Select Build->Start Debug->Attach To Process
4. Open the file and put breakpoints it would work. Remember donot open the project
|
|
|
|
|
Thanks.
Well I can step through fine when I attach, using breakpoints and everything, just like you said. So I take it this has happened to you before?
Any solutions, other than attaching every time I want to debug?
Is this a bug in VC++?
Either way, thanks a lot for your help Rama, it would have taken me a long time to get to this stage on my own.
Thanks again,
Pete
|
|
|
|
|
I am not sure where the bug is in VC++ or some other libraries.
moredip wrote:
Any solutions, other than attaching every time I want to debug?
May be on some other machine it might work. I had worse problem when I was executing the app an oracle query failing but when I was running under debugger everything was fine. So I had to attach it and then debug.
|
|
|
|
|
It's wierd, cos it was working fine (for like 6 months) until the other day, when it just broke. And I can't work out why.
I may try reinstalling VS and see what happens.
|
|
|
|
|
Is it possible to have a base item in a menu have an ID and function associated with it?
ex. File, Edit, View, SayWoop
is it possible to click on SayWoop and have it do something, or do i need to look into putting a CButton into the Menu?
thanks!
-dz
|
|
|
|
|
This is a rather bad solution, but it works (if you use MFC)
Just register a windows message in the system message range with
#define IDM_MYMESSAGE 0x0011 in resource.h)
Then add this to your menu
pMenu->AppendMenu(MF_STRING, IDM_MYMESSAGE, "SayWoop");
Put this in your Message Map (in MyDlg.cpp, where MyDlg is your dialog)
ON_MESSAGE(IDM_MYMESSAGE, OnSayWoop)
and this in your MyDlg.h
afx_msg void OnSayWoop();
and then declare your function
void MyDlg::OnSayWoop()
{
blah blah
}
and then OnSayWoop() is done each time you choose OnSayWoop in the menu.
Well, i´m not pretty proud of this one, but it should work
~RaGE();
|
|
|
|
|
Hello everybody:
I have something weird happening when in a CFileDialog object that I create. From a menu, I choose a command that brings up a Open File dialog. The weird thing is happening when I click the File Type pull down where it says Executable Files (*.exe)|*.exe I able to see in the list the Executable Files (*.exe)|*.exe and under that some garbage. I just want that Open File dialog to have just 1 option (Executable Files (*.exe)|*.exe). This is the code that I have so far:
////////////////////////////////////////////////////////
static char szFilter[] = "Executable Files (*.exe)|*.exe";
CFileDialog openDialog(TRUE,NULL, NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter);
//Set the title of the dialog.
CString sTitle;
VERIFY(sTitle.LoadString(IDS_OPEN_WITH));
openDialog.m_ofn.lpstrTitle = sTitle;
int nResult = openDialog.DoModal();
if(IDCANCEL==nResult) return;
////////////////////////////////////////////////////////
Is there something that I need to do to correct this problem? I have a screenshot with the problem but I didn't saw anything in this forum that I can post images. Any answer is more than welcome.
Best regards,
Luis E.
Luis E. Cuadrado
)
|
|
|
|
|
You forgot to append two '|' characters at the end of the string
static char szFilter[] = "Executable Files (*.exe)|*.exe||";
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Ooppsss, I didn't notice that. I put the two "||" and it works. Thank you very much Tomasz for all your help.
Have a nice day,
Luis E. Cuadrado
)
|
|
|
|
|
I use graphics.DrawImage to display a bitmap of 12000 * 8000 pixels (aerial photo).
It is painfully slow on a Pentium 700 Mhz with 512 MB.
But the real problem is : when I zoom on a portion of the bitmap (by setting the parameters of DrawImage to expand for example a portion of 500 * 500 pixels on the whole screen), DrawImage doesn't display anything and immediately returns a status OutOfMemory. Including virtual memory, more than 1 GB is available, but GDI+ doesn't seem to use it (no disk activity). It seems that GDI+ try to allocate memory as if it had to draw the whole bitmap with the same expansion factor, although I just want to display 500 * 500 pixels !
Is there a way to use GDI+ for REAL work ?
JPG
|
|
|
|
|
Anyone knows how the MultiFile Source Filter is replaced in DirectShow 8.1?
I want to merge 2 mediafiles together BEFORE they are decompressed. I've already done this a while ago, in an old dx version (possible 6), but exploring the dx8 docs returns nothing on multiple sources.
Is it left out, or is it replaced by something else (and perhaps better)?
Tnx...
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
If you are talking about compressed AVI then I believe you could use the AVI Mux on compressed streams.
I'm not sure about other media types.
HTH,
Pete
|
|
|
|
|
That's not the problem.
If you add some sourcefilters to that mux, and write it to a file, you get 2 videowindows when trying to watch it. That's nice, 2 windows, but not what I need
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
afaik you have to manually build a graph.
For playback, open with file reader, connect to AVI Splitter, then chose the correct vid stream pin. connect that to a colour space converter(optional), then to a video renderer.
< LAME ASCII DIAGRAM >
| AVI |---o wrong vid stream
|FILE|-->|SPLITTER|---o--------------------->|CLR CoNV|--->|RENDERER|
| |---o wrong vid stream
</LAME ASCII DIAGRAM>
HTH,
Pete
|
|
|
|
|
And what if the 2 clips have the same type, use the same filters? Can I disconnect the first filesource-filter after completion and connect another one to the same avi-splitter?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|