Skip to content
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

(Windows 10) Crash on wake from sleep: memory access error #1853

Closed
taleinat opened this issue Apr 17, 2018 · 6 comments
Closed

(Windows 10) Crash on wake from sleep: memory access error #1853

taleinat opened this issue Apr 17, 2018 · 6 comments
Assignees

Comments

@taleinat
Copy link

Expected Behavior

When putting the PC to sleep and then waking it, the application should remain running.

Current Behavior

When waking the PC from sleep I consistently have the app crash. See attached screenshot for the error message.
keepasserror

Possible Solution

This this is easily reproducible on my machine and I am a programmer, I'd be happy to help pinpointing the source of the error, with specific guidance as to the steps to take.

Steps to Reproduce (for bugs)

  1. Run KeePassXC on Windows 10
  2. Open a DB
  3. Put the PC to sleep
  4. Wake the PC from sleep
  5. On the lock screen, the attached memory error message appears

Context

I use a laptop for my development work, which I put to sleep and awake many times over each work day. Needing to restart KeePassXC and enter my master DB password is unnecessarily time-consuming, to the point of considering alternative solutions.

Debug Info

KeePassXC - Version 2.3.1
Revision: 2fcaeea

Libraries:

  • Qt 5.10.1
  • libgcrypt 1.8.2

Operating system: Windows 10 (10.0)
CPU architecture: x86_64
Kernel: winnt 10.0.16299

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Legacy Browser Integration (KeePassHTTP)
  • SSH Agent
  • YubiKey
@alensiljak
Copy link

alensiljak commented Apr 17, 2018

I have the same but does not happen every time. Today it is particualrly well-behaved and does not crash.
Otherwise, the crash happens on the login page where I have to enter the PIN to get back into the session.

Edit: In light of other comments, auto-lock is also set to happen when locking the workstation.

@YarnSphere
Copy link

I get the same error when the database auto-locks itself after the set time.

@droidmonkey
Copy link
Member

droidmonkey commented Apr 17, 2018

Please run it in a debugger and reproduce the crash. I use kpxc in this exact same scenario and never experience a crash in resume or unlock. It might be something unique in your config and or database that is causing it.

@YarnSphere
Copy link

YarnSphere commented Apr 27, 2018

Hey @droidmonkey, sorry for the late reply.

I consistently run into the error with the following steps (I'm not sure whether the issue is the same as the original one, but since I also get a memory error, I assume it's due to the auto-locking):

  • PC turns on, auto-starts KeePassXC
  • Press Ctrl+Alt+I to auto-type into a login form in the browser
  • After the set auto-lock time passes (10 minutes in my case), KeePassXC crashes with a memory error

Please guide me on how to debug the error, I'll be happy to assist.

In the meantime, in case it helps, this is my keepassxc.ini file:

[General]
ShowToolbar=true
LastDir=HIDDEN
LastDatabases=HIDDEN
LastKeyFiles=HIDDEN
LastChallengeResponse=HIDDEN
LastOpenedDatabases=HIDDEN
RememberLastDatabases=true
RememberLastKeyFiles=true
OpenPreviousDatabasesOnStartup=true
AutoSaveAfterEveryChange=false
AutoSaveOnExit=false
AutoReloadOnChange=true
MinimizeOnCopy=false
UseGroupIconOnEntryCreation=true
IgnoreGroupExpansion=false
AutoTypeEntryTitleMatch=true
GlobalAutoTypeKey=73
GlobalAutoTypeModifiers=201326592
SingleInstance=true
AutoTypeDelay=25
BackupBeforeSave=false
UseAtomicSaves=false
AutoTypeEntryURLMatch=true
SSHAgent=false
LastAttachmentDir=HIDDEN

[GUI]
MainWindowGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\x2\x1c\0\0\0\x92\0\0\x5:\0\0\x3\x91\0\0\x2$\0\0\0\xb1\0\0\x5\x32\0\0\x3\x89\0\0\0\0\0\0\0\0\a\x80)
SplitterState=175, 602
EntryListColumnSizes=150, 150, 300
EntrySearchColumnSizes=@Invalid()
Language=system
ShowTrayIcon=true
MinimizeToTray=true
MinimizeOnClose=true
MinimizeOnStartup=true
AutoTypeSelectDialogSize=@Size(400 250)
DetailSplitterState=@Invalid()
HideUsernames=false
HidePasswords=true
ListViewState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x1\x1\0\0\0\0\0\0\0\0\0\0\0\f\x1\0\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\x4Z\0\0\0\f\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\0\0\0\x18\0\0\0\x81\0\0\0\0\0\0\0\f\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x9d\0\0\0\x1\0\0\0\0\0\0\0\x85\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x18\0\0\0\x1\0\0\0\x2\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\x3\xe8\x1\0\0\0\x64)
SearchViewState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x4\xbe\0\0\0\f\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\0\0\0\x18\0\0\0\x81\0\0\0\0\0\0\0\f\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x9d\0\0\0\x1\0\0\0\0\0\0\0\x85\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x18\0\0\0\x1\0\0\0\x2\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\x3\xe8\x1\0\0\0\x64)
HideDetailsView=false
DarkTrayIcon=false

