Thread overview
[Issue 3747] New: D application fails with error code "c0000096 privileged instruction" under Win 7 64 bit
Jan 28, 2010
Stefan Liebig
Jan 29, 2010
Witold Baryluk
Jan 29, 2010
Stefan Liebig
Jan 29, 2010
Stefan Liebig
Feb 06, 2011
Brad Roberts
[Issue 3747] (D1 only) D application fails with error code "c0000096 privileged instruction" under Win 7 64 bit
Feb 05, 2012
Yao Gomez
January 28, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3747

           Summary: D application fails with error code "c0000096
                    privileged instruction" under Win 7 64 bit
           Product: D
           Version: 1.031
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: StefanLiebig@web.de


--- Comment #0 from Stefan Liebig <StefanLiebig@web.de> 2010-01-28 02:56:57 PST ---
The D application running under Win7 64 bit fails when exiting. The error
details are:
Problemsignatur:
  Problemereignisname: APPCRASH
  Anwendungsname: smartclient.exe
  Anwendungsversion: 0.0.0.0
  Anwendungszeitstempel: 00000000
  Fehlermodulname: smartclient.exe
  Fehlermodulversion: 0.0.0.0
  Fehlermodulzeitstempel: 00000000
  Ausnahmecode: c0000096
  Ausnahmeoffset: 00016564
  Betriebsystemversion: 6.1.7600.2.0.0.256.4
  Gebietsschema-ID: 1031
  Zusatzinformation 1: 896c
  Zusatzinformation 2: 896c99b20f8de3f360d5bf94d04c29ea
  Zusatzinformation 3: 9b53
  Zusatzinformation 4: 9b53c73b99497297547530e8345d3867

(Sorry, for the German!)

I tried to narrow the location of the failure and I suppose that the error occurs within gc_term(). If I omit this call the application ends without problems.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 29, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3747


Witold Baryluk <baryluk@smp.if.uj.edu.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |baryluk@smp.if.uj.edu.pl


--- Comment #1 from Witold Baryluk <baryluk@smp.if.uj.edu.pl> 2010-01-28 21:18:12 PST ---
Why are you calling gc_term? It is function which shutdowns garbage collector (and deallocate everyobject). Doing it manually is really really wrong.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 29, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3747



--- Comment #2 from Stefan Liebig <StefanLiebig@web.de> 2010-01-28 21:59:16 PST ---
Hmm, but in the documentation (http://www.digitalmars.com/d/1.0/windows.html)
they do a call to gc_term() just before returning from WinMain().

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 29, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3747



--- Comment #3 from Stefan Liebig <StefanLiebig@web.de> 2010-01-28 23:30:56 PST ---
BTW, this crash only happens on Win 7 64-bit - not on Win 7 32-bit.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 06, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=3747


Brad Roberts <braddr@puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|x86_64                      |x86


--- Comment #4 from Brad Roberts <braddr@puremagic.com> 2011-02-06 15:39:17 PST ---
Mass migration of bugs marked as x86-64 to just x86.  The platform run on isn't what's relevant, it's if the app is a 32 or 64 bit app.

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


Yao Gomez <yao.gomez@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yao.gomez@gmail.com
            Version|1.031                       |D1
            Summary|D application fails with    |(D1 only) D application
                   |error code "c0000096        |fails with error code
                   |privileged instruction"     |"c0000096 privileged
                   |under Win 7 64 bit          |instruction" under Win 7 64
                   |                            |bit


--- Comment #5 from Yao Gomez <yao.gomez@gmail.com> 2012-02-05 13:49:51 PST ---
Marking this bug as D1 only, as the OP used the example from the D1 Windows page (http://www.digitalmars.com/d/1.0/windows.html). This example doesn't even compile with D2.

On a semi-related note, the example in the D2 Windows page (http://dlang.org/windows.html) compiles and links just fine. I'm using Windows 7 64-bit.

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