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

OsmGpsMap-CRITICAL: Map source setup called twice #1283

Merged
merged 1 commit into from Jan 28, 2022

Conversation

SNoiraud
Copy link
Member

@SNoiraud SNoiraud commented Jul 19, 2021

This message is relative to the osm-gps-map library after some changes.

@SNoiraud SNoiraud added the bug label Jul 19, 2021
@SNoiraud SNoiraud added this to the v5.1 milestone Jul 19, 2021
@lordemannd
Copy link
Contributor

lordemannd commented Jul 19, 2021

tried it on Win64, grampsd.exe, 5.1.3v2 + all changes on Gramps51 branch + plus PR 1283:

(grampsd.exe:9440): GdkPixbuf-CRITICAL **: gdk_pixbuf_new_from_data: assertion 'width > 0' failed
C:\Program Files\GrampsAIO64-5.1.4-prelim\gramps\gui\viewmanager.py:896: Warning: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed
Gtk.main_iteration()

(grampsd.exe:9440): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion 'GDK_IS_PIXBUF (src)' failed
C:\Program Files\GrampsAIO64-5.1.4-prelim\gramps\gui\viewmanager.py:896: Warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Gtk.main_iteration()

(grampsd.exe:9440): OsmGpsMap-WARNING **: Error getting missing tile

(grampsd.exe:9440): GdkPixbuf-CRITICAL **: gdk_pixbuf_new_from_data: assertion 'width > 0' failed
(grampsd.exe:9440): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion 'GDK_IS_PIXBUF (src)' failed
(grampsd.exe:9440): OsmGpsMap-WARNING **: Error getting missing tile

(grampsd.exe:9440): GdkPixbuf-CRITICAL **: gdk_pixbuf_new_from_data: assertion 'width > 0' failed
(grampsd.exe:9440): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion 'GDK_IS_PIXBUF (src)' failed
(grampsd.exe:9440): OsmGpsMap-WARNING **: Error getting missing tile

(ABOUT 50 repetitions, similar to the last 3 lines deleted)

gramps.ini has:
[geography]
center-lat=45.5
center-lon=-73.66666412353516
;;lock=0
;;map='person'
;;map_service=1
path='C:\Users\dave\AppData\Roaming\gramps\maps'
;;show_cross=0
;;use-keypad=1
zoom=6
;;zoom_when_center=12

I HAVEN'T BEEN ABLE TO reproduce this, please disregard this report, consider it as a testing error.

@lordemannd
Copy link
Contributor

lordemannd commented Jul 19, 2021

I tried using only your change on a clean version of 5.1.3-v2 and I got these warnings when I changed trees:
(grampsd.exe:4460): Gtk-WARNING **: drawing failure for widget 'OsmGpsMap': NULL pointer
(grampsd.exe:4460): Gtk-WARNING **: drawing failure for widget 'GtkBox': NULL pointer
(grampsd.exe:4460): Gtk-WARNING **: drawing failure for widget 'GtkPaned': NULL pointer
(grampsd.exe:4460): Gtk-WARNING **: drawing failure for widget 'GtkPaned': NULL pointer
(grampsd.exe:4460): Gtk-WARNING **: drawing failure for widget 'GtkNotebook': NULL pointer
(grampsd.exe:4460): Gtk-WARNING **: drawing failure for widget 'GtkPaned': NULL pointer
(grampsd.exe:4460): Gtk-WARNING **: drawing failure for widget 'GtkBox': NULL pointer
(grampsd.exe:4460): Gtk-WARNING **: drawing failure for widget 'GtkApplicationWindow': NULL pointer

(2 repetitions, similar to the last 8 lines deleted)

@jralls
Copy link
Member

jralls commented Jul 19, 2021

@lordemannd that's not a great way to test because a commit may depend on other commits made since the release. Better clone the repo, check out the branch, and copy everything to your package directory.

Better still to set up an MSYS2 build environment. Unfortunately the wiki hasn't been updated since @prculley took on building it, but all of the dependencies are packaged so it's a matter of figuring out what you need and installing them with pacman.
You could even start with gnucash-on-windows setup. From there IIRC you only need a few packages.

@SNoiraud
Copy link
Member Author

I get no more messages on my linux ubuntu 21.04
The missing tiles is normal
What is the osm-gps-map version on windows ?

@jralls
Copy link
Member

jralls commented Jul 19, 2021

Mingw64 has had 1.1.0 since June 2019 but I don't know if that's what @prculley put in the 5.1.3 AIO.

@lordemannd
Copy link
Contributor

lordemannd commented Jul 20, 2021

In Gramps for windows 5.1.3-v2, prerequisite checker has:

  • osmgpsmap 1.0 (Passed: version 1.0 or greater installed.)
  • Graphviz 2.40
  • PyICU 1.9.7(ICU 58.2)
  • Ghostscript 9.21

On debian/linux prerequisite checker has:

  • osmgpsmap 1.0 (Passed: version 1.0 or greater installed.) [libosmgpsmap-1.0-1:amd64 1.2.0-1]
  • Graphviz 2.43
  • PyICU 2.5(ICU 67.1)
  • Ghostscript 9.53.3

@SNoiraud
Copy link
Member Author

On debian/linux prerequisite

what is the result of "dpkg -l | grep osmgps | cut -b -80"

I know _version is always 1.0 but the package gives the real package version.
ie : Mingw64 has1.1.0 for MacOS.

@prculley
Copy link
Contributor

The version I use is built from the git repo listed as mingw-w64-x86_64-osmgpsmap-git r483.d275a5d-1.

I don't tend to change things unless absolutely necessary, as every time I do it seems that there are a new set of issues to resolve in the msys mingw installation.

Regarding build with msys2; https://www.gramps-project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2 is the wiki describing this. We may want to look at older wiki articles like the one you pointed to and either remove them or add pointer to the newer msys2 one.

@SNoiraud
Copy link
Member Author

I can now reproduce the problem with my ubuntu 21.04.
I only need to change the database.
It will be easier to found the problem I hope.

@jralls
Copy link
Member

jralls commented Jul 20, 2021

Mingw64 has1.1.0 for MacOS.

That would be strange since MinGW64 is a runtime and build tools for building unix-style libraries and programs on Microsoft Windows. macOS is BSD (a Unix flavor) and doesn't need anything like that. FWIW the macOS build does also have osm-gps-map 1.1.0.

Edit: I notice that @nzjrs released 1.2.0 in February and it fixes the dependency on the long-gone gnome-common. That will make building a lot easier, so I'll update the macOS build to that soon.

@jralls
Copy link
Member

jralls commented Jul 20, 2021

@prculley That wiki page definitely needs to be more easily findable. Note, though, that it says to use a different osm-gps-package than what you say you're using. MinGW64 is still using the 1.1.0 tarball from November 2015; the commit indicated by your version says that you built your own package from nzjrs/master in September 2016.

BTW, the wiki page needs some updating, the mingw64 repo has moved from https://github.com/alexpux/ to https://github.com/msys2/. And svn checkout https://github.com/...? svn? Seriously? From Github?

@SNoiraud
Copy link
Member Author

As those errors are only warnings and the critical message is gone, this PR shouldn't stop the 5.1.4 release.
I continue to find out where is the problem

@emyoulation
Copy link
Contributor

The critical error no longer shows on my patched Windows system. Thank you.

@SNoiraud
Copy link
Member Author

SNoiraud commented Jul 21, 2021

Looking for in Gtk, I found the following which produce the errors:

 if (cairo_status (cr) &&
      event_window != NULL)
    {
      /* We check the event so we only warn about internal GTK+ calls.
       * Errors might come from PDF streams having write failures and
       * we don't want to spam stderr in that case.
       * We do want to catch errors from
       */
      g_warning ("drawing failure for widget '%s': %s",
                 G_OBJECT_TYPE_NAME (widget),
                 cairo_status_to_string (cairo_status (cr)));
    }

So it could be a cairo problem.

@Nick-Hall
Copy link
Member

this PR shouldn't stop the 5.1.4 release.

OK. Thanks. I'll go ahead with the release tomorrow.

@lordemannd
Copy link
Contributor

testing Win64 5.1.4, with added changes made about Jul 23, all of the Messages: Critical and Warning related to Geography view are gone.

@Nick-Hall Nick-Hall merged commit 6ba9722 into gramps-project:maintenance/gramps51 Jan 28, 2022
@SNoiraud SNoiraud deleted the B12352 branch March 21, 2022 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants