Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-02

App locks at startup

8 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

SteveG

I have just updated Laz (svn) and Fpc(2.4.0) and have hit a problem with my program. (worked ok with Laz 0.98 / fpc 2.?.?)

I use a dyn loaded lib with my app, which seems to be relevant.

If I call Application.ProcessMessages from within a TTimer.OnTimer event, my app now locks solid showing 'futex_wait_queue_me' in the process listing.

I havent yet been able to narrow down an exact cause, as a simple app/lib test works ok.

Would anybody know what would cause the above state (futex), as a clue to the change in Laz/Fpc affecting my app ?

Thanks - SteveG

Reply by email

SteveG
to SteveG
SteveG wrote 17 lines
I have just updated Laz (svn) and Fpc(2.4.0) and have hit a problem with my program. (worked ok with Laz 0.98 / fpc 2.?.?) I use a dyn loaded lib with my app, which seems to be relevant. If I call Application.ProcessMessages from within a TTimer.OnTimer event, my app now locks solid showing 'futex_wait_queue_me' in the process listing. I havent yet been able to narrow down an exact cause, as a simple app/lib test works ok. Would anybody know what would cause the above state (futex), as a clue to the change in Laz/Fpc affecting my app ? Thanks - SteveG

Damn - forgot to add - running Ubuntu 10.04 (i386) Lazarus 0.9.29 r23794M FPC 2.4.0 i386-linux-gtk 2 (beta)

Reply by email

Andrew Brunner
to SteveG: I have just updated Laz (svn) and Fpc(2.4.0) and have hit a problem with my program.…

I would never Process Application Messages from a timer thread.

I suspect a threadlock going on. Does it work OK without the application.processmessages?

SteveG wrote 22 lines
I have just updated Laz (svn) and Fpc(2.4.0) and have hit a problem with my program. (worked ok with Laz 0.98 / fpc 2.?.?) I use a dyn loaded lib with my app, which seems to be relevant. If I call Application.ProcessMessages from within a TTimer.OnTimer event, my app now locks solid showing 'futex_wait_queue_me' in the process listing. I havent yet been able to narrow down an exact cause, as a simple app/lib test works ok. Would anybody know what would cause the above state (futex), as a clue to the change in Laz/Fpc affecting my app ? Thanks - SteveG -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

SteveG
to Andrew Brunner
Andrew Brunner wrote 19 lines
I would never Process Application Messages from a timer thread. I suspect a threadlock going on. Does it work OK without the application.processmessages? On Sat, Feb 27, 2010 at 9:02 PM, SteveG wrote: > I have just updated Laz (svn) and Fpc(2.4.0) and have hit a problem with my > program. (worked ok with Laz 0.98 / fpc 2.?.?) > > I use a dyn loaded lib with my app, which seems to be relevant. > > If I call Application.ProcessMessages from within a TTimer.OnTimer event, my > app now locks solid showing 'futex_wait_queue_me' in the process listing. > > I havent yet been able to narrow down an exact cause, as a simple app/lib > test works ok. > > Would anybody know what would cause the above state (futex), as a clue to > the change in Laz/Fpc affecting my app ?

It does seem to work without the App.proc call. The problem I have seems to be caused by calling App.proc once my lib is loaded. This was the closest I have been able to get in narrowing down to a small test case. I call App.procMsgs from within my lib which is where the actual problem seems to be.

Is there any other way to create a 'pause' from within a
library/function call (not sleep, as it 'stops' the program).
My 'pause' function is works as :>
StTm := NOW;
while NOW < (StTm + TmOut) do begin
   Sleep(1);
   Application.ProcessMessages;
end;

This worked ok before the Laz/fpc update, but seems to be broken now ? This is just my 'guess' so far as where my problem lies ?

Reply by email

