ConsoleView not working?

  • I wish to debug my attempts at building an app and have come across ConsoleView through another post on debug. Now, my problem is that I can't seem to get ConsoleView to be working.

    This is what I have done:

    1. Created a hello_world app using the template "monomake project hello_world"
    2. Built, installed and ran the app. It shows the default label.
    3. Added ConsoleView to the AppController in app_controller.h:
    class AppController : public mono::IApplication {
    	// Added ConsoleView with 176 in width and 100 in height
    	ConsoleView<176, 100> console;
    1. I then asked it to show itself on wake up in app_controller.cpp:
    void AppController::monoWakeFromReset()
    1. Finally I ran the app and it shows a blank (not black) screen. No label and no "Starting" message
    2. I figured that ConsoleView could be missing a position so I added the that in app_controller.cpp:
    AppController::AppController() :
    1. The net result is the same. Blank screen. No label and no console.

    So what am I doing wrong?

  • the code seems to work for me ...

    but when I compiled/installed it the first time the screen stayed white, so I played around with console.setTextColor(...)
    then it worked ... then I removed the setTextColor and it still works O_o and now I'm confused XD

    btw. it is also working without the position, it will then show up at 0,0 (upper left)

  • ok, now I got the issues again ... it is depending on output and size of the console view (smaller view and less log output reduce the likelihood)

    so, I pocked into the implementation a bit ... first I suspected those loops in repaint: "while ((*line != '\0' && *line != '\n')) {"
    ... I think they wont work correct when writing lines longer then LineLength, but tweaking this part didn't solve my issue

    so, I thought about how the memory is handled and realized that everything is on the stack ( AppController.console.textBuffer and all my wifi test-code ) ... when I put the console on the heap, the console view works properly!
    Has someone seen any information about the stack size? (a full size console would be 384Bytes of text ... and with the other stuff I'm maybe around 500bytes)
    ... hmm, but I think there should be a lot more space then that (if I read some of the toolchain files correctly the stack is 16kB ...)

Log in to reply