bug-ncurses
[Top][All Lists]
Advanced

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

Re: Problems with overlapping windows


From: Stephan Beal
Subject: Re: Problems with overlapping windows
Date: Mon, 16 Mar 2009 22:53:53 +0100

2009/3/16 Jiri Fogl <address@hidden>:
> Exactly this window creation is where I run into the problems - I don't get 
> the
> window. newwin() returns not-NULL pointer (that means success according to
> documentation), but nothing shows up after using box() or mvwaddstr(). And as 
> I
> mentioned before, attempt to manipulate panel assigned to such window i.e.
> through show_panel(), hide_panel() or top_panel() ends up in segmentation
> fault.

It sounds like the new_panel() is the one which is failing.

 if ((wnd = newwin(lines, cols, begin_y, begin_x)) == NULL)
     return;

that "should" throw an exception, otherwise the caller has no
immediate way of know that the construction of the window failed.

   pan = new_panel(wnd);

try checking that for null. If it's segfaulting on panel access, it
would seem that the panel isn't there. Your show() routine explicitly
checks if panel is null, but the ctor doesn't. If you'll refactor a
bit you can call show() from the ctor to avoid code duplication in the
ctor.

:-?

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/




reply via email to

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