Recent

Author Topic: Backspace Causes Access Violation  (Read 8188 times)

IansResearch

  • New Member
  • *
  • Posts: 18
Backspace Causes Access Violation
« on: July 24, 2012, 04:58:18 pm »
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

  • Hero Member
  • *****
  • Posts: 680
Re: Backspace Causes Access Violation
« Reply #1 on: July 24, 2012, 05:05:34 pm »
Could it be related to this ->

http://bugs.freepascal.org/view.php?id=21541

IansResearch

  • New Member
  • *
  • Posts: 18
Re: Backspace Causes Access Violation
« Reply #2 on: July 24, 2012, 05:20:25 pm »
No as the error occurs on any data control TDBedit or TDBMemo.

Ian

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: Backspace Causes Access Violation
« Reply #3 on: July 24, 2012, 05:26:17 pm »
Are you able to knock up a quick demo of the problem?

IansResearch

  • New Member
  • *
  • Posts: 18
Re: Backspace Causes Access Violation
« Reply #4 on: July 24, 2012, 05:29:47 pm »
When you say quick demo, would you like a video showing what happens?

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: Backspace Causes Access Violation
« Reply #5 on: July 24, 2012, 05:37:03 pm »
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

  • New Member
  • *
  • Posts: 18
Re: Backspace Causes Access Violation
« Reply #6 on: July 24, 2012, 05:40:08 pm »
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

  • Hero Member
  • *****
  • Posts: 849
Re: Backspace Causes Access Violation
« Reply #7 on: July 25, 2012, 10:46:21 am »
IansResearch,

Perhaps there is some ReadKeyboard event code being used?

IansResearch

  • New Member
  • *
  • Posts: 18
Re: Backspace Causes Access Violation
« Reply #8 on: July 30, 2012, 06:56:45 pm »
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

  • Hero Member
  • *****
  • Posts: 3940
    • Bart en Mariska's Webstek
Re: Backspace Causes Access Violation
« Reply #9 on: July 30, 2012, 09:18:53 pm »
I rember seeing this in the bugtracker, and IIRC it was solved in trunk.

Bart

IansResearch

  • New Member
  • *
  • Posts: 18
Re: Backspace Causes Access Violation
« Reply #10 on: July 31, 2012, 07:09:13 pm »
Still no joy has anyone else had this error  %)

Bart

  • Hero Member
  • *****
  • Posts: 3940
    • Bart en Mariska's Webstek
Re: Backspace Causes Access Violation
« Reply #11 on: July 31, 2012, 07:24:43 pm »
Did you try Lazarus from trunk?

Bart

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Backspace Causes Access Violation
« Reply #12 on: July 31, 2012, 07:39:41 pm »
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.

<blatant plug>... 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.</blatant plug>
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

IansResearch

  • New Member
  • *
  • Posts: 18
Re: Backspace Causes Access Violation
« Reply #13 on: August 01, 2012, 09:08:23 pm »
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

  • Hero Member
  • *****
  • Posts: 3940
    • Bart en Mariska's Webstek
Re: Backspace Causes Access Violation
« Reply #14 on: August 01, 2012, 09:16:28 pm »
Well, you're going to have to deal with that when Lazarus 1.0 gets out anyway, so better deal with it now.

Bart

 

TinyPortal © 2005-2018