December 07, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #10 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2012-12-07 21:54:25 MSK ---
(In reply to comment #9)
> I don't quite understand the issue here. Why is it a problem that is searches for appropriate .pdb files?

Because the search may require hours for every thrown (cached or not) exception
(even in release build).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 07, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #11 from Benjamin Thaut <code@benjamin-thaut.de> 2012-12-07 11:42:05 PST ---
(In reply to comment #10)
> (In reply to comment #9)
> > I don't quite understand the issue here. Why is it a problem that is searches for appropriate .pdb files?
> 
> Because the search may require hours for every thrown (cached or not) exception
> (even in release build).

Are you sure? It should only search for the appropriate pdbs on the first throw.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 07, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #12 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-07 12:55:19 PST ---
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > I don't quite understand the issue here. Why is it a problem that is searches for appropriate .pdb files?
> > 
> > Because the search may require hours for every thrown (cached or not) exception
> > (even in release build).
> 
> Are you sure? It should only search for the appropriate pdbs on the first throw.

Yes we're sure. I can personally hear it scraping my hard drive for a dozen seconds before I get a stack trace.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 07, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #13 from Benjamin Thaut <code@benjamin-thaut.de> 2012-12-07 13:51:43 PST ---
I have a improved version of the stacktrace class at:

https://github.com/Ingrater/druntime/blob/master/src/core/sys/windows/stacktrace.d

It's more similar to the unix interface as you can first query a list of addresses and then resolve it later. This might fix the issue as the resolving of the symbols could be delayed until it actually needs to be printed instead resolving at throw time. I'm also no longer calling SymInitialize with NULL, so this should fix the other issue too.

I wanted to do a pull request for this soon, but I currently don't have time for it. So if it is super critical someone else might want to do it.

All the version(NOGCSAFE){...} parts can just be removed from the file.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 08, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #14 from Benjamin Thaut <code@benjamin-thaut.de> 2012-12-08 01:45:46 PST ---
This commit most likely broke things:

https://github.com/D-Programming-Language/druntime/commit/939da7743126c773636a721a33288ac9a92c641f

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #15 from Benjamin Thaut <code@benjamin-thaut.de> 2012-12-23 06:33:47 PST ---
I can not reproduce this. I even tried it on a windows XP machine with a very old version of dbghelp. What system did you run this on? Please post the version numbers of your dbghelp.dll and imagehlp.dll (in your Windows/System folder or Windows/sysWOW64 if you are using a x64 windows)

Kind Regards
Benjamin Thaut

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #16 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-23 06:48:59 PST ---
Created an attachment (id=1171)
procmon

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #17 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-23 06:49:31 PST ---
(In reply to comment #15)
> I can not reproduce this. I even tried it on a windows XP machine with a very old version of dbghelp. What system did you run this on? Please post the version numbers of your dbghelp.dll and imagehlp.dll (in your Windows/System folder or Windows/sysWOW64 if you are using a x64 windows)
> 
> Kind Regards
> Benjamin Thaut

---
import std.file;

void main()
{
    chdir(`C:\`);
    try
        // Let's serach the whole C: drive!
        throw new Exception("Ex");
    catch { }
}
---

I've added just a partial log of sysinternals process monitor with a filter on 'test.exe' from the above example.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #18 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-23 14:48:55 PST ---
(In reply to comment #17)
> Hi,
> did you use druntime version 2.060 to reproduce the issue or did you use the
> latest druntime from the git master branch?
> If you used the 2.060 version I think I know where the issue is.

git-head with git-druntime.

However I can recreate it with 2.060 dmd+druntime.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #19 from Benjamin Thaut <code@benjamin-thaut.de> 2012-12-23 15:19:25 PST ---
I have a possible fix at: https://github.com/Ingrater/druntime/tree/pull8936

As I can't reproduce the issue, I can't tell if this actually fixes the issue. It would be great if someone who can reproduce this, could check the fix and report the results.

Kind Regards
Benjamin Thaut

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------