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

Converting offline twice within the same instance causing unusable offline state #18945

Closed
qgib opened this issue Jun 10, 2014 · 12 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Plugins

Comments

@qgib
Copy link
Contributor

qgib commented Jun 10, 2014

Author Name: Drew Nix (Drew Nix)
Original Redmine Issue: 10537
Affected QGIS version: master
Redmine category:c++_plugins/offline_editing
Assignee: Alessandro Pasotti


Problem Description:
Converting offline twice within the same running project instance causes unusable offline state.

Problem Result:
After which the "Convert to Offline Project" is grayed out. The project will no longer synchronize and the project is stuck in an Offline State.

If the project is saved, upon opening the same scenario applies.

The only fix to this is to open the project file in a text editor and delete the offline information and save the file. This is impossible for most of our users.

Steps to reproduce:
Open Qgis
Add PostGIS vector layer
Database > Offline Editing > Convert to Offline Project
Offline data: C:/OSGEO4W/bin/offline.sqlite
Select PostGIS vector layer
Database > Offline Editing > Syncronize
Database > Offline Editing > Convert to Offline Project
Offline data: C:/OSGEO4W/bin/offline.sqlite (Same dataset)

Errors:
table 'tog_indices' already exists
table 'log_layer_ids' already exists
table 'log_fids' already exists
table 'log_added_attrs' already exists
table 'log_added_features' already exists
table 'log_removed_features' already exists
table 'log_feature_updates' already exists
table 'log_geometry_updates' already exists

table '<PostGIS_LAYER>' already exists

@qgib
Copy link
Contributor Author

qgib commented Jun 10, 2014

Author Name: Giovanni Manghi (@gioman)


On Linux I can't confirm the error messages and the offline db in a unusable state, but I can confirm that overwriting an already existing offline db with a new one causes strange things to happen (the most obvious is the loss of features). If each time layer(s) are placed off-line is used a new offline db (no overwriting) then things are ok.


  • operating_system was changed from Windows 7 to
  • os_version was changed from 64 bit to

@qgib
Copy link
Contributor Author

qgib commented Jun 20, 2014

Author Name: Jürgen Fischer (@jef-n)


  • category_id was configured as C++ Plugins

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2014

Author Name: Jürgen Fischer (@jef-n)


  • fixed_version_id was changed from Version 2.4 to Future Release - High Priority

@qgib
Copy link
Contributor Author

qgib commented Jun 29, 2014

Author Name: Jürgen Fischer (@jef-n)


  • category_id was changed from C++ Plugins to C++ plugins/Offline editing

@qgib
Copy link
Contributor Author

qgib commented Oct 26, 2014

Author Name: Jürgen Fischer (@jef-n)


  • subject was changed from Offline Editing - Converting offline twice within the same instance causing unusable offline state to Converting offline twice within the same instance causing unusable offline state

@qgib
Copy link
Contributor Author

qgib commented Oct 30, 2014

Author Name: Giovanni Manghi (@gioman)


found that this is a regression since qgis 2.0.1, where overwriting the already existing offline db worked without issues.

Moreover now on QGIS master on Linux it causes a crash

Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Warning: Object::disconnect: Unexpected null parameter
Fatal: ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 469
QGIS died on signal -1Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No thread selected
No stack.
gdb returned 0
Aborted


  • priority_id was changed from High to Severe/Regression
  • fixed_version_id was changed from Future Release - High Priority to Version 2.6

@qgib
Copy link
Contributor Author

qgib commented Oct 31, 2014

Author Name: Jürgen Fischer (@jef-n)


  • fixed_version_id was changed from Version 2.6 to Future Release - High Priority

@qgib
Copy link
Contributor Author

qgib commented May 28, 2015

Author Name: Matthias Kuhn (@m-kuhn)


  • Concerning the crash, which operation have you been performing?

  • We could delete the offline db after going online. Or rename it to a backup copy which will eventually be overwritten on the next sync. That way one would always have a backup copy. Although I am not sure if it will be that easy to recover information from it.

  • When going offline and the target file already exists, I think a warning should be raised, asking for confirmation if it's ok to overwrite.

  • In the future this should possibly be enhanced with a recovery option to synchronized leftover data in not-yet (fully) synchronized offline databases.

Comments?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented May 29, 2015

Author Name: Giovanni Manghi (@gioman)


Matthias Kuhn wrote:

  • Concerning the crash, which operation have you been performing?

nothing special, adding/editing one feature.

  • We could delete the offline db after going online. Or rename it to a backup copy which will eventually be overwritten on the next sync. That way one would always have a backup copy. Although I am not sure if it will be that easy to recover information from it.

  • When going offline and the target file already exists, I think a warning should be raised, asking for confirmation if it's ok to overwrite.

  • In the future this should possibly be enhanced with a recovery option to synchronized leftover data in not-yet (fully) synchronized offline databases.

Comments?

it seems to me a good plan :)


  • status_id was changed from Feedback to Open

@qgib
Copy link
Contributor Author

qgib commented May 29, 2015

Author Name: Drew Nix (Drew Nix)


What about a fail-back as well (to a proper online state) if converting offline fails?

-- happy to see some activity here ;)

@qgib
Copy link
Contributor Author

qgib commented Apr 14, 2016

Author Name: Alessandro Pasotti (@elpaso)


  • assigned_to_id was configured as Alessandro Pasotti

@qgib
Copy link
Contributor Author

qgib commented Apr 21, 2016

Author Name: Anónimo (Anónimo)


Fixed in changeset "f045492ed54a528263444824e7bbf3317d6d80e2".


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins Crash/Data Corruption labels May 25, 2019
@qgib qgib added this to the Future Release - High Priority milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Plugins
Projects
None yet
Development

No branches or pull requests

1 participant