[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

task stop beeing executed RSS feed
Forum Index » IoAbstraction & TaskManagerIO
Author Message
bitz


Joined: Apr 1, 2020
Messages: 9
Offline
Hi Forum ,hi Dave,

I'm working on an application for displaying data from an solarcontroller ("epever").

HW is an esp8266.
I have it running, using (in this case) two tasks and mongoose as webserver-lib.
But after a few minutes the tasks stop beeing executed.

Last known RAM conditions seem OK.
Webserver still working and reponds in full.
So i'm a bit lost where to look.
Any hints are very much appreciated.
Thank you !

Bitz

Here is part of the log:
19:47:44.790 >  Heap:   /  free Heap: 26680 / f: 4%
19:47:49.786 > ============> tmEventsUpdateInfoTask exec
19:47:49.797 > ============> MCUupdateInfoTask exec
19:47:50.739 > RRRFFFFFFFFFFFFF
19:47:54.796 > ============> tmEventsUpdateInfoTask exec
19:47:54.805 > ============> MCUupdateInfoTask exec
19:47:59.805 > ============> tmEventsUpdateInfoTask exec
19:47:59.815 > ============> MCUupdateInfoTask exec
19:48:04.814 > ============> tmEventsUpdateInfoTask exec
19:48:04.823 > Time Event: 18.02.2023 / 19:48 h (Night)
19:48:04.826 > updating time
19:48:04.826 > ============> MCUupdateInfoTask exec
19:48:09.824 > ============> tmEventsUpdateInfoTask exec
19:48:09.834 > ============> MCUupdateInfoTask exec
19:48:14.833 > ============> tmEventsUpdateInfoTask exec
19:48:14.842 > ============> MCUupdateInfoTask exec
19:48:19.842 > ============> tmEventsUpdateInfoTask exec
19:48:19.852 > ============> MCUupdateInfoTask exec
19:48:24.851 > ============> tmEventsUpdateInfoTask exec
19:48:24.862 > ============> MCUupdateInfoTask exec
19:48:29.860 > ============> tmEventsUpdateInfoTask exec
19:48:29.870 > ============> MCUupdateInfoTask exec
19:48:34.870 > ============> tmEventsUpdateInfoTask exec
19:48:34.879 > ============> MCUupdateInfoTask exec
19:48:39.879 > ============> tmEventsUpdateInfoTask exec
19:48:39.888 > ============> MCUupdateInfoTask exec
19:48:43.122 > RRRFFFFFFFFFFFFF
19:48:44.888 > ============> tmEventsUpdateInfoTask exec
19:48:44.897 > ============> MCUupdateInfoTask exec
19:48:49.897 > ============> tmEventsUpdateInfoTask exec
19:48:49.906 > ============> MCUupdateInfoTask exec
19:48:54.906 > ============> tmEventsUpdateInfoTask exec
19:48:54.916 > ============> MCUupdateInfoTask exec
19:48:59.915 > ============> tmEventsUpdateInfoTask exec
19:48:59.925 > ============> MCUupdateInfoTask exec
19:49:04.924 > ============> tmEventsUpdateInfoTask exec
19:49:04.933 > Time Event: 18.02.2023 / 19:49 h (Night)
19:49:04.936 > updating time
19:49:04.936 > ============> MCUupdateInfoTask exec
19:49:09.934 > ============> tmEventsUpdateInfoTask exec
19:49:09.944 > ============> MCUupdateInfoTask exec
19:49:14.943 > ============> tmEventsUpdateInfoTask exec
19:49:14.953 > ============> MCUupdateInfoTask exec
19:49:36.065 > RRRFFFFFFFFFFFFF
19:50:29.649 > RRRFFFFFFFFFFFFF
19:51:23.303 > RRRFFFFFFFFFFFFF
19:52:16.968 > RRRFFFFFFFFFFFFF
19:53:10.643 > RRRFFFFFFFFFFFFF


Here a small code sample, the loop():
void loop() {
  taskManager.runLoop();
  webServer.Mongoose_poll();
  if (restartnow)
  {
    Serial.println("Restart");
    delay(1000);
    ESP.restart();
  }
  loopCount++;

  if (loopCount > 500000)
  {
        //       DBGN("============> MCUsleepTask exec");
    Serial.println(taskManager.checkAvailableSlots(taskDebugData, sizeof taskDebugData)); 
    loopCount = 0;
  }
  notifyWebClients_loop();
}


And one of the tasks:
class cTask : public Executable { // from/for taskmanager
protected:
    unsigned long cycleTimeUs;
    bool taskEnabled = false;
    taskid_t taskID = TASKMGR_INVALIDID;
public:
    void start();
};

class cMCUupdateInfoTask : public cTask {
//private:,
public:
    void start(unsigned long intervalUS) {  
    Serial.print(("start MCUupdateInfoTask: ("));
    Serial.print(intervalUS / 1000000);
    Serial.println("s)");

      taskEnabled = true;
      cycleTimeUs = intervalUS; ///2 secs
      taskID = taskManager.scheduleFixedRate(cycleTimeUs, this, TIME_MICROS);
     }
     
    void exec() override {
               DBGN("============> MCUupdateInfoTask exec");
          mcu.updateMCUinfo();
    }
};
extern cMCUupdateInfoTask MCUupdateInfoTask; ;
bitz


Joined: Apr 1, 2020
Messages: 9
Offline
Additional Info.

Trying to find a possible memory leak i added quite a few debug messages, among those a display af the attribues available in TimerTask. This time it ran 12h without issues...
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
Please note that this forum is closed to new entries, and is now readonly, questions about taskmanager - https://github.com/davetcc/TaskManagerIO/discussions

As you can imagine, we have very limited time to look at issues, and we're giving that time to you without charge. Please do provide a standalone sketch that I can run that reproduces the issue on the other forum.

Thanks,
Dave.
 
Forum Index » IoAbstraction & TaskManagerIO
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.