-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
diesel_cli commands give access violation error on Windows 10 #2167
Comments
Compiling
|
Ok that seems strange.
The only possibility to reach that code state shown in the stack trace is by failing to establish a connection here, so something may be wrong with your That written: We should not segfault in such cases. I'm not sure if the right fix is to guard from null pointers in |
I'm getting bogus and spurious values for
There is something quite bizarre happening - If I execute diesel_cli via However |
EDIT: This seems to be solely a linking error, or something wrong with the vcpkg generated library. Linking against |
Probably #813 is related here? |
According to the comment above that seemed to be a linker issue. |
Setup
Versions
Feature Flags
Problem Description
Attempting to run
diesel setup
,diesel migration run
, or other commands results in a silent exit.$LASTEXITCODE
gives an answer of-1073741819
, or0xC0000005
in hex, which is Window'sSTATUS_ACCESS_VIOLATION
code.The
diesel
executable itself operates properly if no database connection needs to be made - it can generate a migration folder and output help information, etc.Attempting to use a build script to perform migrations results in
(exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
No changes to the database have been made after running these commands.
HOWEVER, Using the diesel crate, code (from demo) can successfully connect to and manipulate the Postgres database, after manually setting up the database schema, since migrations are not working. This verifies that all of the DLLs are in place, and environment variables are properly set.
What are you trying to accomplish?
Trying to follow the https://diesel.rs/guides/getting-started/ guide
What is the expected output?
Expect that database should be altered.
What is the actual output?
No output. Silent exit with access code violation
Are you seeing any additional errors?
$LASTEXITCODE
gives an answer of-1073741819
, or0xC0000005
in hex, which is Window's ACCESS VIOLATION code.Steps to reproduce
$env:PQ_LIB_DIR = "C:\Program Files\PostgreSQL\11\lib"
$env:VCPKGRS_DYNAMIC=1
C:\Program Files\PostgreSQL\11\lib
is added to path (along with vcpkg install)cargo install diesel_cli --no-default-features --features postgres,sqlite
diesel.exe --help
DATABASE_URL
environment variable - same one is used for working codeChecklist
closed if this is not the case)
The text was updated successfully, but these errors were encountered: