[Lazarus] AsyncProcess code problem
Steve Gatenby
steveg at nevets.com.au
Fri Jun 9 09:38:25 CEST 2017
Having a problem with some code here :)
Lazarus 1.9.0 r55266M FPC 3.1.1 x86_64-linux-gtk2
I create a thread every second to run a process (TAsyncprocess), then
FreeAndNil the process once done.
My app aborts regularly (though intermittently) with the following from gdb.
My question is about the fact of 'appprocessmessages' being in the fault
path.
Is this normal for a threaded call to TAsyncProc, or have I introduced
my own fault ?.
I dont have any main thread/gui accessing calls from within my created
thread.
Thread 1 "LxAazCMA" received signal SIGSEGV, Segmentation fault.
0x00007fffef6eddb4 in REMOVEEVENTHANDLER (this=0xf9efb8, AHANDLER=0x0)
at gtk2/gtk2lclintf.inc:1355
1355 if lEventHandler^.PrevHandler = nil then
(gdb) bt
#0 0x00007fffef6eddb4 in REMOVEEVENTHANDLER (this=0xf9efb8,
AHANDLER=0x0) at gtk2/gtk2lclintf.inc:1355
#1 0x00007fffef6ee022 in REMOVEPIPEEVENTHANDLER (this=0xf9efb8,
AHANDLER=0x0) at gtk2/gtk2lclintf.inc:1429
#2 0x00007fffef7af46d in REMOVEPIPEEVENTHANDLER (AHANDLER=0x0) at
include/lclintf.inc:424
#3 0x00007fffef9beeba in UNHOOKPIPEHANDLE (this=0x7fffd4013608) at
asyncprocess.pp:84
#4 0x00007fffef9beee5 in HANDLEPIPEINPUT (this=0x7fffd4013608, ADATA=0,
AREASONS=...) at asyncprocess.pp:90
#5 0x00007fffef6edfe2 in HANDLEPIPEEVENT (this=0xf9efb8,
ADATA=140736750234040, AFLAGS=17)
at gtk2/gtk2lclintf.inc:1421
#6 0x00007fffef6edc5d in WAITHANDLE_IOCALLBACK (SOURCE=0x7fffd4028570,
CONDITION=17, DATA=0x7fffd40128d8)
at gtk2/gtk2lclintf.inc:1318
#7 0x00007ffff664004a in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#8 0x00007ffff66403f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9 0x00007ffff664049c in g_main_context_iteration () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x000000000054d9c9 in APPPROCESSMESSAGES (this=0xe9bcb8) at
gtk2/gtk2widgetset.inc:2338
#11 0x000000000045a27d in HANDLEMESSAGE (this=0xe99908) at
include/application.inc:1276
#12 0x000000000045a7af in RUNLOOP (this=0xe99908) at
include/application.inc:1413
#13 0x00000000006a0673 in APPRUN (this=0xe9bcb8, ALOOP=...) at
include/interfacebase.inc:54
#14 0x000000000045a74f in RUN (this=0xe99908) at
include/application.inc:1401
#15 0x000000000041ea25 in main () at LynxApp.lpr:82
(gdb)
Thanks - SteveG
More information about the Lazarus
mailing list