Jump to content

Terminal creation goes to hard-fault


Mat.Alm

Recommended Posts

Hello! I was using ugfx normally and i have the terminal creation  working like this:

void create_term (void)
{
 GWindowInit Gwi;

Gwi.show = TRUE;
Gwi.height = 29;
Gwi.width =  319;
Gwi.x = 0;
Gwi.y = 241;

term1 = gwinConsoleCreate(0, &Gwi);
gwinSetColor(term1, Green);
gwinSetBgColor(term1, Black);
gwinClear(term1);


}

All was working well the terminal works fine! But after enable tabs widget I run in hard fault in the create term function! If I skip calling create_term function the system does not crash and the tabs widget works fine.  So my problem is that terminal and tabs widget can not work together without crash my system :(  Any help?

Edited by Mat.Alm
Link to comment
Share on other sites

You have not fully initialised the Gwi structure. There is a gwin call that you can call to fully initialise the structure before you set the fields you want (sorry I am on my mobile currently so I can't easily look it up for you). Have a look at the gwin demos.

While this may or may not solve your problem, it is definitely a bug in your existing code.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...