08-18-2020 07:43 AM
I've come across a strange issue which I'm wondering if anyone else has seen before. I have a built application which reads data from a database, and displays a list of jobs to the shop floor. The jobs have a due date, so it is a simple matter to determine which are late. I display the list of jobs in a multicolumn listbox, and change the background color of any overdue dates to pink from default. I built the application and deployed it to a target laptop PC on the shop floor. The program works perfectly and has run for weeks without issue (i.e. the correct cells are colored and the rest reset to the default) when the PC is logged in as me.
However, when windows does an update, the PC is automatically logged out, and I then have to login again. OK, you say, log in as a generic login that anyone can have access to. However, here is my issue:
The program runs perfectly when logged in as a different user EXCEPT the background color for the overdue dates are ALL colored pink - no selectivity. I've tried with two different users, one with admin privileges, but so far the only login which works is mine.
Any thoughts before I throw the PC out?
Solved! Go to Solution.
08-19-2020 01:17 AM
Do all users use the same windows color theme?
08-19-2020 07:20 AM
Thanks for replying.
All users run exactly the same program (I locate my exe files at C:\Apps\Labview and call from desktop shortcuts), the only difference is the Windows Login (i.e. User).
I realize this is an odd post, but I was wondering if anyone had any experience of seeing this type of behavior and can attribute it to something like a bad sector on a disc (or something!)
08-19-2020 07:51 AM
@MarkTTHSAS wrote:The program runs perfectly when logged in as a different user EXCEPT the background color for the overdue dates are ALL colored pink - no selectivity.
Just trying to understand... Did you possibly mean to say that the background color for ALL dates are pink, not just the overdue ones?
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
08-19-2020 09:11 AM
Correct. Hopefully the image shows up. The promise date shows a pink background when overdue (Today is 19-Aug) when working correctly as shown below:
When logged in as a different user, all the promise date fields are pink...
08-19-2020 09:29 AM
@MarkTTHSAS wrote:
All users run exactly the same program (I locate my exe files at C:\Apps\Labview and call from desktop shortcuts), the only difference is the Windows Login (i.e. User).
I guess I wasn't clear. Each user login can have a different windows theme (settings...personalization). This has nothing to do with the LabVIEW and only depends on the user profile.
If a program has certain colors defined from the six "system colors" in the LabVIEW palette, they will change as a function of user if they use a different theme. Can you make sure that the colors you are using for the cells are NOT system colors?
08-19-2020 09:32 AM
When logged in under an account that isn't yours, does all the data still display correctly? My first thought is some kind of permissions issue reading the DB but if everything appears correct no matter the user then it's not that.
Are you able to log in as a different account and run it in development environment in order to troubleshoot? Or possibly have a colleague/coworker who can run it in development environment on their machine/account?
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
08-19-2020 10:20 AM - edited 08-19-2020 10:21 AM
I'm guessing that you are reading in all of the "promise dates" from some database and then using the "system time" timestamp to check if the promise date exceeds the current system time date? Are there maybe Windows user account settings that could affect the system time checking? It kind of seems to me that all of the date checks are failing. For instance, if the system time stamp is default, all of the "promise dates" will exceed the default timestamp and be colored pink.
08-19-2020 11:26 AM
@playerm1 wrote:
I'm guessing that you are reading in all of the "promise dates" from some database and then using the "system time" timestamp to check if the promise date exceeds the current system time date? Are there maybe Windows user account settings that could affect the system time checking? It kind of seems to me that all of the date checks are failing. For instance, if the system time stamp is default, all of the "promise dates" will exceed the default timestamp and be colored pink.
I like that thought process!
You should add some code to debug. Put a separate indicator in like an array of booleans that show the results of the decision logic as to whether the background should be pink or not. This will help you to determine if it is a logic error or a graphic error in LabVIEW.
08-19-2020 11:33 AM
Some great suggestions here! I like the possibility that the time is being reported incorrectly based on the user - that had never previously crossed my mind! - but it is the most obvious explanation.
If it looks like a duck...