Bug#644914: crashes - some thread underneath as it seems

Andy Spencer andy753421 at gmail.com
Tue Oct 11 07:04:29 UTC 2011


On 2011-10-10 19:24, Steffen Moeller wrote:
> Writing from Europe, it would be great if you could help with some
> local weather pointers. Well, I was just curious.

Sorry I don't know much about what European weather information is
available. From what I've heard it's harder to come by than the weather
data provided by the United States National Weather Service. Either way,
AWeather currently only supports United States radars :/


> ...
> Segmentation fault (core dumped)

Well, I've fixed _a_ segfault :)

I'm not 100% sure if it's the same bug you're seeing so I've attached a
patch that may correct the problem. If you could try testing it, I would
appreciate it. I can build an updated .deb tomorrow if you would prefer
testing it that way.

It seems your computer is having trouble downloading and saving the data
files though. The status in the error log corresponds to an I/O Error,
I'm not sure what would be causing that, but it doesn't seem related to
AWeather.
-------------- next part --------------
Fix crash when unable to cache http files

--- a/src/data/grits-http.c
+++ b/src/data/grits-http.c
@@ -164,6 +164,10 @@ gchar *grits_http_fetch(GritsHttp *http, const gchar *uri, const char *local,
 		if (!g_file_test(path, G_FILE_TEST_EXISTS))
 			part = g_strdup_printf("%s.part", path);
 		FILE *fp = fopen_p(part, "ab");
+		if (!fp) {
+			g_warning("GritsHttp: fetch - error opening %s", path);
+			return NULL;
+		}
 		fseek(fp, 0, SEEK_END); // "a" is broken on Windows, twice
 
 		/* Make temp data */
--- a/src/plugins/elev.c
+++ b/src/plugins/elev.c
@@ -204,6 +204,7 @@ static void _load_tile(GritsTile *tile, gpointer _elev)
 
 	struct _LoadTileData *load = g_new0(struct _LoadTileData, 1);
 	load->path = grits_wms_fetch(elev->wms, tile, GRITS_ONCE, NULL, NULL);
+	if (!load->path) return; // Canceled/error
 	g_debug("GritsPluginElev: _load_tile: %s", load->path);
 	load->elev = elev;
 	load->tile = tile;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20111011/f76ca50d/attachment.pgp>


More information about the debian-science-maintainers mailing list