SQL Server Local DB 2014 Fails to start when called from program with "Launcher" in the filename

0

The title of the post kind of says it all, but here is my procedure to replicate:

  1. running this on 32 bit Windows 10 build 1607, not sure the windows build matters, but I think 32 bit does
  2. Install SQL Server Local DB 2014 32 bit
  3. Create a new test DB using the command prompt:

    SqlLocalDB create testdb
    SqlLocalDB start testdb
    SqlLocalDB stop testdb

  4. Create a new .Net 4.7 Console app name it anything other than Launcher and populate the main method with:

    System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; startInfo.FileName = @"C:\Program Files\Microsoft SQL Server\120\Tools\Binn\SQlLocalDB.exe"; startInfo.Arguments = "start testdb"; process.StartInfo = startInfo; process.Start(); process.WaitForExit();

  5. Run the app, it should start the db, you can check in the console with:

    SqlLocalDB info testdb

  6. Stop the DB with:

    SqlLocalDB stop testdb

  7. Change the name of the Assembly Name of the console app to Launcher and re-build/re-run the app

After making the change I get a pop-up error from sqlservr.exe saying: "The application was unable to start correctly (0xc0000142). Click OK to close the application.

Checking the event log I see this matched to the error:

Windows API call WaitForMultipleObjects returned error code: 575. Windows system error message is: {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application. Reported at line: 3728

I have found the name of the executable just needs to include Launcher for the issue to occur, and you don't need to go back and re-compile to produce the error, just renaming the executable file name does it.

A "solution" is just to rename the executable but that is some strong magic wand programming and there must be some actual cause behind all this, but I have yet to find one.

.net
localdb
asked on Stack Overflow Dec 20, 2017 by lostatredrock

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0