Secure provisioning tool fails at startup

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Secure provisioning tool fails at startup

5,677 Views
Ylitalo
Contributor I

I have freshly installed Win10 Pro (English - Finland,Sweden...) computer and i'm trying to setup toolchain our toolchain.

Secure provisioning tool flashes the command box and then fails without possibility to read the command content. Using cmd to launch securep results the same behaviour.

=> running the cmd as administrator and running the securep gives:

C:\nxp\MCUX_Provi_v3\bin>securep
INFO: [root] workspace C:\Users\Ylitalo\secure_provisioning
INFO: [root] Loading settings from workspace: NO_SETTINGS
Traceback (most recent call last):
File "securep.py", line 64, in <module>
File "securep.py", line 36, in main
File "securep.py", line 59, in main_run
File "src\gui\main\main_win_ctrl.py", line 547, in run_gui
File "src\gui\main\main_win_ctrl.py", line 62, in __init__
File "src\gui\main\main_win_keys.py", line 82, in __init__
File "src\gui\main\main_win_build.py", line 50, in __init__
File "src\gui\main\main_win_write.py", line 45, in __init__
File "src\gui\main\main_win_core.py", line 53, in __init__
wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(0, 0), "C") == 0" failed at ..\..\src\common\intl.cpp(1694) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!
[11508] Failed to execute script securep

0 Kudos
15 Replies

5,430 Views
pdgendt
Contributor II

I also have this issue, can the wxWidgets dependency get bumped?

The issue @ https://github.com/xraypy/xraylarch/pull/306 seems to have a fix.

0 Kudos

5,425 Views
liborukropec
NXP Employee
NXP Employee

Hello,

 

which version of Secure Provisioning tool do you use? See bellow Marek's response that it has been fixed in V3.1.

 

Regards,

Libor

0 Kudos

5,423 Views
pdgendt
Contributor II

I tried both V3 and V3.1 both have the same result

0 Kudos

5,413 Views
liborukropec
NXP Employee
NXP Employee

Hello Pieter,

could you please provide information about

  1. your current locale
  2. from cmd.exe - could you execute the securep.exe so we can see whether the stack is the same or different

Thank you,

Libor

0 Kudos

5,411 Views
pdgendt
Contributor II

Sure,

Systeminfo part:

System Locale: en-gb;English (United Kingdom)
Input Locale: en-us;English (United States)

 Stack:

Traceback (most recent call last):
File "securep.py", line 64, in <module>
File "securep.py", line 36, in main
File "securep.py", line 59, in main_run
File "src\gui\main\main_win_ctrl.py", line 562, in run_gui
File "src\gui\main\main_win_ctrl.py", line 61, in __init__
File "src\gui\main\main_win_keys.py", line 82, in __init__
File "src\gui\main\main_win_build.py", line 55, in __init__
File "src\gui\main\main_win_write.py", line 49, in __init__
File "src\gui\main\main_win_core.py", line 61, in __init__
wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(0, 0), "C") == 0" failed at ..\..\src\common\intl.cpp(1694) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!
[20736] Failed to execute script securep
0 Kudos

5,323 Views
marek-trmac
NXP Employee
NXP Employee

Hi pdgendt,

we have tried on different machines, but we still cannot reproduce your issue. Could you provide additional details/screenshots with computer settings?

It seems the original issue is still fixed, however, there might be any other configuration, which does not work. We'd need to reproduce the issue, to be sure, we can fix it.

Thank your for your help

Regards,
Marek
0 Kudos

5,318 Views
pdgendt
Contributor II

I'd like to help, but I'm not sure what other info you need to be able to reproduce it.

Any suggestions besides the following?
OS: window 10 pro 64bit
python: v3.9.0
Secure provisioning tool: v3.1

0 Kudos

5,303 Views
marek-trmac
NXP Employee
NXP Employee

Hi, could you please send screenshot of your settings from:

Windows - Settings - Time&Language - Region

and

Windows - Settings - Time&Language - Language

Regards,
Marek
0 Kudos

5,298 Views
pdgendt
Contributor II

Hi Marek, here are the screenshots

pdgendt_0-1631687795749.pngpdgendt_1-1631687807666.png

 

0 Kudos

5,289 Views
marek-trmac
NXP Employee
NXP Employee

Hi Pieter,

thank you very much for fast response. I can reproduce the problem now and it will be fixed in next version.

As a workaround, please select United States as Region and also Regional Format.

We are sorry for inconvenience.

Regards,
Marek

5,562 Views
marek-trmac
NXP Employee
NXP Employee

Hi Ylitalo,

this issue should be fixed in version 3.1, that was just released.

Regards,
Marek
0 Kudos

5,669 Views
Ylitalo
Contributor I

Ok, So the windows locale needs to be US or UK...

1. This is not the way to do things

2. If there is such limitation it should be stated on the documentation IN LARGE PRINT

0 Kudos

5,625 Views
marek-trmac
NXP Employee
NXP Employee

Hi Ylitalo,

updated: I have reproduced the issue today. It seems SPT does not start if regional format is not listed in https://docs.wxwidgets.org/3.1.4/language_8h.html

Workaround: select format from the list of supported languages.

We're sorry for inconvenience.

Regards

Marek

Regards,
Marek
0 Kudos

5,650 Views
liborukropec
NXP Employee
NXP Employee

Hello Ylitalo,

it seems as known bug of 3rd party code (wxWidgets/Python) with self-explanation title "Avoid WX non-US locales issue on Windows" - https://github.com/xraypy/xraylarch/pull/306

 

I did my best, still I cannot reproduce, even tried combination different Regions and Locales. And the app still can be executed.

liborukropec_0-1626452964157.png

 

Could you please make screenshots when it does not work? Because there can be more combinations. I mean:

 

Settings | Time and Language - Region

- what is Region?

- what is Locale?

 

Settings | Time and Language - Language

- what is the System Language of windows

 

Thank you and regards,

Libor

0 Kudos

5,668 Views
liborukropec
NXP Employee
NXP Employee

Hello Ylitalo,

we'll investigate if there's a better workaround than switching completely the computer local and we'll let you know.

Sorry for the inconvenience.

Regards,

Libor

0 Kudos