Matthias Grumet wrote:
>>Please post the part of your code where you initialize and show the file
>>open dialog.
>
>
> OPENFILENAME ofn;
> char filename[256];
Hint: never use hardcoded array sizes. In that case, you should use the
MAX_PATH define.
> ZeroMemory(&ofn, sizeof(ofn));
> ofn.lStructSize = sizeof(ofn);
> ofn.hwndOwner = hWnd;
Make sure that window handle is valid.
> ofn.lpstrFile = filename;
> ofn.lpstrFile[0] = '\0';
I usually don't 'clear' the filename here, but in the initialization
like this:
char filename[MAX_PATH] = {0};
> ofn.nMaxFile = sizeof(filename);
> ofn.lpstrFilter = "set (*.xml)\0*.xml\0All files (*.*)\0*.*\0";
Since that string must be terminated by a double 0, you should set that
string to
ofn.lpstrFilter = "set (*.xml)\0*.xml\0All files (*.*)\0*.*\0\0";
just to be sure.
> ofn.nFilterIndex = 1;
> ofn.lpstrFileTitle = NULL;
> ofn.nMaxFileTitle = 0;
> ofn.lpstrInitialDir = NULL;
> ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST;
>
> if (GetOpenFileName(&ofn))
> openFile(ofn.lpstrFile);
Looks pretty normal.
>>Sure, but where's the stacktrace?
>
> is that what you mean?
>
> ntdll.dll!7c91eb94()
> ntdll.dll!7c91e9c0()
> kernel32.dll!7c8025db()
> kernel32.dll!7c8399f3()
> kernel32.dll!7c802542()
> nvoglnt.dll!696f5af1()
> nvoglnt.dll!695d834c()
> nvoglnt.dll!69700537()
> nvoglnt.dll!697005d2()
> nvoglnt.dll!697006d4()
> nvoglnt.dll!69700813()
> nvoglnt.dll!6970043c()
> nvoglnt.dll!696f5a25()
> nvoglnt.dll!696f7996()
> opengl32.dll!5f0ec506()
> opengl32.dll!5f0f6710()
> gdi32.dll!77f24b83()
>
>>ruleset.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInst=0x00000000, char * lpCmdLine=0x00000000, int nCmdShow=1) Line 727 + 0xd C++
>
> ruleset.exe!WinMainCRTStartup() Line 390 + 0x1b C
> kernel32.dll!7c816d4f()
> ntdll.dll!7c925b4f()
> kernel32.dll!7c8399f3()
Yes, that's the stacktrace.
So, according to that, the crash doesn't occur in your program directly
but in some API your program calls.
My guess is that you have a stack which is too small. That could also be
the reason why your program doesn't crash if the TSVN overlay handler
isn't loaded. Did you reduce your stack size from the 1MB default? If
yes, then please increase it.
We know of at least one program which had a stack size set to 64kBytes
and then would crash when opening a file-open dialog. Such small stack
sizes just aren't enough - they may be for your program only, but since
you don't know what stack the API's you call need, you must not reduce
that from the default value (the default is set to 1MB for a reason).
>>Well, it's definitely not a Tortoise bug. Think about it: your app is
>>not the only one using file open dialogs. Almost *every* application
>>does that. If TortoiseSVN really would have such a bug, they all would
>>crash too and that bug would have been found centuries ago.
>
> good point.
> sorry, but i suspected TSVN since this only happens on versioned files
> having one of the little icons and these *.so files are getting loaded
> when the tooltip appears.
As I mentioned above: check your program for stack overflows and heap
corruption.
> latest. (i think)
> TortoiseSVN 1.1.5, Build 2990, UNICODE
Yes, that's the latest released version.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sat Apr 30 17:56:31 2005