FLTK logo

STR #1151

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]

STR #1151

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:2 - Specific to an operating system
Subsystem:WIN32
Summary:socket "select()" not always working with cygwin
Version:1.1.7
Created By:shaiay
Assigned To:matt
Fix Version:1.1-current (SVN: v5383)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text  
 
#1 shaiay
10:40 Jan 21, 2006
Hi all,

STR 1022, cygwin specific,  which was fixed in the svn at date 4/11/2005 is "unfixed" again in 1.1.7

I am will start working on fixing this but I would like a few answers first:

1) Is it certain that this bug reapeared because of later changes? The reson I ask this is because I have found no mention of the string 1022 in the 1.1.7 CHANGES doc and I do not recall it showing up in any of the CHANGES for any 1.1.x versions. Could it be that the fix has gotten "lost"?

2) Can anyone point me in the general direction of the places to look for the fd callback handling?

As I am not on the fltk-bug list, please post any relevant material to this STR as well as the fltk-bug list

Shai

p.s. I assume I do not need to reattach the test files and bug description here -- It is all in the 1022 STR.
 
 
#2 matt
11:32 Jan 22, 2006
I closed this bug because I ran a test with the then current Cygwin and the app worked just fine. I did ask you to verify my finding and got no reply. So I assumed everything was fine and I closed the bug report.

Would you please verify, if not using stdio, but an FLTK widget instead, fixes the problem on your side? If that is so, I'd agree with Mike and blame Cygwin. If not, we can reopen the original bug report.

"Fixed in SVN" is surely a missleading last reply, since I don't beleive I changed any code at all.
 
 
#3 shaiay
20:57 Jan 22, 2006
This must be some mixup between the "official" STR1022 page and the fltk.bugs mailing list.

If you search the list for "1022" you will see in :
http://www.fltk.org/newsgroups.php?gfltk.bugs+v:3076
that I used Matthias's test program with a for loop updating the numbers. After matthias fixing fltk in svn:
http://www.fltk.org/newsgroups.php?gfltk.bugs+v:3074tt
it worked. So it was fixed and it did work (I have the "working" svn snapshot in my computer).
My guess is that somehow it managed to slip through the cracks and get lost (Although I have no idea how this could have happned since it WAS fixed in svn)

As a lesson from 1022, I want to propose that all 1151 related traffic will be posted through the str#1151 page and not through the fltk.bugs list (this would probably be good practice for other STR's)

After all this being said and done, It is still my "fault" for not checking  that this STR did not reapear in the 1.1.7 pre-release and reporting it before the 1.1.7 release

Shai
 
 
#4 shaiay
11:38 Jan 24, 2006
I find that this probelm is fixed after setting

#define FOREVER 0.01

instead of the original 1e20
in src/Fl.cxx

This has no bad effect on CPU usage in my system

Does it make sense? 1e20 does seem closer to forever than 0.01, but maybe for computers this is enough :)
 
 
#5 mike
08:10 Jan 31, 2006
Using a value of 0.01 is not an acceptable fix - it was changed because others complained about increased CPU usage.

Since Matthias hasn't been able to duplicate the problem with his Cygwin install, I'm not sure what we can do here.  I'm tempted to just close this out as something we can't fix - what we really need is a Cygwin expert to weigh in on what is going wrong with your install.
 
 
#6 shaiay
10:13 Jan 31, 2006
Can Matthias post info about his cygwin setup here so I can verify -- this bug is really important to me and I would be very disaapointed in seeing it closed w/o resolution

Shai
 
 
#7 matt
01:42 Jun 06, 2006
The version of Cygwin I used is posted in the bug report. I have not changed FLTK, but replaced the calls to stderr/stdout with status changes in FLTK widgets because my Cygwin version refused to output to the console.

I have a really hard time getting into this bug again. It would involve creating a virtual machine with a brand new Cygwin setup. Isn't there anyone out there who uses Cygwin on a daily basis?
 
 
#8 shaiay
01:49 Jun 06, 2006
I will try to replicate your system and see if it's OK. It might take some time, but I'll report back here

Shai
 
 
#9 matt
02:16 Jun 06, 2006
Thanks. More importantly, it should work with the newest incarnation of Cygwin though.  
 
#10 shaiay
07:39 Jun 07, 2006
It does not work :(. The same problem reportred in 1022 is still there.

I deleted my previous cygwin install and than did a clean install of cygwin from the cygwin website. I installed all the base componenets + gcc + make, all versions are those suggested by the cygwin installer.

I downloaded fltk-1.1.7 and compiled from source using

./configure --enable-cygwin

I then recompiled the fd_test applications (with Matthias' changes -- i.e. it should count up). The numbers in the window will only update if some event happenes inside the window -- e.g. the window is in focus and the mouse moves over it.

My cygwin config:

uname -a 
CYGWIN_NT-5.1 xxx 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin

g++ -v
...
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)

WinXP system info (output from the dxdiag application):

   Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_gdr.050301-1519)
           Language: English (Regional Setting: Hebrew)
System Manufacturer: D850GB
       System Model: GB85010A
               BIOS: Default System BIOS
          Processor: Intel(R) Pentium(R) 4 CPU 1600MHz
             Memory: 256MB RAM
          Page File: 436MB used, 214MB available
        Windows Dir: C:\WINDOWS
    DirectX Version: DirectX 9.0c (4.09.0000.0904)
 
 
#11 cable_guy_67
14:04 Aug 24, 2006
FWIW, I do see the reported behavior using the code posted in STR#1022 with the changes suggested by Matthias to use a widget for output. Updates are not seen unless I move the mouse over the window.

$ uname -a
CYGWIN_NT-5.0 roth 1.5.21(0.156/4/2) 2006-07-30 14:21 i686 Cygwin

$ g++ -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug : (reconfigured)
Thread model: posix
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)


$ svn info
Path: .
URL: http://svn.easysw.com/public/fltk/fltk/branches/branch-1.1
Repository Root: http://svn.easysw.com/public/fltk/fltk
Repository UUID: ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Revision: 5351
Node Kind: directory
Schedule: normal
Last Changed Author: matt
Last Changed Rev: 5351
Last Changed Date: 2006-08-23 16:38:30 -0400 (Wed, 23 Aug 2006)
Properties Last Updated: 2006-08-05 23:29:32 -0400 (Sat, 05 Aug 2006)


When starting fd_test_driver I see random characters in the fd_test box until I move the mouse over the window. Then the T: number going up is displayed until moving the mouse out of the window.

The code itself is beyond me so I can't offer anything there. I just wanted to verify the OP's output with my CygWin setup.

Mark

BTW, is there a way to test the output with a normal console (non-fltk) fd_test to deduce if the problem is fltk's or CygWin's? I'll gladly run some tests if someone can come up with something like that.

For further testing of this problem though, you may want to repost the code with the current STR to make it easier for others to run tests. It was a bit of a pain having to go through both STR's to get all the info to test this.
 
 
#12 matt
02:22 Aug 25, 2006
I promised I would not touch this one with a ten foot pole. I guess it is time to bring out the twelve foot pole now. Gnnn.  
 
#13 matt
06:45 Aug 29, 2006
OK, I have tried a long list of things and wasted almost a whole day with no result. It may very well be my l;ack of experience with Cygwin/MinGW, but nothing runs even remotely the way I would expect, starting with "hello world" which prints nothing on my machine, even if I set -mconsole and -mwindow. Followed by gdb crashing before I reach "main", etc. etc. . Call my machine junk or my installation wrong, but I am at my wits end. If nobody comes up with a fix to this, I will close this bug as unresolved and continue with rc1 for the greater good of all other users.

Sorry.
 
 
#14 matt
02:19 Aug 30, 2006
Fixed in Subversion repository.

Cygwin for some reason was ifdef'd out for setting a shorter timout when reading fd's (yes, the Win32 requires polling to read fd's). Adding the shorter timeout has no impact on Apps that do not poll fd's, but should fix most (all?) problems described in this bug report."

OP: please verify.
 
 
#15 cable_guy_67
03:38 Aug 30, 2006
Not the OP but I can verify it does work as expected with the current subversion code. Interaction with window is no longer required for it to be updated. CPU usage stays below 10% during run.

CygWin updated yesterday
FLTK subverion current
OS W2K up to date
 
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.