After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762569 - Crash on editing an object with no "name"
Crash on editing an object with no "name"
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2016-02-23 22:50 UTC by Marcus Lundblad
Modified: 2016-02-26 06:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
osmUtils: Don't update a place's name if not in the OSM object (1.69 KB, patch)
2016-02-24 21:33 UTC, Marcus Lundblad
none Details | Review
osmUtils: Don't update a place's name if not in the OSM object (1.49 KB, patch)
2016-02-25 21:30 UTC, Marcus Lundblad
committed Details | Review

Description Marcus Lundblad 2016-02-23 22:50:34 UTC
Getting this in the osm-edit-address branch, after changes to a name-less node (just carrying addr: tags).
Haven't tested this on master yet (but thought I'd file a bug so I won't forget to investigate this).

    (gnome-maps:10756): Gtk-WARNING **: gtkliststore.c:836: Unable to convert from gpointer to gchararray
     
     
    (gnome-maps:10756): Gjs-WARNING **: JS ERROR: TypeError: this._place[this._titleProperty] is null
    PlaceFormatter<.title@resource:///org/gnome/Maps/js/placeFormatter.js:48
    PlaceBubble<._populate@resource:///org/gnome/Maps/js/placeBubble.js:118
    wrapper@resource:///org/gnome/gjs/modules/lang.js:178
    PlaceBubble<._edit/<@resource:///org/gnome/Maps/js/placeBubble.js:273
    OSMEditDialog<._onObjectUploaded@resource:///org/gnome/Maps/js/osmEditDialog.js:486
    wrapper@resource:///org/gnome/gjs/modules/lang.js:178
    OSMConnection<._onChangesetClosed@resource:///org/gnome/Maps/js/osmConnection.js:208
    wrapper@resource:///org/gnome/gjs/modules/lang.js:178
    OSMConnection<.closeChangeset/<@resource:///org/gnome/Maps/js/osmConnection.js:198
    main@resource:///org/gnome/Maps/js/main.js:47
    run@resource:///org/gnome/gjs/modules/package.js:192
    start@resource:///org/gnome/gjs/modules/package.js:176
    @../../install/bin/gnome-maps:5
Comment 1 Zeeshan Ali 2016-02-23 23:19:40 UTC
Sorry to change the summary but I have OCD about summary being kept short and description long. :)
Comment 2 Marcus Lundblad 2016-02-24 07:24:52 UTC
(In reply to Zeeshan Ali (Khattak) from comment #1)
> Sorry to change the summary but I have OCD about summary being kept short
> and description long. :)

No worries! :)
I just wanted to quickly jot down the bug, as I found it just when I was about to go to bed after testing editing address information.
Comment 3 Marcus Lundblad 2016-02-24 07:25:42 UTC
… and I think I just realized what the problem is.
Comment 4 Marcus Lundblad 2016-02-24 21:33:26 UTC
Created attachment 322311 [details] [review]
osmUtils: Don't update a place's name if not in the OSM object

When a place has been edited on OSM don't reset the Place's name attribute
if it's not set in the OSM object, since the PlaceFormatter assumes this
is set. For bare address nodes, this would be set to a value contructed
from the address components, so we shouldn't remove this just because
the OSM object doesn't have a name set.
This fixes stack trace when saving places like that.
Comment 5 Marcus Lundblad 2016-02-25 21:30:27 UTC
Created attachment 322413 [details] [review]
osmUtils: Don't update a place's name if not in the OSM object

When a place has been edited on OSM don't reset the Place's name attribute
if it's not set in the OSM object, since the PlaceFormatter assumes this
is set. For bare address nodes, this would be set to a value contructed
from the address components, so we shouldn't remove this just because
the OSM object doesn't have a name set.
This fixes stack trace when saving places like that.
Comment 6 Jonas Danielsson 2016-02-26 05:59:18 UTC
Review of attachment 322413 [details] [review]:

lhtm
Comment 7 Marcus Lundblad 2016-02-26 06:39:12 UTC
Attachment 322413 [details] pushed as 757bafb - osmUtils: Don't update a place's name if not in the OSM object