Page 1 of 1

[6.3.11/Postgresql] EAccessViolation when connecting

Posted: Tue 26 Apr 2016 05:51
by swierzbicki
Hello,

I have an issue with latest version. My connection code haven't changed for years.

At design time, if I try to connect, i'm getting an EAccessViolation.
At runtime FConnectDialog.Connection.PerformConnect(FRetry) is throwing EAccessViolation.

Any ideas ?

My objects :

Code: Select all

object mainconnection: TUniConnection
  ProviderName = 'PostgreSQL'
  Database = 'xxx'
  SpecificOptions.Strings = (
    'PostgreSQL.ApplicationName=myCRM'
    'PostgreSQL.Schema=public'
    'PostgreSQL.UseUnicode=True')
  Options.DisconnectedMode = True
  Options.KeepDesignConnected = False
  Options.LocalFailover = True
  Username = 'xxx'
  Server = 'xxx'
  ConnectDialog = UniConnectDialog1
  AfterConnect = mainconnectionAfterConnect
  AfterDisconnect = mainconnectionAfterDisconnect
  Left = 64
  Top = 56
  EncryptedPassword = 'xxx'
end
object UniConnectDialog1: TUniConnectDialog
  DatabaseLabel = 'Base de donnees'
  PortLabel = 'Port'
  ProviderLabel = 'Fournisseur'
  DialogClass = 'TfmConnectiondialog'
  Caption = 'Ouverture de session'
  UsernameLabel = 'Nom utilisateur'
  PasswordLabel = 'Mot de passe'
  ServerLabel = 'Serveur'
  ConnectButton = 'Ok'
  CancelButton = 'Annuler'
  LabelSet = lsFrench
  Left = 112
  Top = 56
end
object UniSQLMonitor1: TUniSQLMonitor
  Active = False
  Options = [moDialog, moSQLMonitor, moCustom]
  Left = 176
  Top = 56
end
Callstack

Code: Select all

callstack crc      : $3a8928fd, $f10615ef, $4d43223a
exception number   : 1
exception class    : EAccessViolation
exception message  : Violation d'accès à l'adresse 30E99EA8 dans le module 'pgprovider230.bpl'. Lecture de l'adresse 00000054.

main thread ($1ac8):
30e99ea8 +000 pgprovider230.bpl    Pgsqlprotocoluni                 TPgSQLProtocol.SetUseUnicode
30eba24b +173 pgprovider230.bpl    Pgclassesuni                     TPgSQLConnection.SetProp
13bd765d +161 unidac230.bpl        Uniprovider                      TOptionsList.ImportOptions
13bd5b28 +030 unidac230.bpl        Uniprovider                      TUniProvider.SetObjectProps
30ed1fe5 +0c5 pgprovider230.bpl    Postgresqluniprovider            TPostgreSQLUniProvider.SetObjectProps
13bce0e6 +33a unidac230.bpl        Uni                              TUniConnection.CreateIConnection
139567be +03a dac230.bpl           Dbaccess                         TCustomDAConnection.DoConnect
13bce39f +02f unidac230.bpl        Uni                              TUniConnection.DoConnect
13956bbb +037 dac230.bpl           Dbaccess                         TCustomDAConnection.PerformConnect
13c12a68 +184 unidacvcl230.bpl     Uniconnectform                   TUniConnectForm.DoConnect
13c130ee +002 unidacvcl230.bpl     Uniconnectform                   TUniConnectForm.btConnectClick
5099376b +073 vcl230.bpl           Vcl.Controls           7365   +9 TControl.Click
509b8942 +01e vcl230.bpl           Vcl.StdCtrls           5327   +3 TCustomButton.Click
509b94a8 +050 vcl230.bpl           Vcl.StdCtrls           5798   +6 TCustomButton.CMDialogKey
509931fd +2bd vcl230.bpl           Vcl.Controls           7249  +91 TControl.WndProc
50997d3d +5e9 vcl230.bpl           Vcl.Controls          10079 +158 TWinControl.WndProc
509b85ec +06c vcl230.bpl           Vcl.StdCtrls           5164  +13 TButtonControl.WndProc
50996515 +02d vcl230.bpl           Vcl.Controls           9195   +3 TWinControl.Broadcast
50999e9c +000 vcl230.bpl           Vcl.Controls          11487   +0 TWinControl.CMDialogKey
50ad71ca +092 vcl230.bpl           Vcl.Forms              6741  +26 TCustomForm.CMDialogKey
509931fd +2bd vcl230.bpl           Vcl.Controls           7249  +91 TControl.WndProc
50997d3d +5e9 vcl230.bpl           Vcl.Controls          10079 +158 TWinControl.WndProc
50ad3514 +62c vcl230.bpl           Vcl.Forms              4459 +206 TCustomForm.WndProc
50992e38 +024 vcl230.bpl           Vcl.Controls           7027  +10 TControl.Perform
5099a32d +0d1 vcl230.bpl           Vcl.Controls          11751  +23 TWinControl.CNKeyDown
509931fd +2bd vcl230.bpl           Vcl.Controls           7249  +91 TControl.WndProc
50997d3d +5e9 vcl230.bpl           Vcl.Controls          10079 +158 TWinControl.WndProc
5099735c +02c vcl230.bpl           Vcl.Controls           9786   +3 TWinControl.MainWndProc
50172214 +014 rtl230.bpl           System.Classes        16886   +8 StdWndProc
776e8e54 +034 ntdll.dll                                             KiUserCallbackDispatcher
762a5ede +13e user32.dll                                            SendMessageW
50adc89c +084 vcl230.bpl           Vcl.Forms             10351  +25 TApplication.IsKeyMsg
50adcb4b +0cf vcl230.bpl           Vcl.Forms             10437  +17 TApplication.ProcessMessage
50adcbb2 +00a vcl230.bpl           Vcl.Forms             10473   +1 TApplication.HandleMessage
50ad80ca +1aa vcl230.bpl           Vcl.Forms              7218  +33 TCustomForm.ShowModal
13a62e11 +06d dacvcl230.bpl        Dacvcl                           ShowConnectForm
139745af +237 dac230.bpl           Dbaccess                         TCustomConnectDialog.Execute
13c14897 +067 unidacvcl230.bpl     Unidacvcl                        TUniConnectDialog.Execute
13956b51 +009 dac230.bpl           Dbaccess                         TCustomDAConnection.Connect
13956a6f +06b dac230.bpl           Dbaccess                         TCustomDAConnection.InternalConnect
1395fe80 +088 dac230.bpl           Dbaccess                         TCustomDADataSet.BeginConnection
13bd0f22 +006 unidac230.bpl        Uni                              TCustomUniDataSet.BeginConnection
13960e05 +07d dac230.bpl           Dbaccess                         TCustomDADataSet.OpenCursor
13bd112b +027 unidac230.bpl        Uni                              TCustomUniDataSet.OpenCursor
5106f72d +055 dbrtl230.bpl         Data.DB               12470  +12 TDataSet.SetActive
13960d75 +03d dac230.bpl           Dbaccess                         TCustomDADataSet.SetActive
5106f2a3 +033 dbrtl230.bpl         Data.DB               12313   +3 TDataSet.Loaded
1395fd6e +022 dac230.bpl           Dbaccess                         TCustomDADataSet.Loaded
501554b7 +02b rtl230.bpl           System.Classes         4094   +3 NotifyGlobalLoading
211bb2bc +09c designide230.bpl     ComponentDesigner      2322  +10 TComponentRoot.CreateFromStream
211bb003 +28b designide230.bpl     ComponentDesigner      2272  +37 TComponentRoot.Create
524a1f3f +05b vcldesigner230.bpl   VCLFormDesigner        1484   +3 TVCLFormDesigner.CreateRoot
21e44af8 +478 delphicoreide230.bpl DelphiModule            635  +68 TPascalCodeMgrModHandler.SetupSourceModules
21e44442 +05a delphicoreide230.bpl DelphiModule            518   +5 TPascalCodeMgrModHandler.Create
21e4c04d +06d delphicoreide230.bpl DelphiModule           3020   +6 TPascalGauntletHandler.AttachHandler
20881569 +039 coreide230.bpl       DocModul               3211   +4 TModuleHandlerGauntlet.RunGauntlet
2087c991 +01d coreide230.bpl       DocModul                949   +1 TDocModule.AfterConstruction
206aa76f +037 coreide230.bpl       SourceModule            781   +3 TSourceModule.AfterConstruction
5005fef1 +01d rtl230.bpl           System                17548   +2 @AfterConstruction
2087c340 +12c coreide230.bpl       DocModul                806  +35 TFilterList.OpenFile
509931fd +2bd vcl230.bpl           Vcl.Controls           7249  +91 TControl.WndProc
5005f898 +04c rtl230.bpl           System                16559   +8 TObject.GetInterface
500671ff +00f rtl230.bpl           System                37518   +1 TInterfacedObject.QueryInterface
501afd5e +002 rtl230.bpl           System.SyncObjs        1063   +0 TCriticalSection.Leave
20880525 +125 coreide230.bpl       DocModul               2693  +28 TCodeIDocModule.QueryInterface
50067110 +010 rtl230.bpl           System                36557  +10 @IntfClear
20880542 +142 coreide230.bpl       DocModul               2696  +31 TCodeIDocModule.QueryInterface
206133be +01a coreide230.bpl       ProjectModule          2906   +0 TCustomCodeIProject.QueryInterface
21da9b1e +056 delphicoreide230.bpl BaseDelphiProject      1240   +3 TBaseDelphiProject.OpenModule
2061279c +014 coreide230.bpl       ProjectModule          2636   +1 TCustomCodeIProject.OpenModule
211bd1a9 +081 designide230.bpl     ComponentDesigner      3083   +5 TComponentRoot.LoadDependentModules
211bb040 +2c8 designide230.bpl     ComponentDesigner      2279  +44 TComponentRoot.Create
524a1f3f +05b vcldesigner230.bpl   VCLFormDesigner        1484   +3 TVCLFormDesigner.CreateRoot
21e44af8 +478 delphicoreide230.bpl DelphiModule            635  +68 TPascalCodeMgrModHandler.SetupSourceModules
21e44442 +05a delphicoreide230.bpl DelphiModule            518   +5 TPascalCodeMgrModHandler.Create
21e4c04d +06d delphicoreide230.bpl DelphiModule           3020   +6 TPascalGauntletHandler.AttachHandler
20881569 +039 coreide230.bpl       DocModul               3211   +4 TModuleHandlerGauntlet.RunGauntlet
2087c991 +01d coreide230.bpl       DocModul                949   +1 TDocModule.AfterConstruction
206aa76f +037 coreide230.bpl       SourceModule            781   +3 TSourceModule.AfterConstruction
5005fef1 +01d rtl230.bpl           System                17548   +2 @AfterConstruction
2087c340 +12c coreide230.bpl       DocModul                806  +35 TFilterList.OpenFile
76a79dc6 +086 oleaut32.dll                                          SysFreeString
50067110 +010 rtl230.bpl           System                36557  +10 @IntfClear
0e2b314d +0ed projpageide230.bpl   ProjectPageOptions      117  +14 FindNode
21e354e1 +01d delphicoreide230.bpl PasMgr                11083   +2 TPascalProjectUpdater.FindUsesEntry
204e2fa2 +06a coreide230.bpl       Updaters                992   +7 GetMainFormNameImpl
21e33c0a +01e delphicoreide230.bpl PasMgr                10552   +2 TPascalProjectUpdater.GetMainFormName
21da8d91 +041 delphicoreide230.bpl BaseDelphiProject       983   +5 TBaseDelphiProject.DisplayProject
20613364 +000 coreide230.bpl       ProjectModule          2891   +0 TCustomCodeIProject.DisplayProject
206aee5e +08e coreide230.bpl       ProjectFileUtils        505  +22 ShowProject
208815e2 +012 coreide230.bpl       DocModul               3226   +0 TFileOpenHandler.FileOpen
2087c340 +12c coreide230.bpl       DocModul                806  +35 TFilterList.OpenFile
206a5d39 +041 coreide230.bpl       FileHist                195   +6 TClosedFile.ReOpen
50ac0c6a +0aa vcl230.bpl           Vcl.Menus              2539  +19 TMenuItem.Click
50ac2300 +018 vcl230.bpl           Vcl.Menus              3461   +5 TMenu.DispatchCommand
50ac3572 +082 vcl230.bpl           Vcl.Menus              4622   +4 TPopupList.WndProc
50ac34c1 +01d vcl230.bpl           Vcl.Menus              4597   +2 TPopupList.MainWndProc
50172214 +014 rtl230.bpl           System.Classes        16886   +8 StdWndProc
762a62fb +00b user32.dll                                            DispatchMessageW
50adcb6f +0f3 vcl230.bpl           Vcl.Forms             10443  +23 TApplication.ProcessMessage
50adcbb2 +00a vcl230.bpl           Vcl.Forms             10473   +1 TApplication.HandleMessage
50adcee5 +0c9 vcl230.bpl           Vcl.Forms             10611  +26 TApplication.Run
775a38f2 +022 KERNEL32.DLL                                          BaseThreadInitThunk

Re: [6.3.11/Postgresql] EAccessViolation when connecting

Posted: Tue 26 Apr 2016 06:45
by swierzbicki
This is also happening on empty project.
Should I send you a demo project ?

Re: [6.3.11/Postgresql] EAccessViolation when connecting

Posted: Tue 26 Apr 2016 06:55
by swierzbicki
Exception is raised when setting specific options to

Code: Select all

'PostgreSQL.UseUnicode=True'
Is there a workaround ? This is a serious issue !

Re: [6.3.11/Postgresql] EAccessViolation when connecting

Posted: Wed 27 Apr 2016 12:37
by azyk
Thank you for the information. We have reproduced and fixed this issue. We will try to upload the new UniDAC version with this fix tomorrow.

Re: [6.3.11/Postgresql] EAccessViolation when connecting

Posted: Wed 27 Apr 2016 13:18
by swierzbicki
Thank you

Re: [6.3.11/Postgresql] EAccessViolation when connecting

Posted: Fri 29 Apr 2016 09:32
by AlexP
The new version with this fix is already available for download at our website