SteveG
to SteveG
SteveG wrote 44 lines
On 28/02/10 13:08, Andrew Brunner wrote: > I would never Process Application Messages from a timer thread. > > I suspect a threadlock going on. Does it work OK without the > application.processmessages? > > On Sat, Feb 27, 2010 at 9:02 PM, SteveG wrote: >> I have just updated Laz (svn) and Fpc(2.4.0) and have hit a problem >> with my >> program. (worked ok with Laz 0.98 / fpc 2.?.?) >> >> I use a dyn loaded lib with my app, which seems to be relevant. >> >> If I call Application.ProcessMessages from within a TTimer.OnTimer >> event, my >> app now locks solid showing 'futex_wait_queue_me' in the process >> listing. >> >> I havent yet been able to narrow down an exact cause, as a simple >> app/lib >> test works ok. >> >> Would anybody know what would cause the above state (futex), as a >> clue to >> the change in Laz/Fpc affecting my app ? It does seem to work without the App.proc call. The problem I have seems to be caused by calling App.proc once my lib is loaded. This was the closest I have been able to get in narrowing down to a small test case. I call App.procMsgs from within my lib which is where the actual problem seems to be. Is there any other way to create a 'pause' from within a library/function call (not sleep, as it 'stops' the program). My 'pause' function is works as :> StTm := NOW; while NOW < (StTm + TmOut) do begin Sleep(1); Application.ProcessMessages; end; This worked ok before the Laz/fpc update, but seems to be broken now ? This is just my 'guess' so far as where my problem lies ?

After more study (read as: more google) - it may be related to the kernel changes in Ubuntu 10.04 - seems to be many unrelated programs suffering similar problems - will continue this story as I find more :)

Reply by email

SteveG
to SteveG
SteveG wrote 49 lines
On 28/02/10 13:18, SteveG wrote: > On 28/02/10 13:08, Andrew Brunner wrote: >> I would never Process Application Messages from a timer thread. >> >> I suspect a threadlock going on. Does it work OK without the >> application.processmessages? >> >> On Sat, Feb 27, 2010 at 9:02 PM, SteveG wrote: >>> I have just updated Laz (svn) and Fpc(2.4.0) and have hit a problem >>> with my >>> program. (worked ok with Laz 0.98 / fpc 2.?.?) >>> >>> I use a dyn loaded lib with my app, which seems to be relevant. >>> >>> If I call Application.ProcessMessages from within a TTimer.OnTimer >>> event, my >>> app now locks solid showing 'futex_wait_queue_me' in the process >>> listing. >>> >>> I havent yet been able to narrow down an exact cause, as a simple >>> app/lib >>> test works ok. >>> >>> Would anybody know what would cause the above state (futex), as a >>> clue to >>> the change in Laz/Fpc affecting my app ? > > It does seem to work without the App.proc call. The problem I have seems > to be caused by calling App.proc once my lib is loaded. This was the > closest I have been able to get in narrowing down to a small test case. > I call App.procMsgs from within my lib which is where the actual problem > seems to be. > > Is there any other way to create a 'pause' from within a > library/function call (not sleep, as it 'stops' the program). > My 'pause' function is works as :> > StTm := NOW; > while NOW < (StTm + TmOut) do begin > Sleep(1); > Application.ProcessMessages; > end; > > This worked ok before the Laz/fpc update, but seems to be broken now ? > This is just my 'guess' so far as where my problem lies ? > After more study (read as: more google) - it may be related to the kernel changes in Ubuntu 10.04 - seems to be many unrelated programs suffering similar problems - will continue this story as I find more :)

Just ran my app on Ubuntu 9.10 - works fine - so once again Laz/fpc has been falsely accused :)

Sorry for the noise

Reply by email

Burkhard Carstens
to SteveG: After more study (read as: more google) - it may be related to the kernel changes in…
SteveG wrote 8 lines
On 28/02/10 13:18, SteveG wrote: > On 28/02/10 13:08, Andrew Brunner wrote: >> I would never Process Application Messages from a timer thread. >> >> I suspect a threadlock going on. Does it work OK without the >> application.processmessages? >> >> On Sat, Feb 27, 2010 at 9:02 PM, SteveG
Show quoted text 41 lines
>>> I have just updated Laz (svn) and Fpc(2.4.0) and have hit a >>> problem with my >>> program. (worked ok with Laz 0.98 / fpc 2.?.?) >>> >>> I use a dyn loaded lib with my app, which seems to be relevant. >>> >>> If I call Application.ProcessMessages from within a >>> TTimer.OnTimer event, my >>> app now locks solid showing 'futex_wait_queue_me' in the process >>> listing. >>> >>> I havent yet been able to narrow down an exact cause, as a simple >>> app/lib >>> test works ok. >>> >>> Would anybody know what would cause the above state (futex), as a >>> clue to >>> the change in Laz/Fpc affecting my app ? > > It does seem to work without the App.proc call. The problem I have > seems to be caused by calling App.proc once my lib is loaded. This > was the closest I have been able to get in narrowing down to a > small test case. I call App.procMsgs from within my lib which is > where the actual problem seems to be. > > Is there any other way to create a 'pause' from within a > library/function call (not sleep, as it 'stops' the program). > My 'pause' function is works as :> > StTm := NOW; > while NOW < (StTm + TmOut) do begin > Sleep(1); > Application.ProcessMessages; > end; > > This worked ok before the Laz/fpc update, but seems to be broken > now ? This is just my 'guess' so far as where my problem lies ? After more study (read as: more google) - it may be related to the kernel changes in Ubuntu 10.04 - seems to be many unrelated programs suffering similar problems - will continue this story as I find more :)

Could you please post some of those links? Is this an Ubuntu specific kernel change?

Thanks,
Burkhard

Reply by email

SteveG
to Burkhard Carstens
Burkhard Carstens wrote 64 lines
Am Sonntag, 28. Februar 2010 04:35 schrieb SteveG: > On 28/02/10 13:18, SteveG wrote: > >> On 28/02/10 13:08, Andrew Brunner wrote: >> >>> I would never Process Application Messages from a timer thread. >>> >>> I suspect a threadlock going on. Does it work OK without the >>> application.processmessages? >>> >>> On Sat, Feb 27, 2010 at 9:02 PM, SteveG >>> wrote: >>>> I have just updated Laz (svn) and Fpc(2.4.0) and have hit a >>>> problem with my >>>> program. (worked ok with Laz 0.98 / fpc 2.?.?) >>>> >>>> I use a dyn loaded lib with my app, which seems to be relevant. >>>> >>>> If I call Application.ProcessMessages from within a >>>> TTimer.OnTimer event, my >>>> app now locks solid showing 'futex_wait_queue_me' in the process >>>> listing. >>>> >>>> I havent yet been able to narrow down an exact cause, as a simple >>>> app/lib >>>> test works ok. >>>> >>>> Would anybody know what would cause the above state (futex), as a >>>> clue to >>>> the change in Laz/Fpc affecting my app ? >>>> >> It does seem to work without the App.proc call. The problem I have >> seems to be caused by calling App.proc once my lib is loaded. This >> was the closest I have been able to get in narrowing down to a >> small test case. I call App.procMsgs from within my lib which is >> where the actual problem seems to be. >> >> Is there any other way to create a 'pause' from within a >> library/function call (not sleep, as it 'stops' the program). >> My 'pause' function is works as :> >> StTm := NOW; >> while NOW < (StTm + TmOut) do begin >> Sleep(1); >> Application.ProcessMessages; >> end; >> >> This worked ok before the Laz/fpc update, but seems to be broken >> now ? This is just my 'guess' so far as where my problem lies ? >> > After more study (read as: more google) - it may be related to the > kernel changes in Ubuntu 10.04 - seems to be many unrelated programs > suffering similar problems - will continue this story as I find more > :) > Could you please post some of those links? Is this an Ubuntu specific kernel change? Thanks, Burkhard

http://ohioloco.ubuntuforums.org/showthread.php?p=8769812 http://forum.videolan.org/viewtopic.php?f=13&t=70320

These are just a quick sample of different complaints of same problem - I think there is still no definitive reason found. It would appear to be kernel specific ? -
If you search google (etc) for 'futex_wait_queue_me' errors, the list is growing daily :)

Reply by email