[GNC] Problem with Saved Reports

Adrien Monteleone adrien.monteleone at lusfiber.net
Mon May 7 13:47:11 EDT 2018


David,

When I was looking at my version of the file, I too considered those GUIDs. You might be on to something. I would think it possible to parse the datafile for those ids and see if they still exist and what they point to. I’m thinking of a script that checks the ids in the saved-report file against the datafile, listing those it finds along with the item they point to and flagging those it doesn’t find. Of course this script would need to take different approaches for XML vs. SQL.

I guess a way to test the GUID theory before any script writing is:

* create some dummy accounts
* create one or more saved report configs using those accounts
* delete one or more dummy accounts
* close & reopen GnuCash
* check the saved-reports list to see if that test report is still there.

I would think GnuCash does something like set up a foreign key pointing to the old GUID when it deletes an account, but perhaps not. It also may or may not alter your saved-report file accordingly. (if not, that would explain it I think) I haven’t browsed that code yet but it might give some clues.

I have my doubts though because I’m sure many accounts from many users have been deleted over time (myself included) and unless there is something several years back in the mailman archives, I haven’t heard of this problem. (not to say it hasn’t happened and simply not reported)

But... Looking at Bugzilla, I see this report: https://bugzilla.gnome.org/show_bug.cgi?id=691910 where David Carlson mentions an idea to set a dirty bit to flag changes in the CoA to better handle reports left open in tabs. This tells me that if changing the CoA with an open report can be a problem, it might be a problem for saved configs as well. While the bug is still open, it is for the 2.4.x series and so might not be relevant anymore. I don’t see any other info.

I don’t know of any report ‘Check & Repair’ function or if the included Check & Repair works on reports as well. Again, that’s for a dev or code browse to answer. I can’t get to it at the moment, but if you haven’t received a more definitive answer by later this evening, I’ll take a look see. (I’ll probably browse the code just out of curiosity anyway)

Regards,
Adrien



> On May 7, 2018, at 12:10 PM, D <sunfish62 at yahoo.com> wrote:
> 
> Adrien,
> 
> Thanks for the reply. I already looked at the files.
> 
> This has happened twice, once about a year and a half ago, and once last week. When it happened first, I assumed a glitch in my machine, and focused on recovery. This is incident number two. So, there's no opportunity to discern any patterns. 
> 
> I didn't see anything particular in the files to suggest a reason for the truncation. The file seemed to end at a report boundary (although I am not a Scheme programmer). 
> 
> I note that the last line with data on it was line 666, so maybe it's just possessed by the devil. 
> 
> The original file is 181,670 bytes; the truncated file is 42,379 bytes. 
> 
> I see that most report entries in my file include the comment "based on template <guid>" , and I wonder whether these reports become unstable if the report upon which they are based gets deleted.
> 
> Another thing that I see is that many reports include account guids, and I am not sure whether these reports become unstable when an account gets deleted, thus leaving an invalid guid in the report. Perhaps Gnucash has a report clean up function that it performs sporadically?
> 
> David
> 
> 
> 
> On May 7, 2018, at 9:17 PM, Adrien Monteleone <adrien.monteleone at lusfiber.net> wrote:
> 
> David,
> 
> Without having a more specific answer, does this truncation by chance happen at the same place in the report list every time? (indicating there might be a problem at a certain place in the file, namely, with the description of a single report)
> 
> It is a plain text file that looks fairly straightforward in its description, so even without a roadmap for the syntax, you could peek at it and see if any report doesn’t seem to conform to the norm or if there is errant text there.
> 
> Just a thought unless/until you get a more definitive answer.
> 
> Regards,
> Adrien
> 
>> On May 7, 2018, at 8:06 AM, David T. via gnucash-user <gnucash-user at gnucash.org> wrote:
>> 
>> Hello,
>> 
>> I have encountered now a couple of times the unpleasant experience of calling up my saved reports configurations, only to find all but 5 or 7 completely gone. When I examine the saved-reports-2.4 file stored on my hard drive, it has been reduced in size to about 30k. This has happened now on two completely different occasions, separated by months. Thankfully, I have been able to go to backups and locate the original 180k saved-reports-2.4, and my reports are back where they should be.
>> 
>> For the record, there have been no other indications of trouble (i.e., no frozen instances of GnuCash, no crashes), and I have not undertaken any major operations (loading of huge numbers of transactions, closing books, etc.). Just, one day, the reports are there, the next, they’re not.
>> 
>> The fact that this has now happened more than once suggests a serious problem (most likely with something stupid I have done) with my saved reports file, and I would like to ask whether there is any sort of utility (like Check and Repair) that I can run on the saved reports to determine what might be causing this file to auto-truncate itself. Assuming that there isn’t, does anyone have any suggestions on what I might look for that could cause this behavior? It’s really disturbing to open up GnuCash, and discover that my reports have been simply disappeared.
>> 
>> TIA,
>> David T.
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.




More information about the gnucash-user mailing list