Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6229241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:32:00+00:00 2026-05-24T09:32:00+00:00

Program works fine (with random crashes) and Memory Validator reports Uninitialized read problem in

  • 0

Program works fine (with random crashes) and Memory Validator reports Uninitialized read problem in pD3D = Direct3DCreate9.
What could be the problem ?

init3D.h

    class CD3DWindow
    {
            public:
                CD3DWindow();
                ~CD3DWindow();
                LPDIRECT3D9 pD3D;
                HRESULT PreInitD3D();
                HWND hWnd;  
                bool killed;
                VOID KillD3DWindow();
    };

init3D.cpp

    CD3DWindow::CD3DWindow()
    {
        pD3D=NULL; 
    }

    CD3DWindow::~CD3DWindow()
    {
        if (!killed) KillD3DWindow();
    }

    HRESULT CD3DWindow::PreInitD3D()
    {
        pD3D = Direct3DCreate9( D3D_SDK_VERSION );  // Here it reports a problem 
        if( pD3D == NULL )  return E_FAIL;
    // Other not related code

    VOID CD3DWindow::KillD3DWindow()
    {
        if (killed) return;
        diwrap::input.UnCreate();   
        if (hWnd) DestroyWindow(hWnd);
        UnregisterClass( "D3D Window", wc.hInstance );
        killed = true;
    }

Inside main app .h

    CD3DWindow *d3dWin;

Inside main app .cpp

    d3dWin = new CD3DWindow;
d3dWin->PreInitD3D();

And here is the error report:

 Error: UNINITIALIZED READ: reading register ebx
@0:00:02.969 in thread 4092

 0x7c912a1f <ntdll.dll+0x12a1f> ntdll.dll!RtlUnicodeToMultiByteN

0x7e42d4c4 <USER32.dll+0x1d4c4> USER32.dll!WCSToMBEx

0x7e428b79 <USER32.dll+0x18b79> USER32.dll!EnumDisplayDevicesA

0x4fdfc8c7 <d3d9.dll+0x2c8c7> d3d9.dll!DebugSetLevel

0x4fdfa701 <d3d9.dll+0x2a701> d3d9.dll!D3DPERF_GetStatus

0x4fdfafad <d3d9.dll+0x2afad> d3d9.dll!Direct3DCreate9

0x00644c59 <Temp.exe+0x244c59> Temp.exe!CD3DWindow::PreInitD3D
c:\_work\Temp\initd3d.cpp:32   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:32:02+00:00Added an answer on May 24, 2026 at 9:32 am

    Edit: Your stack trace is very, very strange- inside the USER32.dll? That’s part of Windows.

    What I might suggest is that you’re linking the multi-byte Direct3D against the Unicode D3D libraries, or something like that. You shouldn’t be able to cause Windows functions to trigger an error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The example program below compiles two in-memory assemblies. The first compilation works fine. The
I have created Excel Sheet using Java program. It works fine. My problem is,
My program uses sqlite3 plus python. It works fine with python 2.6.2 I moved
I creating a program which send newsletter with a background image. It works fine
I'm trying to use MODI to OCR a window's program. It works fine for
I have a program where i18n is handled by gettext. The program works fine,
I'm working on a clone of the elfdump command. My program works fine when
My program needs to read chunks from a huge binary file with random access.
This is a pretty simple problem. Inserting data into the table normally works fine,
i am currently working on a program in jquery. My program works fine in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.