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

crash when switching to favicon #403

Closed
FlorinAndrei opened this issue Mar 16, 2017 · 10 comments
Closed

crash when switching to favicon #403

FlorinAndrei opened this issue Mar 16, 2017 · 10 comments
Assignees
Milestone

Comments

@FlorinAndrei
Copy link
Contributor

FlorinAndrei commented Mar 16, 2017

Expected Behavior

Download favicon, apply it to the entry.

Current Behavior

Crash when clicking OK.

Steps to Reproduce (for bugs)

  1. Right-click a key entry, select View/Edit, select Icon.
  2. Click Download Favicon
  3. Click OK.

Do NOT click once on the favicon to select it after it's downloaded.

Context

KPXC 2.1.3 on Mac OS X 10.12.3. I just started using it today.
The DB is shared via Dropbox.
The DB was made last night, on Windows, using KPXC 2.1.3, from an imported v1 DB made with the old KeePassX (not sure which version, but probably really old, like maybe 0.4). I have not made edits to this DB yet on KPXC. It started with default icons everywhere.

So I've relaunched KPXC, went again into the Icon menu, actually clicked once on the downloaded favicon to select it, clicked OK, and it was fine.

Your Environment

  • KeePassXC version/commit used: 2.1.3
  • Qt version (e.g. Qt 5.3): 5.8.0
  • Compiler (e.g. Clang++3.6.0): no idea, I've installed it from the binary installer
  • Operating System and version: Mac OS X 10.12.3
@FlorinAndrei
Copy link
Contributor Author

Correction: it crashes every time after downloading a new favicon, after you click once to select it, then click OK to apply. Basically the favicon thing is broken.

@phoerious
Copy link
Member

I cannot reproduce the crash. Tried on both Arch Linux and OS X.

@droidmonkey
Copy link
Member

Can you produce a stacktrace through gdb?

@weslly
Copy link
Contributor

weslly commented Mar 17, 2017

This happened to me a few times before but I can't reproduce now.

@FlorinAndrei
Copy link
Contributor Author

I cannot reproduce it on Ubuntu 16.04 (installed from snap), but on OS X it crashes every time.

I'll see if I can figure out how to get the stack trace.

@redzacke
Copy link

redzacke commented Mar 18, 2017

Hi,
unfortunately I have the same problem reproduced in the same way.
I avoid this crash behavior by clicking "cancel" instead of "ok" and hit the "ok" button in a second round.

Furthermore it crashes sometimes when chromeipass wants to have access to Keepass for saving new credentials. But thats a sporadic behavior I cannot reproduce exactly.

@sephie
Copy link

sephie commented Jun 12, 2017

Experiencing the same on MacOS 10.12.5.
Additionally, it seems that the crash occurs when downloading the icon twice, AND that the icon that gets added to the list is the icon of the previous entry/url you attempted to dowload the icon from. There's an off-by-one error somewhere.

I have very limited C experience, but some searching lead me to the following line. I hope it helps:

iconStruct.number = -1;

Good luck and thanks for KeepassXC!

@droidmonkey
Copy link
Member

Oh gross and no bounds check!

@quinncomendant
Copy link

I've experienced this too, but can't reproduce it now. :(

@phoerious
Copy link
Member

I could also reproduce casual crashes when downloading icons twice, but I've had no time to dig deeper on this. I'll take a deeper look in the evening.

@phoerious phoerious self-assigned this Jun 29, 2017
@droidmonkey droidmonkey assigned droidmonkey and unassigned phoerious Sep 24, 2017
@droidmonkey droidmonkey added this to the v2.2.1 milestone Sep 24, 2017
droidmonkey added a commit that referenced this issue Sep 24, 2017
* Fixes #904, icons are saved at or below 128x128
* Fixes #403, crash occurs due to dialog on non-gui thread
* Fixes #232, icon hashes calculated and compared against
droidmonkey added a commit that referenced this issue Sep 27, 2017
* Fixes #904, icons are saved at or below 128x128
* Fixes #403, crash occurs due to dialog on non-gui thread
* Fixes #232, icon hashes calculated and compared against
droidmonkey added a commit that referenced this issue Sep 29, 2017
* Fixes #904, icons are saved at or below 128x128
* Fixes #403, crash occurs due to dialog on non-gui thread
* Fixes #232, icon hashes calculated and compared against
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants