Jump to content

Console wont init/history


cheater

Recommended Posts

This Topic is closely related to my other topic: https://community.ugfx.io/topic/454-weird-behavior/

One of the problem is that i cant use the history function of the console. If it "exceeds the display" and it is not visibile it will crash.

For this Topic i wanted to use your example from https://wiki.ugfx.io/index.php/Console

to debug and show the strange behavior in an minimalistic example.


But theres another big failure, because it didn't work . And thats strange, becouse i already use it, but in this example it cant even initialize.

The Call  

GW1 = gwinConsoleCreate(0, &wi); 

will crash in gwin_wm.c
 

_gwinWMAdd

        if (gh->parent && (!(gh->parent->flags & GWIN_FLG_CONTAINER) || gh->display != gh->parent->display))


and leads to _unhandled_exception (infinite loop) in vectors.c from chibios

Edited by cheater
Link to comment
Share on other sites

Either the archive is broken or the corresponding files are missing.
As mentioned, please give us a minimal test case that allows reproducing the problem. There is tons of stuff in that archive that has nothing to do with this problem. A minimal test case consists of nothing but the most minimal code required to reproduce the problem.

Link to comment
Share on other sites

We couldn't manage to reproduce the problem yet. So far everything appears to be working as expected.

 

9 hours ago, cheater said:

One of the problem is that i cant use the history function of the console. If it "exceeds the display" and it is not visibile it will crash.

Does this mean that it crashes if the console widget is partially off-screen?

Link to comment
Share on other sites

Try your same program under win32 or linux. If it works there it indicates that the threading or memory allocation has a problem on your platform.

The most obvious of those is memory allocation. Debug to check that the gfxAlloc calls are not failing. If they fail then strange things might happen ;)

Link to comment
Share on other sites

Yeah, that's what I did - it appears to work correctly unless we missed something less obvious. As @inmarket mentioned, this might be an platform specific issue. It is usually a good idea to develop the entire application on a desktop system. The entire µGFX application code is completely portable and you can compile native applications for Windows, Linux, Mac OS X and BSD. Developing a µGFX application on a desktop system is a lot faster, less cumbersome & easier to debug.

Link to comment
Share on other sites

Hi, have you tried it with my gfxconf.h? It works with the provided one from you , but it will crash with mine.

 

EDIT: Figured out that  #define GWIN_NEED_CONTAINERS TRUE was the reason for THAT problem with the demo just add it to the conf and it will freeze during init process

Kind Regards

cheater

Edited by cheater
Link to comment
Share on other sites

4 hours ago, cheater said:

Hi, have you tried it with my gfxconf.h? It works with the provided one from you , but it will crash with mine.

Yes, we tried it with your config file.

 

4 hours ago, cheater said:

EDIT: Figured out that  #define GWIN_NEED_CONTAINERS TRUE was the reason for THAT problem with the demo just add it to the conf and it will freeze during init process

Enabling containers definitely shouldn't lead to a crash or any other unexpected behavior. We'll give it a try and let you know. However, this might have to wait until Monday.

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...