AdguardTeam / AdguardForWindows

AdGuard for Windows open bug tracker
https://adguard.com/
689 stars 72 forks source link

Crash after install on Windows 7 x86 #787

Closed ameshkov closed 8 years ago

ameshkov commented 8 years ago
Exception Info: System.AggregateException
Stack:
   at System.Threading.Tasks.TaskExceptionHolder.Finalize()

First of all, we should catch such exceptions: http://stackoverflow.com/questions/15804059/exception-while-running-system-threading-tasks-task

Or switch to using fastthreadpool instead of Task.

ameshkov commented 8 years ago
INFO, AdguardSvc, 3, 29.01.2016 1:03:22.215, Loading protection settings and reconfiguring filtering
INFO, AdguardSvc, 3, 29.01.2016 1:03:22.216, Start preparing filtering configuration
INFO, AdguardSvc, 3, 29.01.2016 1:03:22.251, Adding 12299 rules from filter 1
ERROR, AdguardSvc, 2, 29.01.2016 1:03:22.264, Unhandled exception: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.
Source: mscorlib
Stack trace:    at System.Threading.Tasks.TaskExceptionHolder.Finalize()

    System.NullReferenceException: Object reference not set to an instance of an object.
    Source: Adguard.Service
    Stack trace:    at Adguard.Service.Userscripts.UserscriptService.CheckForUserscriptsUpdates(Boolean forced)
   at Adguard.Service.Settings.SettingService.<>c__DisplayClass1.<CheckForSwitchUpdateChannel>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
ameshkov commented 8 years ago

Second exception was fired just after safebrowsing DB creation (look at thread 5)

Second exception in the log:

INFO, AdguardSvc, 3, 29.01.2016 1:03:14.622, Adguard Assistant already installed so skip it
INFO, AdguardSvc, 3, 29.01.2016 1:03:14.700, Adguard Popup Blocker already installed so skip it
INFO, AdguardSvc, 3, 29.01.2016 1:03:14.773, Web of Trust already installed so skip it
INFO, AdguardSvc, 5, 29.01.2016 1:03:14.786, Initializing SafeBrowsingDao. Database location is: C:\ProgramData\Adguard\safebrowsing.db
INFO, AdguardSvc, 5, 29.01.2016 1:03:14.786, Safebrowsing.CreateDatabase
INFO, AdguardSvc, 6, 29.01.2016 1:03:14.803, Start process from system account.
INFO, AdguardSvc, 6, 29.01.2016 1:03:14.804, Scheduling UI agent run task /c "schtasks /create /xml C:\ProgramData\Adguard\Temp\config9a7463b73b8945b9b8db684c2effd29d.xml /tn AdguardUpdater /f".
INFO, AdguardSvc, 6, 29.01.2016 1:03:14.816, Preparing process result is True.
INFO, AdguardSvc, 6, 29.01.2016 1:03:14.816, Waiting for apply.
INFO, AdguardSvc, 5, 29.01.2016 1:03:14.823, Database C:\ProgramData\Adguard\safebrowsing.db has been created
INFO, AdguardSvc, 5, 29.01.2016 1:03:14.824, SafebrowsingDao has been initialized successfully.
INFO, AdguardSvc, 3, 29.01.2016 1:03:14.835, ApplicationState: Starting protection...
INFO, AdguardSvc, 3, 29.01.2016 1:03:15.010, Starting network filtering
ERROR, AdguardSvc, 5, 29.01.2016 1:03:15.025, Error while getting license info. Error:System.Data.SQLite.SQLiteException: constraint failed
UNIQUE constraint failed: __preferences.key, __preferences.type
Source: System.Data.SQLite
Stack trace:    at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
   at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
   at Adguard.Commons.Orm.DataMapper`1.InnerInsert(T obj)
   at Adguard.Commons.Orm.DataMapper`1.Insert(T obj)
   at Adguard.Commons.Orm.PreferencesMapper.SetValue(Object key, Object value)
   at Adguard.Service.Database.PreferencesService.MkiKUEjA8RTBjtQ5k7D(Object , Object , Object )
   at Adguard.Service.Database.PreferencesService.SaveLicenseInfo(LicenseInfo info)
   at Adguard.Service.License.LicenseService.uWL0NkYEO6kGfTG14uK(Object , Object )
   at Adguard.Service.License.LicenseService.PNf2fuHqTW(LicenseInfo  )
   at Adguard.Service.License.LicenseService.dN52D1Efjt(LicenseInfo value)
   at Adguard.Service.License.LicenseService.nRq2YwC4js()
   at Adguard.Service.License.LicenseService.lIV2GmXKGe()
ameshkov commented 8 years ago

Memory dump: https://cdn.adguard.com/public/Adguard/github/AdguardForWindows/issue787/AppCrash_adguardsvc.exe_7effd691cc75f43a69a4ca9a4c55fe2f2f4f607_cab_045d09f0.zip

suhan3z commented 8 years ago

Fixed