Forum > General

Error using HeapTrace

(1/1)

garlar27:
   I've made an application which has a Thread that reads bar codes from a serial scanner. This thread generates keypress events with a Synchronize.

   It works without problems, so I wanted to test whether it has a memory leak or not. On the first run I opened the port, started the thread, then I stopped the thread (without reading a bar code) and terminate it. Then I quit the program with no memory leak.

   At the second one I scanned a bar code but this time it has risen this exception while synchronizing:

--- Quote ---Marked memory at $01BA2778 invalid
Wrong signature $1061D179 instead of 9E7D8017
  $08075845
  $08077EF3
  $0809161B  TSCANNER__ONRECV,  line 1011 of scanner.pas
  $080901BF  TRECVTHREAD__DOONRECV,  line 642 of scanner.pas
  $080B4D7C
  $081C95D4  THREADSYNC_IOCALLBACK,  line 637 of /usr/lib/lazarus/0.9.28.2/lcl/interfaces/gtk/gtkwidgetset.inc
  $0017FDAB
  $00148E88
  $0014C730

--- End quote ---

the line 1011 is a call to a procedure we call SendKeyPress(Key: word); which uses (on Linux)


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function XSendEvent(para1:PDisplay; para2:TWindow; para3:TBool; para4:clong; para5:PXEvent):TStatus;cdecl;external libX11;
to generate the event.

The question is:
Is there a problem with heaptrace and threads and/or OS calls?

I'm using Lazarus v0.9.28.2-0 beta on Ubuntu 9.10

Navigation

[0] Message Index

Go to full version