Jump to content
Fox

Error: String was not recognized as a valid DateTime.

Recommended Posts

Every time some part of Plastic client GUI refreshes, it displays the following error:

  "Error
     String was not recognized as a valid DateTime."

After clicking 'OK', Plastic continues to operate as usual. I suspect this might be because I have changed date and time format on my system.

Re-installing Plastic fixes the issue for a while, but then it comes back. Sometimes after a single computer re-start, sometimes after a few days.

Version of last occurrence: 8.0.16.3868

Occurs when refreshing:

  •   Workspace explorer
  •   Pending changes view
  •   Branch explorer
  •   Changesets view
  •   Branches view

 

  •   Labels view
  •   Attributes view
  •   Shelves view
  •   Sync repositories view

 

  •   Repositories view
  •   Workspaces view

 

  •   Clould tab

Doesn't occur with:

  •   Code reviews view

 

  •   Plastic Tube tab

error.png

Share this post


Link to post
Share on other sites

P.S. When clicking 'information', the error pops up and information doesn't. So perhaps it is triggered by trying to display information.

Share this post


Link to post
Share on other sites

Hi,

What operating system are you using? Wew haven't been reported this issue before. I think it should be something specific from your environment.

Could you also attach the Plastic client log?

Regards,

Carlos.

 

Share this post


Link to post
Share on other sites

Windows 7, 64 bit.

2020-01-21 15:31:38,751  \F WARN  DPISettings - LoadLibrary failed. API must not be available SetProcessDpiAwareness
2020-01-21 15:31:39,211  \F INFO  LeapMotionController - Leap motion configuration file has not been detected
2020-01-21 15:31:39,227  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,230  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,317  \F ERROR MainForm - String was not recognized as a valid DateTime.
2020-01-21 15:31:39,358  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,613  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,633  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,635  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,637  \F INFO  Serialization - ChangesetExtendedInfoArray [23] deserialized in 0 ms.
2020-01-21 15:31:39,640  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,641  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,647  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,648  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,653  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,654  \F INFO  CmConnectionCredentials - Using profile [localhost:8087_UPWorkingMode] to connect to [localhost:8087]
2020-01-21 15:31:39,985  \F ERROR LogoCustomizer - Unable to retrieve http://www.plasticscm.com/externalcontent/logos/plasticscmlogoi3.png image, Parameter is not valid.
2020-01-21 15:31:40,279  \F ERROR plastic - Plastic SCM client version: 8.0.16.3868
2020-01-21 15:31:40,279  \F ERROR plastic - 
Error message: String was not recognized as a valid DateTime.

I attached my system time and date format.

my_date_format.png

my_time_format.png

Share this post


Link to post
Share on other sites

Could you also attach the "plastic.debug.log.txt"? The stack trace and the detailed log may give us some more clues.

Do you have installed NET 4.5.1 in your machine?

Does the machine use any specific culture/language that may be using a different calendar? 

Regards,

Carlos.

Share this post


Link to post
Share on other sites

1. I don't have .NET 4.5.1, but I do have 4.8.

2. Yes, I have highly unusual date and time format setup.

Here is the relevant part of plastic.debug.log:
 

2020-01-23 14:45:33,667  \F ERROR plastic - Plastic SCM client version: 8.0.16.3868
2020-01-23 14:45:33,668  \F ERROR plastic - 
Error message: String was not recognized as a valid DateTime.
2020-01-23 14:45:33,769  \F DEBUG plastic - 
StackTrace:    at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at Codice.I3.I3Control.InvokeMethod(Control c, Delegate method, Object[] args)
   at am1.bj()
   at am1.g()
   at aop.a()

 

Share this post


Link to post
Share on other sites

Hi,

Quote

2. Yes, I have highly unusual date and time format setup.

Well, I think this is the key of the problem. What is the culture, language and time format you are using?

I can see you are also using WIndows 7? This is very old. Isn't it possible for you to upgrade?

Regards,

Carlos.

Share this post


Link to post
Share on other sites
  • I'm using 'dd.MM.yyyyy' for short and long date format,  'HHmm' for short time format, and  'HHmmss' for long time format.
  • I was considering to, but decided against it for the time being.

I would consider dependency on a certain DateTime format a bug, since users are able to easily change it. (While they are not able to change the unix system clock, for example.) If that is intended behavior, it would be only a minor inconvenience for me to change my DateTime format in order to get rid of the error.

Thank you for your time.

Share this post


Link to post
Share on other sites

This is the first time we see this porblem so far. We will try to schedule a task to protect this scenario but most probably it won't be avilable for the near future.

Regards,

Carlos.

  • Thanks 1

Share this post


Link to post
Share on other sites

Use DateTime.ParseExact.- Converts the specified string representation of a date and time to its DateTime equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly. ParseExact and TryParseExact allows to use a custom format string.

DateTime date = DateTime.ParseExact(strDate, "dd/MM/yyyy", CultureInfo.InvariantCulture);

The IFormatProvider parameter specifies the culture to use to parse the date. Unless your string comes from the user, you should pass CultureInfo.InvariantCulture. If the string does come from the user, you should pass CultureInfo.CurrentCulture, which will use the settings that the user specified in Regional Options in Control Panel.
 

  • Like 1

Share this post


Link to post
Share on other sites

Hi @warnerjonn,

Are you also affected by this problem? What is your operating system? The thing is we haven't been reported this issue from other customers so it hasn't been yet scheduled.

Regards,

Carlos.

Share this post


Link to post
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...