Jump to content

No GUI Events After System Date Change


stephen.thompson@neoventus

Recommended Posts

I'm not sure if this is a uGFX issue or not, but when I do a system("date -s 2017-10-24") call I only get NULL values returned from geventEventWait. If I call this same command "date -s 2017-10-24" from terminal, it updates the datetime with no issue. If I do a system() call with any other command from uGFX, it executes with no issues. Just date updates seem to lock me in to null events. I've also tried stime() and settimeofday() calls, but these lock the events to null as well. If you have any insight, I will really appreciate it. Thank You.

Link to comment
Share on other sites

I am not sure of why doing it on the command line would differ from doing it as a system call. Perhaps one was settling the date forward and one was setting it backwards?

Having said that, geventEventWait has a timeout parameter. You will probably need to debug in to find out what is happening. It sounds like you are using Linux (or some other unix platform) so it is entirely possible that changing the date has affected the timing calls for ugfx.

Places to look...

geventEventWait - obviously

The sleep and other semaphore wait functions in the GOS layer

The time handling in gtimer.

Link to comment
Share on other sites

Thank you for your help. When I execute on the command line I don't have uGFX running. I have tried writing a script that does 'date -s 2017-10-24' and called it from system() which gives the same lock up. I don't think the date is being set backward because I get an invalid date exception thrown if I try to set it backward.

I am using Linux. If changing the date has affected the timing calls, what should I be looking for? I've verified that geventEventWait is timing out and played with the ms timeout parameter. I also tried printing out the gfxSystemTicks() delta between cycles through the gui event loop and the number stays consistent  before and after changing the date. Another oddity is if I wait a couple of minutes, then uGFX suddenly sees the event and things go back to normal.

Is there something I should be looking for specifically with the sleep and semaphore wait functions in GOS? I'm not really using any of these functions currently.

Link to comment
Share on other sites

I implemented a work around for this, by stopping timers before updating the datetime and then starting the timers again afterward. I also had to ignore the geventEventWait() function until the timer had restarted and then allow it to look for events again. I didn't pinpoint the exact culprit, but at least it is working for now.

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