Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Something broke down in dnGrep" #907

Closed
page200 opened this issue Aug 6, 2023 · 10 comments
Closed

"Something broke down in dnGrep" #907

page200 opened this issue Aug 6, 2023 · 10 comments

Comments

@page200
Copy link

page200 commented Aug 6, 2023

dnGrep is not starting:
Screenshot 2023-08-06 17 03 15

End of Grep_Error_Log.xml:

<logevent time="2023-08-06 16:59:37.9740" level="Error" logger="dnGREP.Common.GrepSettings">
  <message>Error converting settings key [PreviewWindowWrap] of type [System.Boolean] from value [AAEAAAD/////AQAAAAAAAAA[redacted]=]</message>
  <exception>System.FormatException: String &apos;AAEAAAD/////AQAAAAAAAAAEA[redacted]AQs=&apos; was not recognized as a valid Boolean.
   at System.Boolean.Parse(ReadOnlySpan`1 value)
   at System.String.System.IConvertible.ToBoolean(IFormatProvider provider)
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at dnGREP.Common.GrepSettings.Get[T](String key) in C:\projects\dngrep\dnGREP.Common\GrepApplicationSettings.cs:line 850</exception>
</logevent>
<logevent time="2023-08-06 16:59:38.3236" level="Error" logger="dnGREP.Common.GrepSettings">
  <message>Error converting settings key [StartDate] of type [System.Nullable`1[System.DateTime]] from value [AAEAAAD/////AQAAAAAAAA[redacted]AAAAAAAAAAAAAAAAAAAAAL]</message>
  <exception>System.InvalidOperationException: Null default is not allowed for key StartDate
   at dnGREP.Common.GrepSettings.GetDefaultValue[T](String key) in C:\projects\dngrep\dnGREP.Common\GrepApplicationSettings.cs:line 980
   at dnGREP.Common.GrepSettings.Get[T](String key) in C:\projects\dngrep\dnGREP.Common\GrepApplicationSettings.cs:line 809</exception>
</logevent>
<logevent time="2023-08-06 16:59:38.3236" level="Error" logger="dnGREP.WPF.App">
  <message>Failure in application startup</message>
  <exception>System.InvalidOperationException: Null default is not allowed for key StartDate
   at dnGREP.Common.GrepSettings.GetDefaultValue[T](String key) in C:\projects\dngrep\dnGREP.Common\GrepApplicationSettings.cs:line 980
   at dnGREP.Common.GrepSettings.Get[T](String key) in C:\projects\dngrep\dnGREP.Common\GrepApplicationSettings.cs:line 858
   at dnGREP.Common.GrepSettings.GetNullable[T](String key) in C:\projects\dngrep\dnGREP.Common\GrepApplicationSettings.cs:line 722
   at dnGREP.WPF.BaseMainViewModel.LoadSettings() in C:\projects\dngrep\dnGrep.WPF\ViewModels\BaseMainViewModel.cs:line 866
   at dnGREP.WPF.MainViewModel.LoadSettings() in C:\projects\dngrep\dnGrep.WPF\ViewModels\MainViewModel.cs:line 703
   at dnGREP.WPF.BaseMainViewModel..ctor() in C:\projects\dngrep\dnGrep.WPF\ViewModels\BaseMainViewModel.cs:line 36
   at dnGREP.WPF.MainViewModel..ctor() in C:\projects\dngrep\dnGrep.WPF\ViewModels\MainViewModel.cs:line 45
   at dnGREP.WPF.MainForm..ctor(Boolean isVisible) in C:\projects\dngrep\dnGrep.WPF\Views\MainView.xaml.cs:line 97
   at dnGREP.WPF.App.Application_Startup(Object sender, StartupEventArgs e) in C:\projects\dngrep\dnGrep.WPF\App.xaml.cs:line 63</exception>
</logevent>
@doug24
Copy link
Contributor

doug24 commented Aug 6, 2023

What version are you running? This looks like a bug that was fixed in v4.0.45, previously reported in #887

@page200
Copy link
Author

page200 commented Aug 6, 2023

Sorry about the lacking info - I used dnGREP.4.0.45.x64.msi
I had installed it on top of a much older version. After the error, I uninstalled dnGrep and reinstalled dnGREP.4.0.45.x64.msi again from scratch, but the error remained.

@doug24
Copy link
Contributor

doug24 commented Aug 6, 2023

That's strange, it's the same error. Can you attach your copy of dnGREP.Settings.dat so I can debug this?
It is located in C:\Users_username_\AppData\Roaming\dnGREP

@doug24
Copy link
Contributor

doug24 commented Aug 6, 2023

I did find the problem in the logs above (it wasn't the first or second, it was the third one and I stopped reading too soon).

I'd still like to test with your old dnGREP.Settings.dat file go see if there are any other problems.

I'm planning a new release on Tuesday or Wednesday this week. In the meantime, if you want to fix your settings.dat file, replace the StartDate and EndDate with these two lines:

  <item key="StartDate" xsi:nil="true" />
  <item key="EndDate" xsi:nil="true" />

@doug24
Copy link
Contributor

doug24 commented Aug 9, 2023

Fixed in v4.0.69.0

@page200
Copy link
Author

page200 commented Aug 9, 2023

Sorry about the late reply. Shortly after I opened this issue, I uninstalled the new version and installed Version 3.2.330.0 because it works and I needed to use it. Would the dnGREP.Settings.dat file still be useful for you now that I switched to Version 3.2.330.0 and even if I redact for privacy reasons the things I don't understand such as the strings that contain "AAAAA"?

Thank you for the wonderful app!

@loumarquesls
Copy link

loumarquesls commented Aug 9, 2023

Had the same problem, just deleted the folder appdata\roaming\dngrep (from the older version I used) and it worked fine

@doug24
Copy link
Contributor

doug24 commented Aug 9, 2023

Yes, please attach any dnGrep.Settings.dat files you still have so I can debug these issues.

There is nothing private or encrypted in the strings like 'AAEAAAD/////AQAAAAAAAA...' that's just how .NET serializes nullable data such as a nullable Boolean or nullable DateTime. But redact them is you want.

@page200
Copy link
Author

page200 commented Aug 9, 2023

Here's the file, with some stuff replaced by backticks. Somehow this time there are no more nullable data.

<dictionary version="2" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <item key="ApplicationFontFamily">Segoe UI</item>
  <item key="MainFormFontSize">12</item>
  <item key="ReplaceFormFontSize">12</item>
  <item key="DialogFontSize">12</item>
  <item key="ResultsFontFamily">Consolas</item>
  <item key="ResultsFontSize">12</item>
  <item key="SearchFolder">``````</item>
  <item key="SearchFor">``````</item>
  <item key="ReplaceWith">``````</item>
  <item key="FilePattern">*.*</item>
  <item key="FilePatternIgnore">*.o</item>
  <item key="LastCheckedVersion">2023-08-09T11:22:04</item>
  <item key="FastSearchBookmarks">
    <stringArray>
      <string isPinned="false">``````</string>
    </stringArray>
  </item>
  <item key="FastReplaceBookmarks">
    <stringArray>
      <string isPinned="false">``````</string>
    </stringArray>
  </item>
  <item key="FastFileMatchBookmarks">
    <stringArray>
      <string isPinned="false">*.*</string>``````
    </stringArray>
  </item>
  <item key="FastFileNotMatchBookmarks">
    <stringArray>
      <string isPinned="false">*.o</string>``````
      <string isPinned="false"></string>
    </stringArray>
  </item>
  <item key="FastPathBookmarks">
    <stringArray>``````
    </stringArray>
  </item>
  <item key="SortDirection">Ascending</item>
  <item key="TypeOfSort">FileNameDepthFirst</item>
  <item key="ShowResultOptions">True</item>
  <item key="ResultsTreeScale">1</item>
  <item key="ResultsTreeWrap">False</item>
  <item key="HighlightMatches">True</item>
  <item key="ShowLinesInContext">True</item>
  <item key="ContextLinesBefore">2</item>
  <item key="ContextLinesAfter">3</item>
  <item key="PreviewBounds">0,0,0,0</item>
  <item key="PreviewWindowState">Normal</item>
  <item key="PreviewDocked">True</item>
  <item key="PreviewDockSide">Right</item>
  <item key="PreviewDockedWidth">``````</item>
  <item key="PreviewDockedHeight">``````</item>
  <item key="PreviewHidden">False</item>
  <item key="PreviewAutoPosition">True</item>
  <item key="IncludeHidden">True</item>
  <item key="IncludeBinary">True</item>
  <item key="IncludeArchive">False</item>
  <item key="SearchParallel">True</item>
  <item key="IncludeSubfolder">True</item>
  <item key="MaxSubfolderDepth">-1</item>
  <item key="FollowSymlinks">False</item>
  <item key="SkipRemoteCloudStorageFiles">True</item>
  <item key="TypeOfSearch">PlainText</item>
  <item key="CodePage">-1</item>
  <item key="TypeOfFileSearch">Asterisk</item>
  <item key="UseGitignore">False</item>
  <item key="UseFileSizeFilter">No</item>
  <item key="CaseSensitive">False</item>
  <item key="Multiline">False</item>
  <item key="Singleline">False</item>
  <item key="StopAfterFirstMatch">False</item>
  <item key="WholeWord">False</item>
  <item key="BooleanOperators">False</item>
  <item key="CaptureGroupSearch">False</item>
  <item key="HighlightCaptureGroups">False</item>
  <item key="SizeFrom">0</item>
  <item key="SizeTo">100</item>
  <item key="IsFiltersExpanded">False</item>
  <item key="PreviewFileContent">True</item>
  <item key="UseFileDateFilter">All</item>
  <item key="TypeOfTimeRangeFilter">All</item>
  <item key="StartDate" xsi:nil="true" />
  <item key="EndDate" xsi:nil="true" />
  <item key="HoursFrom">0</item>
  <item key="HoursTo">8</item>
  <item key="MainWindowBounds">``````</item>
  <item key="MainWindowState">Maximized</item>
  <item key="PreviewWindowWrap">True</item>
  <item key="PreviewWindowFont">12</item>
  <item key="PersonalizationOn">False</item>
  <item key="ReplaceWindowWrap">False</item>
  <item key="ReplaceWindowFontSize">14</item>
  <item key="ReplaceBounds">``````</item>
  <item key="RestoreLastModifiedDate">False</item>
</dictionary>

@doug24
Copy link
Contributor

doug24 commented Aug 10, 2023

@page200 - thanks for posting. I started dnGrep with your settings exactly as copied above, and there were no errors.

@doug24 doug24 closed this as completed Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants