[Issue 2978] Unhandled win32 exception on successful exe compilation

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2978

Andrei Alexandrescu  changed:

   What|Removed |Added

Version|2.027   |D2

--


[Issue 2978] Unhandled win32 exception on successful exe compilation

2009-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2978


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #9 from Walter Bright   2009-07-09 
18:43:53 PDT ---
I believe this was fixed in dmd 1.046 and 2.031. Reopen if not.

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


[Issue 2978] Unhandled win32 exception on successful exe compilation

2009-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2978


Brad Roberts  changed:

   What|Removed |Added

 CC||bra...@puremagic.com




--- Comment #8 from Brad Roberts   2009-07-09 17:08:13 
PDT ---
Can you reproduce this with 2.031?  Walter fixed a bug that might well be
related in that release.

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


[Issue 2978] Unhandled win32 exception on successful exe compilation

2009-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2978





--- Comment #7 from Rob Jacques   2009-07-09 08:31:30 PDT ---
(In reply to comment #6)
> Could this be the same as the random OPTLINK crash on multi-core machines? It
> sounds pretty similar. Check if it still fails in 1.046 and 2.031.

Actually, I tried the optlink patch when it came out, and that didn't seem to
fix it. However, I haven't had a crash on valid code happen in 2.031, so it's
probably fixed, for the most part. Since this has been a stochastic problem, I
had been waiting to see if it just got less frequent or has disappeared, before
making a comment. Since it appears to be fixed, thanks!

Note:
I did run into a few crashes on invalid code (stuff to do with the new integer
rules) when porting my personal branch of DFL (since the main trunk is a few
revs behind). But that's probably a different bug.

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


[Issue 2978] Unhandled win32 exception on successful exe compilation

2009-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2978





--- Comment #6 from Don   2009-07-09 06:54:13 PDT ---
Could this be the same as the random OPTLINK crash on multi-core machines? It
sounds pretty similar. Check if it still fails in 1.046 and 2.031.

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


[Issue 2978] Unhandled win32 exception on successful exe compilation

2009-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2978





--- Comment #5 from Rob Jacques   2009-06-05 20:46:31 PDT ---
Thanks Don.
Error appears to occur at line 1000 of root.c in function int File::read().
...
#elif _WIN32
DWORD size;
DWORD numread;
HANDLE h;
int result = 0;
char *name;

name = this->name->toChars();
004F69D6  mov eax,dword ptr [this] 
Break-> 004F69D9  mov ecx,dword ptr [eax+14h] 

Watch reports 'this' is null.
Unhandled memory exception at 0x0014 (null+14)
--Call Stack--
>   dmd.exe!File::read()()  Line 1000 + 0x3 bytes   C++
 dmd.exe!startthread()  Line 104 + 0x7 bytesC++
 dmd.exe!___threadstar...@4()  + 0x1d bytes
 ntdll.dll!774e19bb() 
 [Frames below may be incorrect and/or missing, no symbols loaded for
ntdll.dll]
 ntdll.dll!774e198e() 

-- Output --
'dmd.exe': Loaded 'C:\dmd\windows\bin\dmd.exe', Symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\ntdll.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\kernel32.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\shell32.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\msvcrt.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\gdi32.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\user32.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\advapi32.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\shlwapi.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\imm32.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\msctf.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\lpk.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\usp10.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\avgrsstx.dll', No symbols loaded.
'dmd.exe': Loaded
'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6002.18005_none_5cb72f96088b0de0\comctl32.dll',
No symbols loaded.
'dmd.exe': Loaded 'C:\Windows\System32\apphelp.dll', No symbols loaded.
'dmd.exe': Loaded 'C:\Program Files\Common Files\LogiShrd\LVMVFM\LVPrcInj.dll',
No symbols loaded.
The thread 'Win32 Thread' (0x3a0c) has exited with code 0 (0x0).
Unhandled exception at 0x004f69d9 in dmd.exe: 0xC005: Access violation
reading location 0x0014.

-- Start Thread Call frame --
startthread::p0x00288cd8void *
-startthread::aw0x00288cd8 AsyncRead *
hThread0x5c6e6962void *
filesdim1969382724unsigned int
filesmax103unsigned int
-files0x00288ce4 FileData [1]
startthread::i0unsigned int
-startthread::f0x00288ce4FileData *

Error at Line 104 of async.c
unsigned __stdcall startthread(void *p)
{
AsyncRead *aw = (AsyncRead *)p;

for (size_t i = 0; i < aw->filesdim; i++)
{FileData *f = &aw->files[i];

f->result = f->file->read();


-- Main Call Stack (Location runLINK)--
 ntdll.dll!77505e74() 
 [Frames below may be incorrect and/or missing, no symbols loaded for
ntdll.dll]
 ntdll.dll!77505620() 
 kernel32.dll!76f19884() 
>   dmd.exe!RTLMultiPool::SelectFree()  + 0x1e bytes
 kernel32.dll!76f197f2() 
 dmd.exe!__exec()  + 0x16e bytes
 dmd.exe!__mbschr()  + 0x1a7 bytes
 dmd.exe!__mbschr()  + 0x2d4 bytes
 dmd.exe!__mbschr()  + 0x31e bytes
 dmd.exe!___spawn()  + 0xc4 bytes
 dmd.exe!runLINK()  Line 191 + 0xd bytesC++
 dmd.exe!main()  Line 1190 + 0x5 bytesC++
 dmd.exe!_mainCRTStartup()  + 0xa9 bytes
 kernel32.dll!76f1d0e9() 
 ntdll.dll!774e19bb() 
 ntdll.dll!774e198e()

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


[Issue 2978] Unhandled win32 exception on successful exe compilation

2009-06-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2978


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au




--- Comment #4 from Don   2009-06-02 22:52:58 PDT ---
(In reply to comment #3)
> (In reply to comment #2)
> > Try running dmd under windbg.exe and see where it fails.
> 
> I'm not well versed in non-symbolic debugging

You don't need to be. 

>, but I've included the output
> from several runs, since the exit code was changing. Is there anything else I
> should try?

Compile a debug build of DMD:

c:\dmd\src\dmd> make -fwin32.mak
c:\dmd\src\dmd> copy dmd.exe c:\dmd\windows\bin

Then run dmd under windbg.

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


[Issue 2978] Unhandled win32 exception on successful exe compilation

2009-05-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2978





--- Comment #3 from Rob Jacques   2009-05-15 17:55:53 PDT ---
(In reply to comment #2)
> Try running dmd under windbg.exe and see where it fails.

I'm not well versed in non-symbolic debugging, but I've included the output
from several runs, since the exit code was changing. Is there anything else I
should try?

DMD 2 Tests

Thread Create:  Process=0, Thread=0
Module Load: C:\Windows\system32\NTDLL.DLL  (symbol loading deferred)
Thread Create:  Process=0, Thread=1
Module Load: C:\WINDOWS\SYSTEM32\KERNEL32.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\SHELL32.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\MSVCRT.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\GDI32.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\USER32.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\ADVAPI32.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\RPCRT4.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\SHLWAPI.DLL  (symbol loading deferred)
Module Load: C:\Windows\system32\NTDLL.DLL  (no symbols loaded)
Module Load: C:\WINDOWS\SYSTEM32\IMM32.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\MSCTF.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\LPK.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\USP10.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\AVGRSSTX.DLL  (symbol loading deferred)
Module Load:
C:\WINDOWS\WINSXS\X86_MICROSOFT.WINDOWS.COMMON-CONTROLS_6595B64144CCF1DF_6.0.6001.18000_NONE_5CDBAA5A083979CC\COMCTL32.DLL
  (symbol loading deferred)
Module Load: C:\DMD\WINDOWS\BIN\DMD.EXE  (no symbols loaded)
Module Load: C:\PROGRAM FILES\COMMON FILES\LOGISHRD\LVMVFM\LVPRCINJ.DLL 
(symbol loading deferred)
Thread Create:  Process=0, Thread=2
Thread Terminate:  Process=0, Thread=1, Exit Code=1900544
First chance exception c005 (Unknown) occurred
Thread stopped.

VS Debugger:
Unhandled exception at 0x004d5479 in dmd.exe: 0xC005: Access violation
reading location 0x0014.
004D5479  mov ecx,dword ptr [ebx+14h] 

Thread Create:  Process=0, Thread=1
[snip ...]
Module Load: C:\DMD\WINDOWS\BIN\DMD.EXE  (no symbols loaded)
Module Load: C:\PROGRAM FILES\COMMON FILES\LOGISHRD\LVMVFM\LVPRCINJ.DLL 
(symbol loading deferred)
Thread Create:  Process=0, Thread=2
First chance exception c005 (Unknown) occurred
Thread stopped.

ASM view
0x004d5479 8b4b14   mov ecx,dword ptr [ebx+14]

[snip...]
Module Load: C:\DMD\WINDOWS\BIN\DMD.EXE  (no symbols loaded)
Module Load: C:\PROGRAM FILES\COMMON FILES\LOGISHRD\LVMVFM\LVPRCINJ.DLL 
(symbol loading deferred)
Thread Terminate:  Process=0, Thread=1, Exit Code=1966080
Thread Create:  Process=0, Thread=2
First chance exception c005 (Unknown) occurred
Thread stopped.

[snip...]
Module Load: C:\DMD\WINDOWS\BIN\DMD.EXE  (no symbols loaded)
Module Load: C:\PROGRAM FILES\COMMON FILES\LOGISHRD\LVMVFM\LVPRCINJ.DLL 
(symbol loading deferred)
Thread Create:  Process=0, Thread=2
Thread Terminate:  Process=0, Thread=1, Exit Code=4063232
First chance exception c005 (Unknown) occurred
Thread stopped.

Module Load: C:\PROGRAM FILES\COMMON FILES\LOGISHRD\LVMVFM\LVPRCINJ.DLL 
(symbol loading deferred)
Thread Create:  Process=0, Thread=2
Thread Terminate:  Process=0, Thread=1, Exit Code=9175040
First chance exception c005 (Unknown) occurred
Thread stopped.

Module Load: C:\DMD\WINDOWS\BIN\DMD.EXE  (no symbols loaded)
Module Load: C:\PROGRAM FILES\COMMON FILES\LOGISHRD\LVMVFM\LVPRCINJ.DLL 
(symbol loading deferred)
Thread Create:  Process=0, Thread=2
Thread Terminate:  Process=0, Thread=1, Exit Code=3997696
First chance exception c005 (Unknown) occurred
Thread stopped.

DMD 1 tests
Often terminates with status -1073741819, but with no unhandled exception. I've
also used the latest D1 on a P4 a few times and haven't seen any errors yet.
I couldn't get a simple test case to error in windbg, but I could get something
from the VS debugger if I ran dmd twice in very quick succession

Unhandled exception at 0x004c55ed in dmd.exe: 0xC005: Access violation
reading location 0x0014.

004C55ED  mov ecx,dword ptr [ebx+14h] 


More D2 tests
-First run-

Module Load: C:\DMD\WINDOWS\BIN\DMD.EXE  (symbol loading deferred)
Thread Create:  Process=0, Thread=0
Module Load: C:\Windows\system32\NTDLL.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\KERNEL32.DLL  (symbol loading deferred)
Thread Create:  Process=0, Thread=1
Module Load: C:\Windows\system32\NTDLL.DLL  (no symbols loaded)
Module Load: C:\WINDOWS\SYSTEM32\SHELL32.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\MSVCRT.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\GDI32.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\USER32.DLL  (symbol loading deferred)
Module Load: C:\WINDOWS\SYSTEM32\ADVAPI32.DLL  (symbol loading deferred)
Modul

[Issue 2978] Unhandled win32 exception on successful exe compilation

2009-05-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2978





--- Comment #2 from Walter Bright   2009-05-15 
12:25:48 PDT ---
Try running dmd under windbg.exe and see where it fails.

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


[Issue 2978] Unhandled win32 exception on successful exe compilation

2009-05-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2978





--- Comment #1 from Rob Jacques   2009-05-13 22:40:17 PDT ---
(In reply to comment #0)
> DMD generates an unhandled win32 exception when successfully compiling an exe
> from a set of object files. It has occurred over a wide variety of code and on
> multiple systems (Core 2 duo, Corde 2 quad and AMD dual core) and OS (XP,
> Vista) and has also occurred with the command shell's is limited to a single
> processor. The error is stochastic, though is almost always generated and
> occurs both on file creation and overwrite. It appears to not happen on first
> use, but does happen on subsequent uses (i.e. it may occur only when the file
> system is warmed up). Only occurs with relative exe pathnames, not with
> absolute path names. 
> 
> Test cases derived from the Code::Blocks D program template
> 
> doesn't work
> dmd.exe bin\Release\HelloWord.exe  obj\Release\hello.obj
> 
> seemed to work on 2.029, but not 2.030
> dmd.exe bin\HelloWord.exe  obj\Release\hello.obj
> 
> works in 2.030
> dmd.exe HelloWord.exe  obj\Release\hello.obj
> 
> works
> dmd.exe c:\really\long\path\bin\HelloWord.exe  obj\Release\hello.obj

I spoke too soon. More test cases

dmd.exe HelloWord.exe  obj\Release\hello.obj obj\Release\b.obj
occationaly fails if the root directory is deep.

dmd.exe c:\dmd\Test.exe  obj\Release\hello.obj obj\Release\b.obj   dfl.lib 
Fails even if the root directory shallow. dfl.lib is located in
C:\dmd\windows\lib.

dmd.exe c:\dmd\HelloWord.exe  
fails if the root directory is long and many obj/lib files are included

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