![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home Technical Support ElevateDB Technical Support Support Forums ElevateDB SQL View Thread |
Messages 1 to 10 of 15 total |
![]() |
Sun, Jun 22 2008 10:44 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
With no disrespect I hope this is yours because I can't make head or tail of it. My in this area code hasn't changed. The only differences are installing the latest release and settings string fields to '' and not nullable. Sorry for the length of post (especially if its me). procedure TEMailsForm.RefreshCounts(Sender: TObject); var Cntr: integer; Walker: TElTreeItem; begin // Stage 1 clear out any stuff already there for Cntr := 0 to mbTree.Items.Count - 1 do begin mbTree.Items[Cntr].Bold := False; mbTree.Items[Cntr].ParentStyle := True; mbTree.Items[Cntr].Hint := ''; end; emCounts.Close; Recount.Close; Recount.ParamByName('USERID').AsString := HHCommons.UserID; Recount.ExecScript; <<<<<<<<<<<<<<<<<<<<<<<<<<<<< BOMBS HERE Recount.Close; emCounts.IndexName := 'PK'; emCounts.Open; // Now put the new info in place for Cntr := 0 to mbTree.Items.Count - 1 do begin if emCounts.FindKey([mbTree.Items[Cntr].Tag]) then begin mbTree.Items[Cntr].Hint := emCounts.FieldByName('_BoxName').AsString + ' (' + emCounts.FieldByName('_Unread').AsString + ' unread out of ' + emCounts.FieldByName('_OnFile').AsString + ' on file)'; if emCounts.FieldByName('_Unread').AsInteger > 0 then begin mbTree.Items[Cntr].Text := emCounts.FieldByName('_BoxName').AsString + ' (' + emCounts.FieldByName('_Unread').AsString + ')'; mbTree.Items[Cntr].Bold := True; mbTree.Items[Cntr].ParentStyle := False; Walker := mbTree.Items[Cntr].Parent; while (Walker <> nil) and (not Walker.Bold) do begin Walker.Bold := True; Walker.ParentStyle := False; Walker := Walker.Parent; end; end else begin mbTree.Items[Cntr].Bold := False; mbTree.Items[Cntr].ParentStyle := True; mbTree.Items[Cntr].Text := emCounts.FieldByName('_BoxName').AsString; end; end; end; end; SCRIPT(IN USERID VARCHAR) BEGIN DECLARE SQLStatement VARCHAR; DECLARE InfoCursor SENSITIVE CURSOR FOR InfoStmt; DECLARE ResultCursor SENSITIVE CURSOR WITH RETURN FOR ResultStmt; PREPARE InfoStmt FROM 'SELECT * FROM Information.Tables WHERE Name = ''emCounts'''; OPEN InfoCursor; IF (ROWCOUNT(InfoCursor) > 0) THEN EXECUTE IMMEDIATE 'DROP TABLE emCounts'; END IF; CLOSE InfoCursor; SET SQLStatement = 'CREATE TABLE emCounts AS SELECT _BoxNo , _BoxName, (SELECT COUNT(_fkMailBoxes) from "$Disk".EMails WHERE _fkMailBoxes = MailBoxes._Boxno AND (EMails._Private = FALSE OR EMails._fkUsers = '''+USERID+ ''')) AS _OnFile , (SELECT COUNT(_fkMailBoxes) from "$Disk".emReadStatus WHERE _fkUsers = '''+USERID+ ''' AND _fkMailboxes = MailBoxes._Boxno) AS _Read, 0 AS _Unread FROM "$Disk".MailBoxes WHERE _Monitored = TRUE WITH DATA'; PREPARE ResultStmt FROM SQLStatement; EXECUTE ResultStmt USING USERID, USERID; EXECUTE IMMEDIATE 'UPDATE emCounts SET _Unread = _OnFile - _Read'; EXECUTE IMMEDIATE 'CREATE INDEX PK ON emCounts (_BoxNo)'; END $Disk is StringReplaced in the forms OnCreate event MadExcept stuff --------------------------- TfR.exe: Memory Error Detected --------------------------- FastMM has detected an attempt to call a virtual method on a freed object. An access violation will now be raised in order to abort the current operation. Freed object class: TEDBIndexedLocalCursor Virtual method: Destroy Virtual method address: 6040F8 The allocation number was: 376057 Stack trace of when the object was allocated (return addresses): 402DFE [System][@GetMem] 404663 [System][TObject.NewInstance] 404A2A [System][@ClassCreate] 603FB7 [edblocal][TEDBIndexedLocalCursor.Create] 146250 [@Borlndmm@SysFreeMem$qqrpv] 606096 [edblocal][TEDBQueryManager.CreateResultCursor] 609762 [edblocal][TEDBQueryManager.Execute] 60D785 [edblocal][TEDBLocalStatementManager.Execute] 60CB30 [edblocal][TEDBStatementValue.Execute] Stack trace of when the object was subsequently freed (return addresses): 404681 [System][TObject.FreeInstance] 404A75 [System][@ClassDestroy] 604163 [edblocal][TEDBIndexedLocalCursor.Destroy] 4046C7 [System][TObject.Free] 534EF5 [edbcommon][FreeAndNil] 60C67A [edblocal][TEDBStatementValue.FreeResultCursor] 5CDEB4 [edblocal][TEDBLocalEvaluator.EvaluateCLOSE] 5D6761 [edblocal][TEDBLocalEvaluator.EvaluateControl] 5D2AB4 [edblocal][TEDBLocalEvaluator.EvaluateBlock] The current stack trace leading to this error (return addresses): 534EF5 [edbcommon][FreeAndNil] 609D8B [edblocal][TEDBQueryValue.FreeResultCursor] 609D5D [edblocal][TEDBQueryValue.Destroy] 4046C7 [System][TObject.Free] 534EF5 [edbcommon][FreeAndNil] 54A1CA [edbeval][TEDBExprEvaluator.FreeValue] 54A233 [edbeval][TEDBExprEvaluator.ResetNextToken] 54A225 [edbeval][TEDBExprEvaluator.ResetNextToken] 54A225 [edbeval][TEDBExprEvaluator.ResetNextToken] Current memory dump of 256 bytes starting at pointer address 6AB0B08: F8 0D 15 00 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 5F F5 54 F9 80 80 00 00 21 0F AB 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5E 92 05 00 FE 2D 40 00 63 46 40 00 2A 4A 40 00 AF 1D 5C 00 D6 90 5D 00 73 9E 5D 00 E7 68 5D 00 77 6D 5D 00 66 C4 5E 00 1A 2E 40 00 81 46 40 00 75 4A 40 00 B9 1E 5C 00 . . . _ T . . ! . . . . . . . . . . . . . . . . . . ^ . . - @ . c F @ . * J @ . . \ . ] .. s ] . h ] . w m ] . f ^ . . . @ . F @ . u J @ . . \ . --------------------------- OK --------------------------- exception message : Access violation at address 76E542EB in module 'kernel32.dll'. Write of address 00000000. main thread ($cdc): 00622122 +20e TfR.exe edbcomps TEDBScript.GetScriptCursor 00621dc9 +035 TfR.exe edbcomps TEDBScript.CreateCursor 00621e85 +035 TfR.exe edbcomps TEDBScript.ExecScript 00a54524 +0d4 TfR.exe EMails 2042 TEMailsForm.RefreshCounts 00a55a9b +6a3 TfR.exe EMails 2345 TEMailsForm.DoDisplayEMails 00a4e958 +064 TfR.exe EMails 579 TEMailsForm.mbAfterSelectionChange 007a9fb9 +015 TfR.exe ElTree TCustomElTree.DoAfterSelectionChange 0079cc62 +446 TfR.exe ElTree TElTreeView.MouseDown 004b85de +076 TfR.exe Controls TControl.DoMouseDown 004b862c +040 TfR.exe Controls TControl.WMLButtonDown 0079b10b +053 TfR.exe ElTree TElTreeView.WMLButtonDown 004b8003 +2bb TfR.exe Controls TControl.WndProc 004bbd49 +499 TfR.exe Controls TWinControl.WndProc 00792e1b +123 TfR.exe ElTree TElTreeView.WndProc 004bb4d4 +02c TfR.exe Controls TWinControl.MainWndProc 0047acd0 +014 TfR.exe Classes StdWndProc 767b5a27 +00a USER32.dll DispatchMessageA 004d5b78 +0fc TfR.exe Forms TApplication.ProcessMessage 004d5bb2 +00a TfR.exe Forms TApplication.HandleMessage 004d5dd2 +096 TfR.exe Forms TApplication.Run 00adc13d +085 TfR.exe TfR 96 initialization 76e5490f +010 kernel32.dll BaseThreadInitThunk modules: 00140000 borlndmm.dll 4.74.0.167 E:\HH Dev\TfRSource 00160000 FastMM_FullDebugMode.dll 1.44.0.4 E:\HH Dev\TfRSource 00400000 TfR.exe E:\HH Dev\TfRSource 6c780000 RICHED20.dll 5.31.23.1228 C:\Windows\system32 6f570000 olepro32.dll 6.0.6001.18000 C:\Windows\system32 72ae0000 wsock32.dll 6.0.6001.18000 C:\Windows\system32 73290000 RICHED32.DLL 6.0.6001.18000 C:\Windows\system32 73f70000 comctl32.dll 5.82.6001.18000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.6001.18000_none_886786f450a74a05 74400000 gdiplus.dll 5.2.6001.18000 C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6001.18000_none_9e752e5ac9c619f3 74600000 OLEACC.dll 4.2.5406.0 C:\Windows\system32 74640000 winmm.dll 6.0.6001.18000 C:\Windows\system32 74b50000 winspool.drv 6.0.6001.18000 C:\Windows\system32 75020000 uxtheme.dll 6.0.6001.18000 C:\Windows\system32 75160000 comctl32.dll 6.10.6001.18000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc 75620000 msimg32.dll 6.0.6000.16386 C:\Windows\system32 75aa0000 version.dll 6.0.6001.18000 C:\Windows\system32 75bf0000 dhcpcsvc6.DLL 6.0.6001.18000 C:\Windows\system32 75c20000 WINNSI.DLL 6.0.6001.18000 C:\Windows\system32 75c30000 dhcpcsvc.DLL 6.0.6001.18000 C:\Windows\system32 75c70000 iphlpapi.dll 6.0.6001.18000 C:\Windows\system32 75eb0000 DNSAPI.dll 6.0.6001.18000 C:\Windows\system32 76310000 Secur32.dll 6.0.6001.18000 C:\Windows\system32 76480000 RPCRT4.dll 6.0.6001.18000 C:\Windows\system32 76550000 MSCTF.dll 6.0.6001.18000 C:\Windows\system32 76620000 SHLWAPI.dll 6.0.6001.18000 C:\Windows\system32 767a0000 USER32.dll 6.0.6001.18000 C:\Windows\system32 76840000 oleaut32.dll 6.0.6001.18000 C:\Windows\system32 76be0000 imagehlp.dll 6.0.6001.18000 C:\Windows\system32 76c10000 msvcrt.dll 7.0.6001.18000 C:\Windows\system32 76cc0000 ADVAPI32.dll 6.0.6001.18000 C:\Windows\system32 76d90000 comdlg32.dll 6.0.6001.18000 C:\Windows\system32 76e10000 kernel32.dll 6.0.6001.18000 C:\Windows\system32 76ef0000 shell32.dll 6.0.6001.18000 C:\Windows\system32 77a00000 ole32.dll 6.0.6001.18000 C:\Windows\system32 77b50000 USP10.dll 1.626.6001.18000 C:\Windows\system32 77bd0000 WS2_32.dll 6.0.6001.18000 C:\Windows\system32 77c00000 ntdll.dll 6.0.6001.18000 C:\Windows\system32 77d30000 LPK.DLL 6.0.6001.18000 C:\Windows\system32 77de0000 imm32.dll 6.0.6001.18000 C:\Windows\system32 77e00000 NSI.dll 6.0.6001.18000 C:\Windows\system32 77e10000 GDI32.dll 6.0.6001.18000 C:\Windows\system32 disassembling: [...] 00622112 jnz loc_622129 00622114 mov ecx, ebx 00622116 mov dl, 1 00622118 mov eax, [$612fd4] 0062211d call -$b356 ($616dcc) ; edbcomps.EEDBError.Create 00622122 > call -$21d0f3 ($405034) ; System.@RaiseExcept 00622127 jmp loc_62212e 00622129 call -$21d0d2 ($40505c) ; System.@RaiseAgain 0062212e call -$21d083 ($4050b0) ; System.@DoneExcept 00622133 mov eax, [ebp-8] 00622136 pop edi [...] date/time : 2008-06-22, 15:19:28, 700ms computer name : WORKDELL user name : Roy Lambert <admin> registered owner : Roy Lambert / NLH Associates operating system : Windows Vista Service Pack 1 build 6001 system language : English system up time : 13 minutes 21 seconds program up time : 33 seconds processors : 2x Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz physical memory : 2050/3069 MB (free/total) free disk space : (C ![]() ![]() display mode : 1440x900, 32 bit process id : $e74 allocated memory : 62.20 MB executable : TfR.exe exec. date/time : 2008-06-22 15:18 compiled with : Delphi 2006/07 madExcept version : 3.0f callstack crc : $a68c7738, $29db9b38, $29db9b38 exception number : 1 exception class : EEDBError exception message : Access violation at address 76E542EB in module 'kernel32.dll'. Write of address 00000000. main thread ($b78): 00622122 +20e TfR.exe edbcomps TEDBScript.GetScriptCursor 00621dc9 +035 TfR.exe edbcomps TEDBScript.CreateCursor 00621e85 +035 TfR.exe edbcomps TEDBScript.ExecScript 00a54524 +0d4 TfR.exe EMails 2042 TEMailsForm.RefreshCounts 00a55a9b +6a3 TfR.exe EMails 2345 TEMailsForm.DoDisplayEMails 00a4e958 +064 TfR.exe EMails 579 TEMailsForm.mbAfterSelectionChange 007a9fb9 +015 TfR.exe ElTree TCustomElTree.DoAfterSelectionChange 0079cc62 +446 TfR.exe ElTree TElTreeView.MouseDown 004b85de +076 TfR.exe Controls TControl.DoMouseDown 004b862c +040 TfR.exe Controls TControl.WMLButtonDown 0079b10b +053 TfR.exe ElTree TElTreeView.WMLButtonDown 004b8003 +2bb TfR.exe Controls TControl.WndProc 004bbd49 +499 TfR.exe Controls TWinControl.WndProc 00792e1b +123 TfR.exe ElTree TElTreeView.WndProc 004bb4d4 +02c TfR.exe Controls TWinControl.MainWndProc 0047acd0 +014 TfR.exe Classes StdWndProc 767b5a27 +00a USER32.dll DispatchMessageA 004d5b78 +0fc TfR.exe Forms TApplication.ProcessMessage 004d5bb2 +00a TfR.exe Forms TApplication.HandleMessage 004d5dd2 +096 TfR.exe Forms TApplication.Run 00adc13d +085 TfR.exe TfR 96 initialization 76e5490f +010 kernel32.dll BaseThreadInitThunk Roy Lambert |
Sun, Jun 22 2008 8:34 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< With no disrespect I hope this is yours because I can't make head or tail of it. My in this area code hasn't changed. The only differences are installing the latest release and settings string fields to '' and not nullable. >> My first question would be - how the heck are you creating a database called "$Disk" ? That's an invalid identifier. Secondly, can you reproduce this in the EDB Manager ? If so, can you give me the steps ? -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jun 23 2008 3:43 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
>My first question would be - how the heck are you creating a database called >"$Disk" ? That's an invalid identifier. I know it was Sunday, and it was a long post but I wrote "$Disk is StringReplaced in the forms OnCreate event" >Secondly, can you reproduce this in the EDB Manager ? If so, can you give >me the steps ? I'll try, and let you know Roy Lambert |
Mon, Jun 23 2008 4:04 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
>Secondly, can you reproduce this in the EDB Manager ? If so, can you give >me the steps ? Just tried and, surprisingly, I can't. Any clues as to what might be causing it? ie what is there that I can do that could result in FastMM has detected an attempt to call a virtual method on a freed object. An access violation will now be raised in order to abort the current operation. Freed object class: TEDBIndexedLocalCursor Roy Lambert |
Mon, Jun 23 2008 4:11 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
Definitely your bug. I've just reinstalled b1 and no problems. Sorry I can't give you any more assistance in tracking it down. But if you can think of anything let me know. Roy Lambert |
Mon, Jun 23 2008 9:19 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< Just tried and, surprisingly, I can't.>> How did you call it the first time when the error occurred ? -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jun 23 2008 9:19 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< I know it was Sunday, and it was a long post but I wrote >> Sorry, missed that when I was scrolling through everything. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jun 23 2008 9:21 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< How did you call it the first time when the error occurred ? >> Actually, what I meant here is - did you call that procedure that you showed just once, or was it called several times before the error occurred ? -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jun 23 2008 9:59 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
>Actually, what I meant here is - did you call that procedure that you showed >just once, or was it called several times before the error occurred ? Can't try just now cos I've changed the table structure and I'm running the conversion routine again (takes c90 mins), and I've reinstalled the previous version so I can keep on working but from memory: the procedure is called after the mailbox is changed. Mailboxes are displayed using TElTree (light version) OnSelectionChange and I think its one of those events which fires twice (like DBGrid fires 3 times). So I open the app, it creates the email form. The InBox is empty and I click on a converted mailbox. The procedure & script run - no problem. I then click on another email displayed using a TAdvStringGrid and the procedure is called almost as the last thing on displaying the email, and blewy up it goes. So it could be run twice and then blow up on the third or once and then blows up on the second. I'll let you know after the conversion and I've reinstalled b2, probably tonight. Roy Lambert |
Mon, Jun 23 2008 11:55 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
Its getting weirder. Just re-installed b2 and its working fine. Since the conversion routine is pulling data from my live system (DBISAM until I finish my epic journey to ElevateDB) it changes each time I do a conversion. So it looks as though its data related in some way that b1 handled fine but b2 threw a wobbly over. I hate these sort of things. Roy Lambert |
Page 1 of 2 | Next Page | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |