Stumped on app startup error 0xc0000142

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

On seemingly random user systems, a few get this windows error 0xc0000142 on startup of my standalone app.

The message says "This application failed to initialize properly" but windows header files suggest it's more specifically dll-related i.e. "#define STATUS_DLL_INIT_FAILED 0xc0000142"

Now, using Dependency Walker to check if executable dependencies are satisfied, there's no reported issue loading the auxiliary dll.

There's no pattern of Windows OS, cpu, or other configuration I can identify and I haven't been able to reproduce the problem on several test machines, from XP to Windows 8.

Is there any other way to track down the cause of this error? It's a showstopper for many.


Cheers
Image

Post

Maybe it's a missing MSVC runtime library, in case you are using dynamic linking? Many applications install the relevant redistributables automatically as part of their installers, so many people will have it available .. which would explain the lack of "pattern" (except there would be a pattern, just a fairly well-hidden one).

Post

Ah I forgot to mention - that was my first thought and I ruled that out too. Their installing the vs10 redistributable doesn't help :(

I statically link all the c++ stuff just for the saved headaches.

Hypothetically I would expect if it needed one of the msvc**100.dll's it'd show up in the dependency walker too? Not sure if I can trust it now.
Image

Post

DavenH wrote:Ah I forgot to mention - that was my first thought and I ruled that out too. Their installing the vs10 redistributable doesn't help :(

I statically link all the c++ stuff just for the saved headaches.

Hypothetically I would expect if it needed one of the msvc**100.dll's it'd show up in the dependency walker too? Not sure if I can trust it now.
Yeah, depends.exe should show those. Just figured they'd resolve fine on any systems where they were installed. I guess you aren't using anything "weird" like custom EXE headers/loaders/packers, etc?

Post

mystran wrote: Yeah, depends.exe should show those. Just figured they'd resolve fine on any systems where they were installed. I guess you aren't using anything "weird" like custom EXE headers/loaders/packers, etc?
Correct, it's all pretty vanilla. The plugin version does have a delay-loaded dll but not the standalone, which just needs the dll in the same directory.

Another thing I thought it could be is antivirus programs quarantining the dll or something - this one time BitDefender was quarantining one of my exe's as it was linking lol - but apparently turning them off isn't a solution.
Image

Post

edit:

Got it fixed. The initialization in DllMain was returning false for some unforeseen conditions.

Post Reply

Return to “DSP and Plugin Development”