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

Duplicate User waypoint crash #985

Closed
dbarnea opened this issue Jan 15, 2023 · 2 comments
Closed

Duplicate User waypoint crash #985

dbarnea opened this issue Jan 15, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@dbarnea
Copy link

dbarnea commented Jan 15, 2023

abarthel-little_navmap.log

first, Edit a user point you have created. Now don't change anything, just close the edit dialog.

Next, add a new waypoint, it will remember the last values you have "edited". now change the name or ident to anything you want, you'll get the exception.

@albar965
Copy link
Owner

[2023-01-15 7:20:57.348 DEBUG]: void UserdataDialog::acceptClicked() 0x27179660
[2023-01-15 7:20:57.354 CRIT ]: receiver "pushButtonUserdataAdd"
[2023-01-15 7:20:57.354 CRIT ]: event 3
[2023-01-15 7:20:57.354 CRIT ]: Caught exception in file ..\atools\src\gui\application.cpp line 83 what 
UNIQUE constraint failed: userdata.userdata_id 
Unable to fetch row. void atools::sql::SqlQuery::exec(): 
Error executing query. 
Query is "insert  into userdata (userdata_id, type, name, ident, region, description, tags, last_edit_timestamp, import_file_path, visible_from, altitude, temp, lonx, laty) 
values(:userdata_id, :type, :name, :ident, :region, :description, :tags, :last_edit_timestamp, :import_file_path, :visible_from, :altitude, :temp, :lonx, :laty)". 
Bound values are [":altitude"="52",":description"="",":ident"="PREVAZAdd",":import_file_path"="",":last_edit_timestamp"="2023-01-15T07:20:57.348",":laty"="38.9552001953125",":lonx"="20.749799728393555",":name"="PREVAZAdd",":region"="LG",":tags"="Greece",":temp"="false",":type"="Location",":userdata_id"="3220",":visible_from"="250"].

This is an error that corrupted the undo data in a past version when using bulk edit and has nothing to do with the ident. An internal id is conflicting. I thought I clear the undo data on update but either you missed the update or something is still wrong.

To avoid this issue:

  • Export all userpoints as CSV.
  • Quit LNM
  • Rename the file C:\Users\YOURUSERNAME\AppData\Roaming\ABarthel\little_navmap_db\little_navmap_userdata.sqlite to something else to have a backup.
  • Start LNM and import the CSV to get you data back.

Adding new points should work now.

I have to check how I can fix this.

@albar965 albar965 self-assigned this Jan 15, 2023
@albar965 albar965 added the bug label Jan 15, 2023
@albar965 albar965 added this to the Release 2.8.8 milestone Jan 15, 2023
albar965 added a commit to albar965/atools that referenced this issue Jan 16, 2023
albar965 added a commit that referenced this issue Jan 16, 2023
…book entries. #985

Issue with crash due to nested exceptions fixed.
@dbarnea
Copy link
Author

dbarnea commented Jan 16, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants