Re: GtkD crash: 'BadAlloc (insufficient resources for operation)'

2020-04-28 Thread Cogitri via Digitalmars-d-learn
On Monday, 27 April 2020 at 14:53:06 UTC, mark wrote: Below is the bt. Does it look like my bug or a Gtk or GtkD bug? That's hard to say without the debug info for gtkd, gtk and glib installed (so the backtrace isn't all the useful), but since gtkd isn't mentioned in the log I guess that

Re: GtkD crash: 'BadAlloc (insufficient resources for operation)'

2020-04-27 Thread mark via Digitalmars-d-learn
I took Adam's advice about .gdbinit and now it runs in gdb. When I ran the program I did Find 'memoize' which worked. Then 'memoize python' which also worked. Then said to find 'any word' (which produces 1000s of rows) at which point it crashed. Below is the bt. Does it look like my bug or a

Re: GtkD crash: 'BadAlloc (insufficient resources for operation)'

2020-04-27 Thread Cogitri via Digitalmars-d-learn
Hello, could you try what the error message suggest you to do: On Monday, 27 April 2020 at 12:03:18 UTC, mark wrote: (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with

GtkD crash: 'BadAlloc (insufficient resources for operation)'

2020-04-27 Thread mark via Digitalmars-d-learn
I'm getting a crash when I add 1000s of rows to a tree (up to 100s seems to work ok). The source code is here: https://github.com/mark-summerfield/debfind Note that this will only build and run on a Debian or Debian-derived system (e.g., Ubuntu). I am pretty well reaching the point of

Re: GtkD crash

2020-02-22 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 21 February 2020 at 13:36:58 UTC, mark wrote: I thought that onChangeState was never called before the Label was constructed That's one of the 'features' (wink wink) of GtkD. It's possible to call the function as a class function (uninstantiated, in other words) or as an object

Re: GtkD crash

2020-02-21 Thread mark via Digitalmars-d-learn
Thanks for your question, it led me to focus on the Label and now I've solved the problem. I thought that onChangeState was never called before the Label was constructed, but it turns out it is called before. So now I use: if (statusLabel !is null)

Re: GtkD crash

2020-02-21 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 21 February 2020 at 08:55:43 UTC, mark wrote: statusLabel.setText(message); // BUG Where is statusLabel instantiated? Other than that, I see nothing wrong here.

GtkD crash

2020-02-21 Thread mark via Digitalmars-d-learn
I'm porting a simple game to GtkD to learn the library and more about D. Unfortunately, I've hit a show-stopping crash. I have a subclass of ApplicationWindow which has this method: private void onChangeState(int score, Board.State state) { import std.format: format;