![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 9 of 9 total |
![]() |
Mon, May 28 2007 1:59 AM | Permanent Link |
Clive | Hi,
I have been experiencing AV's in DBISAM, when freeing objects, they appear to be random, but since I upgraded to the later versions my users have been expericeing these kind of frequently, always seems to be when freeing objects This example below was caused from this piece of code. Line 5079 in Alldata is the qry.free from this section of code. I know these things are very hard to see why this would occur, but im hoping maybe something would ring a bell ![]() Thanks Clive. ------------------------------------------ qry := TDBISAMQuery.Create(nil); try ExecuteSQL('select round(a.value - l.value) as value,period '+ ' from rpt_generic_detail a '+ ' inner join rpt_generic_detail l on a.period = l.period and a.scenario_code = l.scenario_code ' + ' where a.rowid = 38 and l.rowid = 39 and a.scenario_code = -2 group by period having value <> 0 order by period JOINOPTIMIZECOSTS',qry); if frm_realyser.lbl_balance.Visible then frm_realyser.lbl_balance.Color := clyellow else begin frm_realyser.lbl_balance.Caption := '[Balance sheet does not balance, Please contact support] '; frm_realyser.lbl_balance.Color := clred; end; frm_realyser.lbl_balance.Visible := qry.RecordCount > 0; if frm_quick_test.modified then data.RefreshScenarioDetail(TRUE); frm_quick_test.modified := FALSE; finally qry.free; end; --------------------------------------------- exception class : EAccessViolation exception message : Access violation at address 00586D92 in module 'realyser.exe'. Read of address 00000008. main thread ($1730): 00586d92 +000a realyser.exe dbisamsq TSourceTable.FreeJoins 00589597 +0027 realyser.exe dbisamsq TDataQuery.FreeSourceTables 0058914e +0052 realyser.exe dbisamsq TDataQuery.Destroy 00404ba8 +0008 realyser.exe System TObject.Free 00587c8d +00e5 realyser.exe dbisamsq TQueryStatement.Destroy 00404ba8 +0008 realyser.exe System TObject.Free 0065596d +000d realyser.exe dbisamtb TDBISAMQuery.FreeStatement 00655931 +0069 realyser.exe dbisamtb TDBISAMQuery.SetPrepared 00655477 +0007 realyser.exe dbisamtb TDBISAMQuery.UnPrepare 00655444 +000c realyser.exe dbisamtb TDBISAMQuery.Disconnect 006553ae +0016 realyser.exe dbisamtb TDBISAMQuery.Destroy 00404ba8 +0008 realyser.exe System TObject.Free 00a2fbbc +07c0 realyser.exe alldata 5079 +147 TData.RefreshCharts 00405382 +002a realyser.exe System @HandleFinally 77c61006 +0081 ntdll.dll RtlRaiseStatus 77c22c46 +00de ntdll.dll RtlUnwind 00405176 +00d2 realyser.exe System @HandleAnyException 77c61006 +0081 ntdll.dll RtlRaiseStatus 77c60e92 +000a ntdll.dll KiUserExceptionDispatcher 0064e5af +0007 realyser.exe dbisamtb TDBISAMDataSet.GetRecordCount 00a2fb68 +076c realyser.exe alldata 5072 +140 TData.RefreshCharts 009e8309 +0189 realyser.exe main 805 +25 Tfrm_realyser.WMRealyser_stage1_complete 004e141c +0188 realyser.exe Controls TControl.WndProc 004e4487 +0157 realyser.exe Controls TWinControl.WndProc 004fbf41 +0421 realyser.exe Forms TCustomForm.WndProc 009070db +000b realyser.exe VistaAltFixUnit 243 +1 TFormObj.WndProc 004e4104 +002c realyser.exe Controls TWinControl.MainWndProc 0047b1f4 +0014 realyser.exe Classes StdWndProc 77da3c85 +000a user32.dll DispatchMessageA 0050261f +0083 realyser.exe Forms TApplication.ProcessMessage 00502656 +000a realyser.exe Forms TApplication.HandleMessage 00502886 +0096 realyser.exe Forms TApplication.Run 00a379c9 +1319 realyser.exe realyser 524 +345 initialization 769f3831 +0010 kernel32.dll BaseThreadInitThunk |
Mon, May 28 2007 3:55 AM | Permanent Link |
Clive | Heres another one.. This occured when disconnecting from the database as the application was exitting.
Seems to be on TSourceTable.FreeJoins both times. exception number : 2 exception class : EAccessViolation exception message : Access violation at address 00586D92 in module 'realyser.exe'. Read of address 00000008. main thread ($1730): 00586d92 +000a realyser.exe dbisamsq TSourceTable.FreeJoins 00589597 +0027 realyser.exe dbisamsq TDataQuery.FreeSourceTables 0058914e +0052 realyser.exe dbisamsq TDataQuery.Destroy 00404ba8 +0008 realyser.exe System TObject.Free 00587c8d +00e5 realyser.exe dbisamsq TQueryStatement.Destroy 00404ba8 +0008 realyser.exe System TObject.Free 0065596d +000d realyser.exe dbisamtb TDBISAMQuery.FreeStatement 00655931 +0069 realyser.exe dbisamtb TDBISAMQuery.SetPrepared 00655477 +0007 realyser.exe dbisamtb TDBISAMQuery.UnPrepare 00655444 +000c realyser.exe dbisamtb TDBISAMQuery.Disconnect 0064b9b8 +0018 realyser.exe dbisamtb TDBISAMDatabase.CloseDataSets 0064b967 +000b realyser.exe dbisamtb TDBISAMDatabase.DoDisconnect 0051d9c6 +0072 realyser.exe DB TCustomConnection.SetConnected 009ebbe3 +006b realyser.exe main 1761 +9 Tfrm_realyser.ChangeDBStatus 009ebb72 +0002 realyser.exe main 1742 +0 Tfrm_realyser.ChangeDBStatus 009f02ef +011b realyser.exe main 3246 +35 Tfrm_realyser.FormCloseQuery 004fee69 +0055 realyser.exe Forms TCustomForm.CloseQuery Clive <dd@dd.com> wrote: Hi, I have been experiencing AV's in DBISAM, when freeing objects, they appear to be random, but since I upgraded to the later versions my users have been expericeing these kind of frequently, always seems to be when freeing objects This example below was caused from this piece of code. Line 5079 in Alldata is the qry.free from this section of code. I know these things are very hard to see why this would occur, but im hoping maybe something would ring a bell ![]() Thanks Clive. ------------------------------------------ qry := TDBISAMQuery.Create(nil); try ExecuteSQL('select round(a.value - l.value) as value,period '+ ' from rpt_generic_detail a '+ ' inner join rpt_generic_detail l on a.period = l.period and a.scenario_code = l.scenario_code ' + ' where a.rowid = 38 and l.rowid = 39 and a.scenario_code = -2 group by period having value <> 0 order by period JOINOPTIMIZECOSTS',qry); if frm_realyser.lbl_balance.Visible then frm_realyser.lbl_balance.Color := clyellow else begin frm_realyser.lbl_balance.Caption := '[Balance sheet does not balance, Please contact support] '; frm_realyser.lbl_balance.Color := clred; end; frm_realyser.lbl_balance.Visible := qry.RecordCount > 0; if frm_quick_test.modified then data.RefreshScenarioDetail(TRUE); frm_quick_test.modified := FALSE; finally qry.free; end; --------------------------------------------- exception class : EAccessViolation exception message : Access violation at address 00586D92 in module 'realyser.exe'. Read of address 00000008. main thread ($1730): 00586d92 +000a realyser.exe dbisamsq TSourceTable.FreeJoins 00589597 +0027 realyser.exe dbisamsq TDataQuery.FreeSourceTables 0058914e +0052 realyser.exe dbisamsq TDataQuery.Destroy 00404ba8 +0008 realyser.exe System TObject.Free 00587c8d +00e5 realyser.exe dbisamsq TQueryStatement.Destroy 00404ba8 +0008 realyser.exe System TObject.Free 0065596d +000d realyser.exe dbisamtb TDBISAMQuery.FreeStatement 00655931 +0069 realyser.exe dbisamtb TDBISAMQuery.SetPrepared 00655477 +0007 realyser.exe dbisamtb TDBISAMQuery.UnPrepare 00655444 +000c realyser.exe dbisamtb TDBISAMQuery.Disconnect 006553ae +0016 realyser.exe dbisamtb TDBISAMQuery.Destroy 00404ba8 +0008 realyser.exe System TObject.Free 00a2fbbc +07c0 realyser.exe alldata 5079 +147 TData.RefreshCharts 00405382 +002a realyser.exe System @HandleFinally 77c61006 +0081 ntdll.dll RtlRaiseStatus 77c22c46 +00de ntdll.dll RtlUnwind 00405176 +00d2 realyser.exe System @HandleAnyException 77c61006 +0081 ntdll.dll RtlRaiseStatus 77c60e92 +000a ntdll.dll KiUserExceptionDispatcher 0064e5af +0007 realyser.exe dbisamtb TDBISAMDataSet.GetRecordCount 00a2fb68 +076c realyser.exe alldata 5072 +140 TData.RefreshCharts 009e8309 +0189 realyser.exe main 805 +25 Tfrm_realyser.WMRealyser_stage1_complete 004e141c +0188 realyser.exe Controls TControl.WndProc 004e4487 +0157 realyser.exe Controls TWinControl.WndProc 004fbf41 +0421 realyser.exe Forms TCustomForm.WndProc 009070db +000b realyser.exe VistaAltFixUnit 243 +1 TFormObj.WndProc 004e4104 +002c realyser.exe Controls TWinControl.MainWndProc 0047b1f4 +0014 realyser.exe Classes StdWndProc 77da3c85 +000a user32.dll DispatchMessageA 0050261f +0083 realyser.exe Forms TApplication.ProcessMessage 00502656 +000a realyser.exe Forms TApplication.HandleMessage 00502886 +0096 realyser.exe Forms TApplication.Run 00a379c9 +1319 realyser.exe realyser 524 +345 initialization 769f3831 +0010 kernel32.dll BaseThreadInitThunk |
Tue, May 29 2007 6:20 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Clive,
<< I have been experiencing AV's in DBISAM, when freeing objects, they appear to be random, but since I upgraded to the later versions my users have been expericeing these kind of frequently, always seems to be when freeing objects This example below was caused from this piece of code. Line 5079 in Alldata is the qry.free from this section of code. >> Could you send me the tables that you're using to execute that query ? Thanks, -- Tim Young Elevate Software www.elevatesoft.com |
Tue, May 29 2007 6:53 PM | Permanent Link |
Clive | table is attached
Cheers Clive. Could you send me the tables that you're using to execute that query ? Attachments: rpt_generic_detail.zip |
Wed, May 30 2007 12:43 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Clive,
<< table is attached >> I've run it in a loop 1000 times and I can't reproduce it. This is running local on your end, correct ? -- Tim Young Elevate Software www.elevatesoft.com |
Thu, May 31 2007 12:44 AM | Permanent Link |
Clive | Yes, I cant reproduce it either..
Its not always that query, more than not its when the database is disconnecting, Im pretty sure it started with B4, I have reverted back to B2 and no problems so far. The other issue that started happening with B4 is that the backup command is corrupting the database tables, At least thats what it think it is because the tables all work fine, then as soon as I do a Save (backup) , then restore the backup a random table is corrupt. I hademailed one of these backups to the support email address, but it bounced back as your server does accept attachments. Im hoping you still have it in the mail server somewhere though. "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Clive, << table is attached >> I've run it in a loop 1000 times and I can't reproduce it. This is running local on your end, correct ? -- Tim Young Elevate Software www.elevatesoft.com |
Thu, May 31 2007 3:07 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Clive,
<< Its not always that query, more than not its when the database is disconnecting, Im pretty sure it started with B4, I have reverted back to B2 and no problems so far. >> That could simply be a coincidence due to the way the memory manager works. I just ran into this recently with EDB. There was an issue that the Delphi memory manager would raise an AV on, but the FastMM memory manager would not. It simply came down to a difference in the way the two worked. BTW, is there any multi-threading going on in the application ? Also, are you using a custom memory manager ? -- Tim Young Elevate Software www.elevatesoft.com |
Thu, May 31 2007 3:25 PM | Permanent Link |
Clive | Yes, im using FastMM and the application is Multi-threaded,
All my threads are isolated, all have their own sessions and databases and there is no communication with the parent other than the posting of messages back using POSTMESSAGE. Im pretty confident in the multi-threaded stuff as its been operating for a few years without much trouble, but im happy to email you the source if you wanted to look at how im doing it. "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Clive, << Its not always that query, more than not its when the database is disconnecting, Im pretty sure it started with B4, I have reverted back to B2 and no problems so far. >> That could simply be a coincidence due to the way the memory manager works. I just ran into this recently with EDB. There was an issue that the Delphi memory manager would raise an AV on, but the FastMM memory manager would not. It simply came down to a difference in the way the two worked. BTW, is there any multi-threading going on in the application ? Also, are you using a custom memory manager ? -- Tim Young Elevate Software www.elevatesoft.com |
Thu, May 31 2007 4:15 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Clive,
<< Yes, im using FastMM and the application is Multi-threaded, All my threads are isolated, all have their own sessions and databases and there is no communication with the parent other than the posting of messages back using POSTMESSAGE. Im pretty confident in the multi-threaded stuff as its been operating for a few years without much trouble, but im happy to email you the source if you wanted to look at how im doing it. >> Sure, send it on over. It's probably fine, but when you have a case that isn't reproducible by itself, and the app is multi-threaded, I have to check all the bases. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |