[Qgis-developer] Re: [Qgis-user] QGIS 1.6 project causing 1.7 to crash

Nathan Woodrow madmanwoo at gmail.com
Tue Oct 11 09:53:22 EDT 2011


I can't say it's best practice but I have done it before.  You will need
remove the legendlayer and use the layerid= to find any links to that legend
item ie maplayer.  You will also need to change the "projectlayers
layercount="83""

I have cc'd this to the developer mailing list in case someone on there
knows something that might help, before you start hacking away at things.

- Nathan

On Tue, Oct 11, 2011 at 11:48 PM, Purves Ross <rmpurves at ntlworld.com> wrote:

> Great suggestion. Thank you. I'm guessing you mean manually remove a whole
> <maplayer> tag at a time and reduce the total layers count in the XML file,
> right? Is the XML project file structure robust enough to allow me to
> manually 'hack' the file like this?
>
> Thanks again!
> Cheers
> Ross
>
>
>
> On 11 October 2011 14:45, Nathan Woodrow <madmanwoo at gmail.com> wrote:
>
>> Very strange.  The only thing I can think of at this time is take a backup
>> of your project and remove each layer one by one resaving and opening the
>> project each time to see if taking one out loads.
>>
>> See how you go with that.
>>
>> - Nathan
>>
>>
>> On Tue, Oct 11, 2011 at 11:33 PM, Purves Ross <rmpurves at ntlworld.com>wrote:
>>
>>> Hi Nathan,
>>>
>>> OK - even more strange. This string does not appear in my project file at
>>> all. I checked in a text editor and grepped to be absolutely sure.
>>>
>>>
>>> On 11 October 2011 14:20, Nathan Woodrow <madmanwoo at gmail.com> wrote:
>>>
>>>> Can you search the xml in the project file for VectorBackgroundMapMarch2011
>>>> and post each line it is mentioned on.  The only time QGIS will throw the
>>>> Data Source is invaild error is in the ogr provider and somehow it is trying
>>>> to load your project as a layer which it then bombs on.
>>>>
>>>> - Nathan
>>>>
>>>> On Tue, Oct 11, 2011 at 11:10 PM, Nathan Woodrow <madmanwoo at gmail.com>wrote:
>>>>
>>>>> Very strange indeed.
>>>>>
>>>>> - Nathan
>>>>>
>>>>>
>>>>> On Tue, Oct 11, 2011 at 10:59 PM, Purves Ross <rmpurves at ntlworld.com>wrote:
>>>>>
>>>>>> OK, thanks for the tip re file number! Fingers crossed it's not that
>>>>>> though.
>>>>>>
>>>>>> Sorry - now I get you. You mean can I load the layer called
>>>>>> 'VectorBackgroundMapMarch2011' in its own right into a fresh project, right?
>>>>>> Here's the rub - and also why I was confused by your question - there's no
>>>>>> apparent layer with that name in the project! That's the name of the overall
>>>>>> .qgs file, not a layer within it. Seems strange?
>>>>>>
>>>>>> Many thanks!
>>>>>> Ross
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 11 October 2011 13:53, Nathan Woodrow <madmanwoo at gmail.com> wrote:
>>>>>>
>>>>>>> I recall hearing about a bug where layers fail to load if there is a
>>>>>>> certain number of files in the project but this might be something
>>>>>>> unrelated.
>>>>>>>
>>>>>>> I mean can you load /mnt/bunker/ross/Research/PhD/NewMapMarch2011/VectorBackgroundMapMarch2011
>>>>>>> in QGIS on it's own in a fresh project.
>>>>>>>
>>>>>>> - Nathan
>>>>>>>
>>>>>>> On Tue, Oct 11, 2011 at 10:51 PM, Purves Ross <rmpurves at ntlworld.com
>>>>>>> > wrote:
>>>>>>>
>>>>>>>> Hi Nathan,
>>>>>>>>
>>>>>>>> OK - by counting the number of occurances of '<maplayer' in the
>>>>>>>> project file, I count 50 layers. Sounds a lot but there were no problems in
>>>>>>>> 1.6 with this number!
>>>>>>>>
>>>>>>>> Sorry to be stupid, not sure what you mean by load the file by
>>>>>>>> itself. Are you saying that there is a way of selectively loading layers on
>>>>>>>> opening a QGIS project file? Or do you mean opening the file in a text
>>>>>>>> editor or something. If the latter, then it certainly loads the XML OK and
>>>>>>>> there's no evidence that the file is corrupted.
>>>>>>>>
>>>>>>>> Thanks again for the help!
>>>>>>>> Cheers
>>>>>>>> Ross
>>>>>>>>
>>>>>>>>
>>>>>>>> On 11 October 2011 13:44, Nathan Woodrow <madmanwoo at gmail.com>wrote:
>>>>>>>>
>>>>>>>>> How many layers do you have in this project file?  And can you load
>>>>>>>>> the file by itself?
>>>>>>>>>
>>>>>>>>> - Nathan
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Oct 11, 2011 at 10:35 PM, Ross Purves <RMP at lutonsfc.ac.uk>wrote:
>>>>>>>>>
>>>>>>>>>> Hi Nathan,
>>>>>>>>>>
>>>>>>>>>> Very many thanks for the quick response! OK, running from the
>>>>>>>>>> command line gives me slight more info, to be sure:
>>>>>>>>>>
>>>>>>>>>> [Tue Oct 11 13:34:26 RMPT43:NewMapMarch2011 ]$ qgis
>>>>>>>>>> VectorBackgroundMapMarch2011
>>>>>>>>>> Warning: loading of qgis translation failed
>>>>>>>>>> [/usr/share/qgis/i18n//qgis_en_GB]
>>>>>>>>>> Warning: loading of qt translation failed
>>>>>>>>>> [/usr/share/qt4/translations/qt_en_GB]
>>>>>>>>>> Warning: Couldn't load Python support library: Cannot load library
>>>>>>>>>> /usr/lib/qgispython: (/usr/lib/libqgispython.so: cannot open shared object
>>>>>>>>>> file: No such file or directory)
>>>>>>>>>> Critical: Data source is invalid
>>>>>>>>>> Critical:
>>>>>>>>>>
>>>>>>>>>> Additionally, when I start QGIS this way I get a pop up window
>>>>>>>>>> within the graphical interface that says:
>>>>>>>>>>
>>>>>>>>>> The layer
>>>>>>>>>> /mnt/bunker/ross/Research/PhD/NewMapMarch2011/VectorBackgroundMapMarch2011
>>>>>>>>>> is not a valid layer and can not be added to the map
>>>>>>>>>>
>>>>>>>>>> The strange thing is that I'm pretty certain there is no problem
>>>>>>>>>> with the project file. It's timestamp reads 22 April, when I last worked on
>>>>>>>>>> it. I.e. the version of QGIS has changed but my file has remained constant.
>>>>>>>>>>
>>>>>>>>>> Many thanks!
>>>>>>>>>> Ross
>>>>>>>>>> ________________________________________
>>>>>>>>>> From: Nathan Woodrow [madmanwoo at gmail.com]
>>>>>>>>>> Sent: 11 October 2011 13:26
>>>>>>>>>> To: Purves Ross
>>>>>>>>>> Cc: qgis-user at lists.osgeo.org
>>>>>>>>>> Subject: Re: [Qgis-user] QGIS 1.6 project causing 1.7 to crash
>>>>>>>>>>
>>>>>>>>>> Hi Ross,
>>>>>>>>>>
>>>>>>>>>> That sounds a bit strange.  Can you start QGIS from the terminal
>>>>>>>>>> and see what the output is when it locks up.
>>>>>>>>>>
>>>>>>>>>> - Nathan
>>>>>>>>>>
>>>>>>>>>> On Tue, Oct 11, 2011 at 10:19 PM, Purves Ross <
>>>>>>>>>> rmpurves at ntlworld.com<mailto:rmpurves at ntlworld.com>> wrote:
>>>>>>>>>> Hi there,
>>>>>>>>>>
>>>>>>>>>> I've updated my Ubuntu 10.10 installation to use QGIS 1.7. I put a
>>>>>>>>>> lot of work into a project using QGIS 1.6 but it won't open in 1.7. The
>>>>>>>>>> layers all appear but then the screen freezes as though QGIS is rendering
>>>>>>>>>> the resulting map forever.
>>>>>>>>>>
>>>>>>>>>> A bit of googling revealed that there was a bug at some point
>>>>>>>>>> which required the placement of 'gdal' between all <provider></provider>
>>>>>>>>>> tags in the project XML file in a scenario like this. However, I tried this
>>>>>>>>>> and it didn't work. I also have read various posts that say the use of 'on
>>>>>>>>>> the fly' project appeared to cause problems going between 1.6 and 1.7. The
>>>>>>>>>> project in question does indeed use on the fly projection.
>>>>>>>>>>
>>>>>>>>>> As a final note, I have an ECW raster layer in this map that
>>>>>>>>>> requires the modified GDAL to work. I thought that the crash might be to do
>>>>>>>>>> with the upgrade having removed my modified version of GDAL. I therefore
>>>>>>>>>> recompiled it all and have checked to see that my version of 1.7 can now
>>>>>>>>>> read ECW files and it can (when they are presented a a fresh layer and not
>>>>>>>>>> as part of the problematic project).
>>>>>>>>>>
>>>>>>>>>> This is a really, really important project to me and I do need to
>>>>>>>>>> get it back if at all possible. Please can anyone help?
>>>>>>>>>>
>>>>>>>>>> Very many thanks!
>>>>>>>>>> Ross Purves
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Qgis-user mailing list
>>>>>>>>>> Qgis-user at lists.osgeo.org<mailto:Qgis-user at lists.osgeo.org>
>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20111011/f65f0635/attachment.html


More information about the Qgis-developer mailing list