slynch8 / 10x

10x IDE/Editor
193 stars 35 forks source link

Error parsing 10x_settings #2881

Open santagada opened 1 month ago

santagada commented 1 month ago

Looking at my 10xOutput pane I discovered this error:

[python]   File "<string>", line 1
[python]     Reading settings: C:/Users/leonardo.santagada/AppData/Roaming/10x/Settings/Settings.10x_settings
[python]                                                                    ^
[python] SyntaxError: invalid decimal literal

as I couldn't figure out what was wrong I moved the settings file and then let 10x re-created it, merged the changes I wanted to keep and this is the remaining diff to the default settings, probably applying this diff you should get the same error I did:

--- C:\Users\leonardo.santagada\AppData\Roaming\10x\Settings\Settings.10x_settings  Fri Oct 18 13:37:54 2024 UTC
+++ C:\Users\leonardo.santagada\AppData\Roaming\10x\Settings\SettingsBroken.10x_settings    Fri Oct 18 13:31:05 2024 UTC
@@ -9,8 +9,8 @@
 # Open the last workspace opened when starting 10x
 OpenLastWorkspaceOnStartup:            true

-# Path of the Visual Studio VsDevCmd.bat or vcvars64.bat batch file to use for setting the Visual Studio build environment. Restart 10X after changing this value. Set to 'auto' to let 10x try and find the path. For 10x workspaces make sure the "Use Visual Studio Build Environment" workspace setting is checked.
+# Path of the Visual Studio VsDevCmd.bat or vcvars64.bat batch file to use for setting the Visual Studio build environment. Restart 10X after changing this value. Set to 'auto' to let 10x try and find the path
-VisualStudioEnvBat:                    C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Auxiliary/Build/vcvars64.bat
+VisualStudioEnvBat:                    C:/Program Files/Microsoft Visual Studio/2022/Professional/Common7/Tools/VsDevCmd.bat

 # Path of the Visual Studio install. Used to find the VisualStudioEnvBat path and to start the VS debugger. eg C:\Program Files (x86)\Microsoft Visual Studio\2019\Community. Set to `default` to automatically find the path to the latest installed VS. Requires restart of 10x.
 VisualStudioInstallPath:               default
@@ -149,9 +149,6 @@
 # Resize the line numbers column to show line numbers this many chars wide
 MinLineNumberWidth:                    3

-# Show line numbers relative to the current line
-RelativeLineNumbers:                   false
-
 # Show the collapse expand margin (true, false)
 ShowCollapseRegionMargin:              true

@@ -171,9 +168,6 @@
 # Valid values: All, Panel
 SwitchFileMode:                        All

-# The tab panel mode. Top, Left or Right
-TabPanelMode:                          Top
-
 # The maximum number of tabs to keep open
 MaxOpenTabs:                           100

@@ -208,9 +202,6 @@
 # True to put the cursor at the start of the selected find text instead of the end
 ReverseFindSelection:                  false

-# Show the match count in the find panel text box
-ShowFindTextMatchCount:                false
-
 # How to set the initial text when the find/replace text panel is shown. Current means use the current word, Selected means use the current selection. Values: (None, Current, Selection)
 # Valid values: None, Current, Selection
 ReplaceTextInitialValue:               Current
@@ -261,9 +252,19 @@
 # File wildcards for files that should automatically open in column 2. Separated by commas.
 Column2Presets:                        *.bat,*.py

+# Show line numbers relative to the current line
+RelativeLineNumbers:                   false
+
+# The tab panel mode. Top, Left or Right
+TabPanelMode:                          Top
+
+# Show the match count in the find panel text box
+ShowFindTextMatchCount:                true
+
 # Gap to the right of columns
 ColumnGap:                             0

+
 # 
 # Edit
 # 
@@ -340,9 +341,6 @@
 # Always use spaces after current tab depth when aligning
 ExtendEmptyLinesUsingSpaces:           false

-# If true the the PrevLocation and NextLocation commands will include docked tool windows
-LocationHistoryIncludesToolPanels:     false
-
 # Enable the Vim style editing
 Vim:                                   false

@@ -388,6 +386,10 @@
 # New comment lines will be started with * when AutoFormatBlockComments is enabled
 AutoFormatBlockCommentsNewLines:       false

+# If true the the PrevLocation and NextLocation commands will include docked tool windows
+LocationHistoryIncludesToolPanels:     false
+
+
 # 
 # Formatting
 # 
@@ -425,7 +427,7 @@
 BuildErrorRegex:                       

 # Close the build output panel after a successful build
-CloseBuildOutputAfterBuild:            false
+CloseBuildOutputAfterBuild:            

 # 
 # Debug
@@ -462,12 +464,6 @@
 # When auto completing a function add the ( bracket and the ) bracket if it has no args
 AutoAddFunctionBrackets:               true

-# Use fuzzy matching in the FindSymbol panel
-FindSymbolFuzzyMatching:               true
-
-# List of comma separated defines for the parser
-GlobalDefines:                         
-
 # Comma separated list of extensions for the C++ parser to parse. Requires a reparse all to take effect.
 ParserExtensions:                      .c,.cc,.cpp,.c++,.cp,.cxx,.h,.hh,.hpp,.h++,.hp,.hxx,.inl,.hq,.ixx,.vert,.frag,.comp,.geom,.eval,.cont,.glsl,.hlsl,.hlsli,.fx,.rgen,.usf,.ush,.cg,.fx,.pssl,.cu,.fxh

@@ -508,11 +504,18 @@
 # Files larger than this size (in bytes) will not be parsed.
 ParserMaxFileSize:                     52428800

+# Allow preprocessor lines to be indented
+AllowPreprocessorLineIndenting:        true
+
+# Use fuzzy matching in the FindSymbol panel
+FindSymbolFuzzyMatching:               true
+
+# List of comma separated defines for the parser
+GlobalDefines:                         
+
 # Limit on the number of token the preprocessor will evaluate
 MaxPreprocessorTokenCount:             10000

-# Allow preprocessor lines to be indented
-AllowPreprocessorLineIndenting:        true

 # 
 # WorkspaceSearch
@@ -524,9 +527,6 @@
 # Comma separated list of wildcards for files to exclude
 Search.ExcludeList:                    */sqlite/*

-# Files in these directories will be added to the workspace search set
-Search.GlobalDirectories:              
-
 # Search will stop searching after this many results have been found
 Search.MaxResults:                     1000

@@ -546,11 +546,15 @@
 # If true, go to a workspace search result will automatically set the find text
 Search.SetFindText:                    true

+# Files in these directories will be added to the workspace search set
+Search.GlobalDirectories:              
+
+
 # 
 # Misc
 # 

-# The maximum number of cores to use, -1 to use Min(SystemCoreCount*0.8, 12) (requires restart)
+# The maximum number of cores to use, -1 to use SystemCoreCount*0.8 (requires restart)
 MaxCoreCount:                          -1

 # Enable verbose logging to the .log file
slynch8 commented 1 month ago

This is very strange, that looks like an error from a python script.

I don't know h ow to apply that diff file, could you send me the entire broken settings file?

santagada commented 1 month ago

Is there some private way to send you that? Its not much but some of the data there I would prefer to keep private.

but its a unified diff you can apply with patch -u (from unix/msys/git).

slynch8 commented 1 month ago

you can upload it here https://10xeditor.com/upload_crash.htm or just remove the lines you don't want to share.

(sorry, I've never used unix/msys/git)

santagada commented 1 month ago

should be there

slynch8 commented 1 month ago

I tried the settings file but I'm not getting the error. The error does look like a python script error though rather than a settings error. As a test, can you try resetting everything back to the defaults and see if you still get the error. Close 10x and rename your %appdata%\10x folder (you can rename it back to restore your current settings).