D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3747 - (D1 only) D application fails with error code "c0000096 privileged instruction" under Win 7 64 bit
Summary: (D1 only) D application fails with error code "c0000096 privileged instructio...
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-28 02:56 UTC by Stefan Liebig
Modified: 2018-10-19 04:44 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Stefan Liebig 2010-01-28 02:56:57 UTC
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.
Comment 1 Witold Baryluk 2010-01-28 21:18:12 UTC
Why are you calling gc_term? It is function which shutdowns garbage collector (and deallocate everyobject). Doing it manually is really really wrong.
Comment 2 Stefan Liebig 2010-01-28 21:59:16 UTC
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().
Comment 3 Stefan Liebig 2010-01-28 23:30:56 UTC
BTW, this crash only happens on Win 7 64-bit - not on Win 7 32-bit.
Comment 4 Brad Roberts 2011-02-06 15:39:17 UTC
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.
Comment 5 Yao Gomez 2012-02-05 13:49:51 UTC
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.
Comment 6 Mathias LANG 2018-10-19 04:44:44 UTC
Since this is Windows and D1 only, it's 100% unsupported and unused nowadays. Closing.