Problem loading file

Derek Atkins warlord at MIT.EDU
Tue Aug 6 10:29:35 EDT 2013


Geert,

Geert Janssens <janssens-geert at telenet.be> writes:

> The function gnc:restore-report-by-guid-with-custom-template was added
> recently by me in the 2.5 series and is used to restore open
> reports. The function is written to the meta file in the
> .gnucash/books directory matching your gnucash book. This file is
> parsed when GnuCash opens your data file.
>
> So yes, if you had open reports when testing gnucash 2.5.2, this will
> result in a crash when trying to open the same book under the same
> user account with gnucash 2.4.x afterwards.
>
> My first reaction was to dismiss this as only a developer
> inconvenience, but that is not the only case this can happen. A user
> trying gnucash 2.6 but reverting back to 2.4 for whatever reason could
> run into this. So I should probably add some code to the 2.4.x series
> to at least not crash. Can you create a bug report for this so it
> doesn't get forgotten ? (I don't have time now to fix this
> immediately, sorry).

Is there some way to have the code check whether the API exists and
"exit gracefully" if it does not?  e.g.:

guile> (defined? 'gnc:restore-report-by-guid-with-custom-template)
#f
guile> (defined? 'car)
#t

So you could only call the API if it's defined?  That way you wouldn't
require changes to 2.4.

> Thank you,
>
> Geert

-derek

> On 04-08-13 15:53, Cristian Marchi wrote:
>> Thanks, that could be the problem as under Ubuntu I occasionally
>> open the file with 2.5 unstable version (without saving it) while on
>> windoes I've only the stable version. I will try to use your
>> suggested methed by finding the differences.
>>
>> Thanks for the tip
>>
>> Il 04/08/2013 13:48, Guilherme Salgado ha scritto:
>>> I seem to remember seeing something like this when I tried to open a
>>> file on GnuCash 2.4.12 after having opened it on 2.5.3 (trunk).
>>> Luckily I had a recent backup of my ~/.gnucash and after diffing the
>>> two it became obvious what lines I had to remove to stop 2.4.12 from
>>> crashing.
>>>
>>> The fact that you can open it on Windows is probably because your
>>> equivalent of ~/.gnucash there hasn't been tainted by GnuCash 2.5.3
>>>
>>> On 4 August 2013 05:08, Cristian Marchi <cri79 at libero.it> wrote:
>>>> I've a problem opening a file with GnuCash under Ubuntu
>>>> 12.10. This is the
>>>> message I get when opening it from the terminal:
>>>>
>>>> Backtrace:
>>>> In current input:
>>>>     1: 0* (let* ((options #)) (let* (#) (# option)) (let* (#) (#
>>>> option))
>>>> ...)
>>>>     1: 1  (gnc:restore-report-by-guid-with-custom-template 0 ...)
>>>>
>>>> <unnamed port>:1:897: In expression
>>>> (gnc:restore-report-by-guid-with-custom-template 0
>>>> "b1f15b2052c149df93e698fe85a81ea6" ...):
>>>> <unnamed port>:1:897: Unbound variable:
>>>> gnc:restore-report-by-guid-with-custom-template
>>>>
>>>> I see the GnuCash splash screen and tip of the day, but then it exits.
>>>>
>>>> I can open it without problem in Windows XP. I also tried to copy all
>>>> settings file from XP to Ubuntu but I get the same error message.
>>>> I got it working by removing the all the ~/.gnucash folder.
>>>>
>>>> Any idea of what's going on?
>>>> _______________________________________________
>>>> gnucash-devel mailing list
>>>> gnucash-devel at gnucash.org
>>>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>>
>> _______________________________________________
>> gnucash-devel mailing list
>> gnucash-devel at gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
>

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list