[GNC-dev] [GNC] custom report freezing - work done gets lost.

John Ralls jralls at ceridwen.us
Sun Oct 6 11:41:38 EDT 2019


You mean why does it hang instead of crashing? Possibly because the memory was reallocated back to the program for something else and the attempt to free the splits is freeing whatever that is and that's resulting in a hang. 

But why would a report create or delete splits or transactions? A report should be describing the book as it is, not changing it.


Regards,
John Ralls

> On Oct 6, 2019, at 2:36 AM, Christopher Lam <christopher.lck at gmail.com> wrote:
> 
> Ok forwarding to people who have better idea.
> 
> ---------- Forwarded message ---------
> From: Steven Bruniges <steven.bruniges at gmail.com>
> Date: Sun, 6 Oct 2019 at 09:34
> Subject: Re: [GNC] custom report freezing - work done gets lost.
> To: Christopher Lam <christopher.lck at gmail.com>
> 
> 
> Have identifies my issue.   Was calling xaccTransDestroy with pointers to
> splits that had been destroyed in an earlier loop.  Not sure why this locks
> up gnucash.
> 
> Steve
> 
> On Sun, 6 Oct 2019, 22:20 Christopher Lam, <christopher.lck at gmail.com>
> wrote:
> 
>> Sorry without specific detail what you're trying to do, we can't help.
>> Moreover this is open-source, including open-source help requests.
>> cc: devel
>> 
>> On Sun, 6 Oct 2019 at 05:58, Steven Bruniges <steven.bruniges at gmail.com>
>> wrote:
>> 
>>> Not even sure it’s the session I want to save (hoping for the function
>>> underlying the save option in the file menu).
>>> 
>>> 
>>> 
>>> Working through a process of elimination.  I’d love to find the
>>> transaction that’s triggering this behaviour.  If I can reduce the 3000
>>> splits to something more manageable I may find the issue?
>>> 
>>> 
>>> 
>>> The report typically hangs and Task manager shows the system is at rest.
>>> If I modify the code to open warning dialogs it crashes after a number of
>>> loops.  No output in the trace file.  Either way, I get no diagnostic
>>> feedback.
>>> 
>>> 
>>> 
>>> Its possible I am retaining pointers to a deleted split, or running
>>> across a temporary split that was never finished, etc, (or both).
>>> 
>>> 
>>> 
>>> On that point, is there any test if a split is deleted?
>>> 
>>> 
>>> 
>>> Steve
>>> 
>>> 
>>> 
>>> *From:* Christopher Lam [mailto:christopher.lck at gmail.com]
>>> *Sent:* Sunday, 6 October 2019 6:17 PM
>>> *To:* Steven Bruniges <steven.bruniges at gmail.com>
>>> *Cc:* GnuCash users group <gnucash-user at gnucash.org>
>>> *Subject:* Re: [GNC] custom report freezing - work done gets lost.
>>> 
>>> 
>>> 
>>> qof-session isn't currently accessible to scheme. Why do you think you'll
>>> need to save session?
>>> 
>>> 
>>> 
>>> It may help to publish your report on Bugzilla or devel mailing list.
>>> 
>>> 
>>> 
>>> On Sun, 6 Oct 2019, 12:53 Steven Bruniges, <steven.bruniges at gmail.com>
>>> wrote:
>>> 
>>> Hi.
>>> 
>>> 
>>> 
>>> Have a custom report that appears to be freezing, so I have to halt it.
>>> It
>>> in a 3000 item loop, and I suspect the overheads are growing as it
>>> progresses.
>>> 
>>> 
>>> 
>>> I want to save the book periodically, which if nothing else will simplify
>>> the work in a future run.
>>> 
>>> 
>>> 
>>> Is there a function I can call  that is like "gnc-book-session-save"?
>>> 
>>> 
>>> 
>>> Steve
>>> 
>>> _______________________________________________
>>> 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-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel



More information about the gnucash-devel mailing list