[security]
autotypeask=true
clearclipboard=true
clearclipboardtimeout=15
lockdatabaseidle=true
lockdatabaseidlesec=600
lockdatabaseminimize=false
lockdatabasescreenlock=true
passwordscleartext=false
passwordsrepeat=true
IconDownloadFallbackToGoogle=false
relockautotype=false
hidepassworddetails=true
hidenotes=false

[Http]
Enabled=false
ShowNotification=true
BestMatchOnly=false
UnlockDatabase=true
MatchUrlScheme=true
SortByUsername=false
Port=19455
AlwaysAllowAccess=false
AlwaysAllowUpdate=false
SearchInAllDatabases=false
SupportKphFields=true
generator\LowerCase=true
generator\UpperCase=true
generator\Numbers=true
generator\SpecialChars=false
generator\ExcludeAlike=false
generator\EnsureEvery=true
generator\Length=20
generator\EASCII=false

[generator]
LowerCase=true
UpperCase=true
Numbers=true
SpecialChars=true
EASCII=false
ExcludeAlike=true
EnsureEvery=true
Length=20
WordCount=6
WordSeparator=" "
WordList=eff_large.wordlist
Type=0

[Browser]
Enabled=true
ShowNotification=true
BestMatchOnly=false
UnlockDatabase=true
MatchUrlScheme=true
SortByUsername=false
SupportBrowserProxy=true
UseCustomProxy=false
CustomProxyLocation=
UpdateBinaryPath=false
AlwaysAllowAccess=false
AlwaysAllowUpdate=false
SearchInAllDatabases=false
SupportKphFields=true

And my "debug info":

KeePassXC - Version 2.3.1
Revision: 2fcaeea

Libraries:
- Qt 5.10.1
- libgcrypt 1.8.2

Operating system: Windows 10 (10.0)
CPU architecture: x86_64
Kernel: winnt 10.0.16299

Enabled extensions:
- Auto-Type
- Browser Integration
- Legacy Browser Integration (KeePassHTTP)
- SSH Agent
- YubiKey

Some more info that I don't know whether is relevant: my key store file is located in a Dropbox folder.

@jepaan
Copy link

jepaan commented May 7, 2018

I also suffer from this issue.
I've tried compiling a debug build, but the issue does not presents itself in this build. I used the following CMAKE arguments.
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_GUI_TESTS=OFF -DWITH_XC_YUBIKEY=OFF

Maybe the issue is related to YubiKey?

Running the binary version in debugger gives the following information:

[New Thread 10176.0x1900]
[New Thread 10176.0x3488]
[New Thread 10176.0x2c74]
[New Thread 10176.0x1fbc]
[New Thread 10176.0x1ad4]
[New Thread 10176.0x1ea0]
[Thread 10176.0x1ea0 exited with code 0]
[New Thread 10176.0xd28]
[New Thread 10176.0x29b0]
[New Thread 10176.0x23a0]
[New Thread 10176.0x3aac]
[New Thread 10176.0x550]
[Thread 10176.0x3aac exited with code 0]
[Thread 10176.0x3488 exited with code 0]
[Thread 10176.0x2c74 exited with code 0]
[Thread 10176.0x1fbc exited with code 0]
[Thread 10176.0x29b0 exited with code 0]
[New Thread 10176.0x2864]
Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000000066767002 in QBasicMutex::unlockInternal() ()
from /c/Program Files/KeePassXC/Qt5Core.dll
(gdb) bt
#0 0x0000000066767002 in QBasicMutex::unlockInternal() ()
from /c/Program Files/KeePassXC/Qt5Core.dll
#1 0x00000000002f4e32 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

@droidmonkey droidmonkey self-assigned this May 7, 2018
@phoerious
Copy link
Member

Duplicate of #1561

@phoerious phoerious marked this as a duplicate of #1561 May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants