Backspace Causes Access Violation lazarus / 16-Databases ---------------------------------------------------------------------- IansResearch · 2012-07-24 14:58 I have written an application that is designed with frames, uses a SQLITE database connected via ZEOS Database Controls, makes use of standard data controls. Compiled with fpc 2.6 & Lazarus IDE 0.9.30.4 also complied with fpc 2.4 & Lazarus IDE 0.9.29 The error. My application works fine for a while and then it crashes with the Access Violation error when I presss backspace to remove some text from a TDBEdit contol or TDBMemo control. Can anyone help please? Thank you. ---------------------------------------------------------------------- KpjComp · 2012-07-24 15:05 Could it be related to this -> http://bugs.freepascal.org/view.php?id=21541 ---------------------------------------------------------------------- IansResearch · 2012-07-24 15:20 No as the error occurs on any data control TDBedit or TDBMemo. Ian ---------------------------------------------------------------------- KpjComp · 2012-07-24 15:26 Are you able to knock up a quick demo of the problem? ---------------------------------------------------------------------- IansResearch · 2012-07-24 15:29 When you say quick demo, would you like a video showing what happens? ---------------------------------------------------------------------- KpjComp · 2012-07-24 15:37 No,. A small test program that duplicates the problem, if you can supply this then other users of this forum can then try to find out what the problem is much easer.  Unfortunately Access Violation error's could be for a multitude of reasons. ---------------------------------------------------------------------- IansResearch · 2012-07-24 15:40 Ok understand, that might be difficult because the problem is intermittent. Is there a good debugger that I can use to try and find where the error is occurring exactly? Ian. ---------------------------------------------------------------------- Elmug · 2012-07-25 08:46 IansResearch, Perhaps there is some ReadKeyboard event code being used? ---------------------------------------------------------------------- IansResearch · 2012-07-30 16:56 Hi All, I have run it through gdb.exe and this is the result of the debug error. Program received signal SIGSEGV, Segmentation fault. 0x00723cf1 in DBCTRLS_TDBLOOKUP_$__NULLKEYHANDLER$TOBJECT$WORD$TSHIFTSTATE () (gdb) backtrace #0  0x00723cf1 in DBCTRLS_TDBLOOKUP_$__NULLKEYHANDLER$TOBJECT$WORD$TSHIFTSTATE     () #1  0x00423fc7 in FORMS_TAPPLICATION_$__NOTIFYKEYDOWNBEFOREHANDLER$TOBJECT$WORD$ TSHIFTSTATE () #2  0x00536380 in CONTROLS_TWINCONTROL_$__DOKEYDOWNBEFOREINTERFACE$TLMKEY$BOOLEA N$$BOOLEAN () #3  0x00538919 in CONTROLS_TWINCONTROL_$__CNKEYDOWN$TLMKEY () #4  0x0040bd96 in SYSTEM_TOBJECT_$__DISPATCH$formal () #5  0x00538900 in CONTROLS_TWINCONTROL_$_WMWINDOWPOSCHANGED$TLMWINDOWPOSMSG_RAIS ELOOP () #6  0x0053592f in CONTROLS_TWINCONTROL_$__WNDPROC$TMESSAGE () #7  0x00729326 in DBCTRLS_TDBMEMO_$__WNDPROC$TMESSAGE () #8  0x005b7de7 in LCLMESSAGEGLUE_DELIVERMESSAGE$TOBJECT$formal$$LONGINT () #9  0x0055db23 in WIN32INT_WINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT  () #10 0x76ebc4e7 in USER32!IsWindowVisible ()    from C:\Windows\system32\user32.dll #11 0x00181156 in ?? () #12 0x76ebc5e7 in USER32!IsWindowVisible ()    from C:\Windows\system32\user32.dll #13 0x0055b4b0 in WIN32INT_GETNEEDPARENTPAINT$PWIN32WINDOWINFO$TWINCONTROL$$BOOL EAN () #14 0x76ebcc19 in USER32!IsWindowVisible ()    from C:\Windows\system32\user32.dll #15 0x00000000 in ?? () (gdb) cont Continuing. Program received signal SIGSEGV, Segmentation fault. 0x00723cf1 in DBCTRLS_TDBLOOKUP_$__NULLKEYHANDLER$TOBJECT$WORD$TSHIFTSTATE () (gdb) cont Has any one got any clue's  Thanks... ---------------------------------------------------------------------- Bart · 2012-07-30 19:18 I rember seeing this in the bugtracker, and IIRC it was solved in trunk. Bart ---------------------------------------------------------------------- IansResearch · 2012-07-31 17:09 Still no joy has anyone else had this error ---------------------------------------------------------------------- Bart · 2012-07-31 17:24 Did you try Lazarus from trunk? Bart ---------------------------------------------------------------------- BigChimp · 2012-07-31 17:39 Going from your gdb session, you're apparently on Windows. Bart means have you tried with the latest Lazarus SVN version? You can also use a snapshot, they're pretty stable. I'd suggest one with FPC 2.6.1 rather than 2.6.0 because 2.6.0 does not receive any fixes at all. ... or try fpcup that will download from svn and install in c:\development\... If you currently have no c:\development\... directory, it will create a complete separate, standalone install of Laz+FPC using --primary-config path to keep your settings separate. You can then use it to keep up to date. ---------------------------------------------------------------------- IansResearch · 2012-08-01 19:08 I have tried to install the fpc 2.6.1 Lazarus 1.1 and it wont load project now because of TNoteBook control, some properties are missing ShowTabs is one property which no longer exists. So unable to test, unless I change the TNoteBook controls used to somthing else, which is a bit of a pain. Any solutions for this yet? before I start hacking my code to about. ---------------------------------------------------------------------- Bart · 2012-08-01 19:16 Well, you're going to have to deal with that when Lazarus 1.0 gets out anyway, so better deal with it now. Bart ---------------------------------------------------------------------- BigChimp · 2012-08-01 19:44 Have a look here: http://wiki.lazarus.freepascal.org/Lazarus_1.0_release_notes#TCustomNo tebook_was_moved_from_ExtCtrls_to_ComCtrls ... don't know if that clarifies things.. ---------------------------------------------------------------------- IansResearch · 2012-08-03 16:15 Replaced the TNotebook controls application works fine now, on windows platform. Thanks for update.