liberty-eiffel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error on some of the ncurses tutorial examples e.g. for ncurses/menu


From: Aaron Cook
Subject: Re: Error on some of the ncurses tutorial examples e.g. for ncurses/menu.e
Date: Tue, 23 Nov 2021 00:04:48 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.7.1

Hello Rapha,
Thanks very much for your warm and helpful response, I really appreciate it!
I tried compiling the menu.e example with "-no_check" and it worked beautifully. That was also the case with the list.e and progressbar.e examples that I could not compile and run before (they all look very nice!). The only ncurses example that I could not seem to get the work was panel.e (not that I think I need that specifically).

It is my plan to try using Liberty Eiffel just for a very small project for my own learning and use case (a simple drill program for learning the Dewey decimal system). I did a little IT study some years ago, but I'm not really an IT person. I was lucky enough to be exposed to some Eiffel, and that is the language I want to get better at (and the GNU philosophy is one I admire). So I do want to start supporting this project, and hope that it will continue.

I don't want anyone to feel any obligation, but I think it would be nice for me (and others like me) if the fix for ncurses/menu.e and similar examples is not too difficult to do. I guess the best thing for me to do is have a go at raising a bug report (could do tomorrow), and you could decide where to go from there :).

Thanks again and best wishes,
Aaron

On 22/11/2021 05:07, Raphael Mack wrote:
Hello Aaron,

first of all a warm welcome on our mailinglist!

I quickly tried and got the same behavior, so it is definitely not your
fault! After I compiled with "-no_check" it even runs without issue, so
maybe there is a problem in of the invariants in the wrapper.

In case you plan to actively use it I can take a look and fix it. But
as you might see from the activity on this list and also in the
compilers repository, there is active project using liberty eiffel
these days. That's also the reason why the developers lost interest in
the last years, as maintaining a compiler project without users is not
very satisfactory. That said I can also say, that I am still convinced
that Eiffel - and its GNU dialect LibertyEiffel is technically the best
programming language I know, but we have a lack of libraries and users.

In case you want to change that and start a project using liberty I
would wake up from hibernation and support you at my very best!

Regards,
Rapha

Am Sonntag, dem 21.11.2021 um 22:00 +1100 schrieb Aaron Cook:
Hello,
I have been working through compiling and running some of the
tutorial
examples, and I am encountering errors with some of the ncurses
tutorial
examples.
The examples ncurses/hello.e and ncurses/pad.e seem to run ok for me,
but others such as  ncurses/menu.e give an error.
See below for the output I get from compiling and running
ncurses/menu.e

I'm not sure if others can compile and run this example ok?
I am very far from being an expert, so it could well be a setup issue
with my system. FYI - I am running liberty eiffel bell on Slackware
Linux 14.2, 64 bit version.

Thanks very much for any help, or pointers in the right direction :).

Best wishes, Aaron

----
bash-4.3$ se compile menu.e -o menu
bash-4.3$ ./menu
12 frames in run-time stack.
====  Bottom of run-time stack  ====
<system root>
Current = MENU#0x2077078
      [ menubar = Void
        root_window = #0x2134558
      ]
line 15 column 4 file
/home/aaron/Eiffel/liberty-eiffel/tutorial/ncurses/menu.e
======================================
make MENU
Current = MENU#0x2077078
      [ menubar = Void
        root_window = #0x2134558
      ]
items =
HASHED_DICTIONARY[HASHED_DICTIONARY[STRING,STRING],STRING]#0x21478f8
      [ free_nodes = #0x2149908
        cache_node = #0x21619b8
        buckets =
NATIVE_ARRAY[HASHED_DICTIONARY_NODE[HASHED_DICTIONARY[STRING,STRING],
STRING]]#0x214b930
        count = 3
        cache_user = 3
        generation = 3
        capacity = 53
        cache_buckets = 28
      ]
item = HASHED_DICTIONARY[STRING,STRING]#0x21539a8
      [ free_nodes = #0x2155938
        cache_node = #0x215fa98
        buckets =
NATIVE_ARRAY[HASHED_DICTIONARY_NODE[STRING,STRING]]#0x2157cc0
        count = 3
        cache_user = 3
        generation = 3
        capacity = 53
        cache_buckets = 30
      ]
line 43 column 30 file
/home/aaron/Eiffel/liberty-eiffel/tutorial/ncurses/menu.e
======================================
make NCURSES_MENUBAR[STRING]
Current = NCURSES_MENUBAR[STRING]#0x2163978
      [ window = #0x2134590
        parent = Void
        children = #0x2165aa0
        menus = #0x216fa98
        last_choice_memory = Void
        top = 0
        height = 6
        width = 239
        selected = 0
        left = 0
        is_children_drawing_disable = False
        hidden = False
        valid_choice = False
      ]
p = NCURSES_WINDOW#0x2134558
      [ children = #0x2165a78
        parent = Void
        widget = POINTER#0x20b85a0
        last_keypress = 0
        get_fg_color = 7
        get_bg_color = 0
        disposed = False
        hidden = False
        is_children_drawing_disable = False
      ]
y = 0
mns =
HASHED_DICTIONARY[HASHED_DICTIONARY[STRING,STRING],STRING]#0x21478f8
      [ free_nodes = #0x2149908
        cache_node = #0x21619b8
        buckets =
NATIVE_ARRAY[HASHED_DICTIONARY_NODE[HASHED_DICTIONARY[STRING,STRING],
STRING]]#0x214b930
        count = 3
        cache_user = 3
        generation = 3
        capacity = 53
        cache_buckets = 28
      ]
with_border = True
m = 3
i = 4
x = 14
items = ARRAY[NCURSES_MENU_ITEM[STRING]]#0x2179b08
      [ storage = NATIVE_ARRAY[NCURSES_MENU_ITEM[STRING]]#0x217bb20
        lower = 1
        generation = 4
        capacity = 3
        upper = 3
      ]
line 203 column 77 file
/usr/local/bell/src/lib/ncurses/ncurses_menubar.e
======================================
create expression wrapper
======================================
make NCURSES_MENU[STRING]
Current = NCURSES_MENU[STRING]#0x2185b98
      [ tag = "menu 3"
        window = Void
        last_choice_memory = Void
        children = Void
        parent = #0x2163978
        items = #0x2179b08
        width = 8
        top = 1
        left = 14
        selected = 1
        height = 5
        valid_choice = False
        hidden = False
        has_border = True
        is_children_drawing_disable = False
      ]
p = NCURSES_MENUBAR[STRING]#0x2163978
      [ window = #0x2134590
        parent = Void
        children = #0x2165aa0
        menus = #0x216fa98
        last_choice_memory = Void
        top = 0
        height = 6
        width = 239
        selected = 0
        left = 0
        is_children_drawing_disable = False
        hidden = False
        valid_choice = False
      ]
x = 14
y = 1
t = "menu 3"
its = ARRAY[NCURSES_MENU_ITEM[STRING]]#0x2179b08
      [ storage = NATIVE_ARRAY[NCURSES_MENU_ITEM[STRING]]#0x217bb20
        lower = 1
        generation = 4
        capacity = 3
        upper = 3
      ]
with_border = True
i = 4
line 153 column 51 file
/usr/local/bell/src/lib/ncurses/ncurses_menu.e
======================================
create_sub_window NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134590
      [ children = #0x2165ac8
        parent = #0x2134558
        widget = POINTER#0x2165970
        last_keypress = 0
        get_fg_color = 7
        get_bg_color = 0
        disposed = False
        hidden = False
        is_children_drawing_disable = False
      ]
x = 14
y = 1
columns = 8
lines = 5
Result = Void
line 258 column 49 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
make_sub_window NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = False
        hidden = False
        is_children_drawing_disable = False
      ]
w = NCURSES_WINDOW#0x2134590
      [ children = #0x2165ac8
        parent = #0x2134558
        widget = POINTER#0x2165970
        last_keypress = 0
        get_fg_color = 7
        get_bg_color = 0
        disposed = False
        hidden = False
        is_children_drawing_disable = False
      ]
x = 14
y = 1
columns = 8
lines = 5
line 728 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
init NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = False
        hidden = False
        is_children_drawing_disable = False
      ]
line 743 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
set_cursor NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = False
        hidden = False
        is_children_drawing_disable = False
      ]
x = 0
y = 0
line 150 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
valid_cursor NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = False
        hidden = False
        is_children_drawing_disable = False
      ]
x = 0
y = 0
Result = False
line 161 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
valid_cursor_x NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = False
        hidden = False
        is_children_drawing_disable = False
      ]
x = 0
Result = False
line 120 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
width NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = False
        hidden = False
        is_children_drawing_disable = False
      ]
Result = -6
line 172 column 17 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
====  Top of run-time stack   ====
*** Error at Run Time ***: Class Invariant Violation.
*** Error at Run Time ***: window /= Void
18 frames in run-time stack.
====  Bottom of run-time stack  ====
<system root>
Current = MENU#0x2077078
      [ menubar = Void
        root_window = #0x2134558
      ]
line 15 column 4 file
/home/aaron/Eiffel/liberty-eiffel/tutorial/ncurses/menu.e
======================================
make MENU
Current = MENU#0x2077078
      [ menubar = Void
        root_window = #0x2134558
      ]
items =
HASHED_DICTIONARY[HASHED_DICTIONARY[STRING,STRING],STRING]#0x21478f8
      [ free_nodes = #0x2149908
        cache_node = #0x21619b8
        buckets =
NATIVE_ARRAY[HASHED_DICTIONARY_NODE[HASHED_DICTIONARY[STRING,STRING],
STRING]]#0x214b930
        count = 3
        cache_user = 3
        generation = 3
        capacity = 53
        cache_buckets = 28
      ]
item = HASHED_DICTIONARY[STRING,STRING]#0x21539a8
      [ free_nodes = #0x2155938
        cache_node = #0x215fa98
        buckets =
NATIVE_ARRAY[HASHED_DICTIONARY_NODE[STRING,STRING]]#0x2157cc0
        count = 3
        cache_user = 3
        generation = 3
        capacity = 53
        cache_buckets = 30
      ]
line 43 column 30 file
/home/aaron/Eiffel/liberty-eiffel/tutorial/ncurses/menu.e
======================================
make NCURSES_MENUBAR[STRING]
Current = NCURSES_MENUBAR[STRING]#0x2163978
      [ window = #0x2134590
        parent = Void
        children = #0x2165aa0
        menus = #0x216fa98
        last_choice_memory = Void
        top = 0
        height = 6
        width = 239
        selected = 0
        left = 0
        is_children_drawing_disable = False
        hidden = False
        valid_choice = False
      ]
p = NCURSES_WINDOW#0x2134558
      [ children = #0x2165a78
        parent = Void
        widget = POINTER#0x20b85a0
        last_keypress = 0
        get_fg_color = 7
        get_bg_color = 0
        disposed = True
        hidden = False
        is_children_drawing_disable = False
      ]
y = 0
mns =
HASHED_DICTIONARY[HASHED_DICTIONARY[STRING,STRING],STRING]#0x21478f8
      [ free_nodes = #0x2149908
        cache_node = #0x21619b8
        buckets =
NATIVE_ARRAY[HASHED_DICTIONARY_NODE[HASHED_DICTIONARY[STRING,STRING],
STRING]]#0x214b930
        count = 3
        cache_user = 3
        generation = 3
        capacity = 53
        cache_buckets = 28
      ]
with_border = True
m = 3
i = 4
x = 14
items = ARRAY[NCURSES_MENU_ITEM[STRING]]#0x2179b08
      [ storage = NATIVE_ARRAY[NCURSES_MENU_ITEM[STRING]]#0x217bb20
        lower = 1
        generation = 4
        capacity = 3
        upper = 3
      ]
line 203 column 77 file
/usr/local/bell/src/lib/ncurses/ncurses_menubar.e
======================================
create expression wrapper
======================================
make NCURSES_MENU[STRING]
Current = NCURSES_MENU[STRING]#0x2185b98
      [ tag = "menu 3"
        window = Void
        last_choice_memory = Void
        children = Void
        parent = #0x2163978
        items = #0x2179b08
        width = 8
        top = 1
        left = 14
        selected = 1
        height = 5
        valid_choice = False
        hidden = False
        has_border = True
        is_children_drawing_disable = False
      ]
p = NCURSES_MENUBAR[STRING]#0x2163978
      [ window = #0x2134590
        parent = Void
        children = #0x2165aa0
        menus = #0x216fa98
        last_choice_memory = Void
        top = 0
        height = 6
        width = 239
        selected = 0
        left = 0
        is_children_drawing_disable = False
        hidden = False
        valid_choice = False
      ]
x = 14
y = 1
t = "menu 3"
its = ARRAY[NCURSES_MENU_ITEM[STRING]]#0x2179b08
      [ storage = NATIVE_ARRAY[NCURSES_MENU_ITEM[STRING]]#0x217bb20
        lower = 1
        generation = 4
        capacity = 3
        upper = 3
      ]
with_border = True
i = 4
line 153 column 51 file
/usr/local/bell/src/lib/ncurses/ncurses_menu.e
======================================
create_sub_window NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134590
      [ children = #0x2165ac8
        parent = #0x2134558
        widget = POINTER#0x2165970
        last_keypress = 0
        get_fg_color = 7
        get_bg_color = 0
        disposed = True
        hidden = False
        is_children_drawing_disable = False
      ]
x = 14
y = 1
columns = 8
lines = 5
Result = Void
line 258 column 49 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
make_sub_window NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = True
        hidden = False
        is_children_drawing_disable = False
      ]
w = NCURSES_WINDOW#0x2134590
      [ children = #0x2165ac8
        parent = #0x2134558
        widget = POINTER#0x2165970
        last_keypress = 0
        get_fg_color = 7
        get_bg_color = 0
        disposed = True
        hidden = False
        is_children_drawing_disable = False
      ]
x = 14
y = 1
columns = 8
lines = 5
line 728 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
init NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = True
        hidden = False
        is_children_drawing_disable = False
      ]
line 743 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
set_cursor NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = True
        hidden = False
        is_children_drawing_disable = False
      ]
x = 0
y = 0
line 150 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
valid_cursor NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = True
        hidden = False
        is_children_drawing_disable = False
      ]
x = 0
y = 0
Result = False
line 161 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
valid_cursor_x NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = True
        hidden = False
        is_children_drawing_disable = False
      ]
x = 0
Result = False
line 120 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
width NCURSES_WINDOW
Current = NCURSES_WINDOW#0x2134638
      [ children = Void
        parent = #0x2134590
        widget = POINTER#0x2187ca0
        last_keypress = 0
        get_fg_color = 0
        get_bg_color = 0
        disposed = True
        hidden = False
        is_children_drawing_disable = False
      ]
Result = -6
line 172 column 17 file
/usr/local/bell/src/lib/ncurses/ncurses_window.e
======================================
Garbage Collector at work.
dispose called (during sweep phase)
======================================
dispose NCURSES_MENUBAR[STRING]
Current = NCURSES_MENUBAR[STRING]#0x2163978
      [ window = #0x2134590
        parent = Void
        children = #0x2165aa0
        menus = #0x216fa98
        last_choice_memory = Void
        top = 0
        height = 6
        width = 239
        selected = 0
        left = 0
        is_children_drawing_disable = False
        hidden = False
        valid_choice = False
      ]
line 189 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_widget.e
======================================
delete NCURSES_MENUBAR[STRING]
Current = NCURSES_MENUBAR[STRING]#0x2163978
      [ window = #0x2134590
        parent = Void
        children = #0x2165aa0
        menus = #0x216fa98
        last_choice_memory = Void
        top = 0
        height = 6
        width = 239
        selected = 0
        left = 0
        is_children_drawing_disable = False
        hidden = False
        valid_choice = False
      ]
line 136 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_widget.e
======================================
dispose_children NCURSES_MENUBAR[STRING]
Current = NCURSES_MENUBAR[STRING]#0x2163978
      [ window = #0x2134590
        parent = Void
        children = #0x2165aa0
        menus = #0x216fa98
        last_choice_memory = Void
        top = 0
        height = 6
        width = 239
        selected = 0
        left = 0
        is_children_drawing_disable = False
        hidden = False
        valid_choice = False
      ]
i = 2
line 204 column 30 file
/usr/local/bell/src/lib/ncurses/ncurses_widget.e
======================================
delete NCURSES_MENU[STRING]
Current = NCURSES_MENU[STRING]#0x2185b98
      [ tag = "menu 3"
        window = Void
        last_choice_memory = Void
        children = Void
        parent = #0x2163978
        items = #0x2179b08
        width = 8
        top = 1
        left = 14
        selected = 1
        height = 5
        valid_choice = False
        hidden = False
        has_border = True
        is_children_drawing_disable = False
      ]
line 136 column 10 file
/usr/local/bell/src/lib/ncurses/ncurses_widget.e
======================================
invariant NCURSES_MENU[STRING]
Current = NCURSES_MENU[STRING]#0x2185b98
      [ tag = "menu 3"
        window = Void
        last_choice_memory = Void
        children = Void
        parent = #0x2163978
        items = #0x2179b08
        width = 8
        top = 1
        left = 14
        selected = 1
        height = 5
        valid_choice = False
        hidden = False
        has_border = True
        is_children_drawing_disable = False
      ]
line 166 column 4 file /usr/local/bell/src/lib/ncurses/ncurses_menu.e
====  Top of run-time stack   ====
*** Error at Run Time ***: Class Invariant Violation.
*** Error at Run Time ***: window /= Void






reply via email to

[Prev in Thread] Current Thread [Next in Thread]