Article View: borland.public.jbuilder.java.language
Article #8599Re: Very strange and complex problem,
From: Joi Ellis [TeamB]
Date: Sun, 11 Mar 2001 13:24
Date: Sun, 11 Mar 2001 13:24
43 lines
2494 bytes
2494 bytes
Edwin G๏ฟฝnthner <edgue@web.de> wrote: [snip] > (I am using a special TableModel that uses invokeAndWait > to notify the table listeners). [snip] > OK, now its time to talk about our problem: > sometimes we dont receive proper data. I dont have > an IOException or any kind of visible communication > problem; it is just that my InputStream gives > me bytes that should not be there! [snip] > Most of the time that is exactly what pops up in my > InputStream. > But sometimes (with JDK 1.3 SUN - and ALWAYS with > JDK 1.3 IBM) the InputStream gives me data like: > > ??? ???? "a string"; 2424;"another string";;; [snip] > I assume that it is some kind of threading problem: > in JDK 1.3 IBM the first errors happen when the table > should display a scrollbare and start scrolling. I'm guessing that it's a thread safety problem. Just for grins, I'd try running your app under Sun's JVM, using green threads, and see if the problem goes away. If it does, then you probably need to start slinging some 'syncronized' keywords on your IO methods and the class where the data is stored. It looks to me like your 'display data' thread is pulling data from your 'read data from server' thread before the latter is ready. I'm not much more than a rank beginner when it comes to threads, so posting code snippets for me to look at will be an amusing but fruitless exercise. ;) -- Joi Ellis (TeamB) No direct email, please. For best results, post on news server newsgroups.borland.com! Newsgroup Info: http://www.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<98fu9v$qe41@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!canoe.uoregon.edu!hammer.uoregon.edu!enews.sgi.com!news.xtra.co.nz!newsfeed01.tsnz.net!bornews.borland.com!not-for-mailReferences:
<3AAB51A7.1EBEF470@web.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,d415f4485eecbf26
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-11 05:34:03 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!canoe.uoregon.edu!hammer.uoregon.edu!enews.sgi.com!news.xtra.co.nz!newsfeed01.tsnz.net!bornews.borland.com!not-for-mail
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Very strange and complex problem,
Date: 11 Mar 2001 13:24:15 GMT
Organization: Another Netscape Collabra Server User
Lines: 43
Message-ID: <98fu9v$qe41@bornews.inprise.com>
References: <3AAB51A7.1EBEF470@web.de>
NNTP-Posting-Host: linux.aravox.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.16-3 (i686))