[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GUI updates do not show even from separate thread
From: |
Riccardo Mottola |
Subject: |
Re: GUI updates do not show even from separate thread |
Date: |
Wed, 6 Jul 2016 12:58:06 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 |
Hi,
Fred Kiefer wrote:
Hi Riccardo,
I tried to inspect this issue, but already failed in getting FTP.app to work
against ftpmain.gnustep.org. Are there any ftp sites out there where you know
the code is working correctly.
That's bad! It works for me right with ftp.gnustep.org which is my
favourite test use case!
In "preferences" what connection mode is set? Port and Passive are the
ones that usually do work and both work for me with GNUstep. standard is
often blocked or misinterpreted by routers and firewalls.
may you change to Passive or vice-versa and see if it works?
Next I looked at the code and failed to see the point where a background thread
for the file download gets started. There is only one reference to NSThread in
the code and this is at the startup. No idea what this code is doing there.
The "connection" is started in a background thread and then lives on in
all various operation, not just the single download operation. At least,
I think that was my intention many years ago. That way, for example,
recursive downloads operate in a single worker thread and don't spawn N
threads, N being the depth !
How to know if I really have 2 threads and the code is not buggy?
I set a breakpoint in retrieveFile and gdb "info threads" shows me two
threads and execution being in #2. I hope this is enough for a proof.
In AppController setTransferProgress: you are most likely referring to the line
[progBar setDoubleValue:percent];
This should indeed update the progress bar the next time GNUstep redraws the
window. And even if you don't use a background thread the NSRunloop trick
should be enough to trigger this. Without being able to get this working it is
hard to say anything more. What you could try to find out is whether the
drawRect: method of the progress indicator gets called at all. It could be that
it is in a state where it just doesn't draw anything.
I do not only update the progress bar, but also the text fields showing
transferred bytes and speed. Those to do not get updated too. I suppose
thus that it is not just the progress bar component.
Riccardo
- GUI updates do not show even from separate thread, Riccardo Mottola, 2016/07/04
- Re: GUI updates do not show even from separate thread, Fred Kiefer, 2016/07/06
- Re: GUI updates do not show even from separate thread, Sebastian Reitenbach, 2016/07/06
- Re: GUI updates do not show even from separate thread,
Riccardo Mottola <=
- Re: GUI updates do not show even from separate thread, Fred Kiefer, 2016/07/07
- Re: GUI updates do not show even from separate thread, Riccardo Mottola, 2016/07/07
- Re: GUI updates do not show even from separate thread, Fred Kiefer, 2016/07/12
- Re: GUI updates do not show even from separate thread, Richard Frith-Macdonald, 2016/07/12
- Re: GUI updates do not show even from separate thread, Fred Kiefer, 2016/07/12
- Re: GUI updates do not show even from separate thread, Niels Grewe, 2016/07/13
- Re: GUI updates do not show even from separate thread, Richard Frith-Macdonald, 2016/07/13
- Re: GUI updates do not show even from separate thread, Riccardo Mottola, 2016/07/13
- Re: GUI updates do not show even from separate thread, Riccardo Mottola, 2016/07/13
- Re: GUI updates do not show even from separate thread, Riccardo Mottola, 2016/07/13