Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Why is my default Culture Info changing

Solved805 views22nd October 2021QAction
1
Jens Vandewalle [SLC] [DevOps Enabler]9.44K 22nd October 2021 0 Comments

Hi Dojo,

I’m using below code to simulate Power Consumption for demo purposes.

After some time I noticed in the trend graph that huge spikes were available.

By adding logging I noticed that a correct value is received when the system is using Culture Info Invariant Culture.

2021/10/22 05:00:59.771|SLManagedScripting.exe|ManagedInterop|CRU|-1|191|property value: 9.52 | expected consumption: 9.52 | expected consumption (W): 396.666666666667 | random value: 0.72 | power consumption: 285.6 | Culture Info: Invariant Language (Invariant Country) | thread culture: Invariant Language (Invariant Country) | System culture: Invariant Language (Invariant Country)

When it goes wrong the system is using Culture Info Dutch (Belgium)

2021/10/22 05:21:20.791|SLManagedScripting.exe|ManagedInterop|CRU|-1|174|property value: 9.52 | expected consumption: 952 | expected consumption (W): 39666,6666666667 | random value: 0,78 | power consumption: 30940 | Culture Info: Dutch (Belgium) | thread culture: Dutch (Belgium) | System culture: Dutch (Belgium)

My question is how it is possible that the Culture Info changes? Is this an issue? Is this DataMiner related? Is this Windows related?

PS: My code is fixed by specifying the Culture Info.

Jens Vandewalle [SLC] [DevOps Enabler] Selected answer as best 22nd October 2021

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Lander Vanhaverbeke [SLC] [DevOps Member]1.00K Posted 22nd October 2021 4 Comments

CurrentCulture is the culture of the thread, which is normally the culture of the OS, unless overridden. I suppose some other QAction sets the Thread culture to InvariantCulture. Depending on the order of execution, it would sometimes be the OS culture (Dutch Belgium), or InviarantCulture.
I advise to use InvariantCulture in your code, so it’s always using the same culture.

Jens Vandewalle [SLC] [DevOps Enabler] Selected answer as best 22nd October 2021
Jens Vandewalle [SLC] [DevOps Enabler] commented 22nd October 2021

Hi Lander, this is the only QAction executed on a regular base (10 seconds) and nothing else is setting the Culture Info in that QAction. I also had a look in the information events and no external sets were done. I know that specifying Invariant Culture will fix this, but this seems to be an issue that the Culture Info suddenly changes.

Lander Vanhaverbeke [SLC] [DevOps Member] commented 22nd October 2021

It doesn’t need to be your QAction. Any QAction that is executed in that same thread could have changed the culture.

Jens Vandewalle [SLC] [DevOps Enabler] commented 22nd October 2021

Does that mean that different elements/protocols are using the same thread? I thought that every element had his own thread.

Simon Declerck [SLC] [DevOps Advocate] commented 22nd October 2021

These threads are indeed shared.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs