Inexplicable Parameter-Passing Phenomena w/MinGW GCJ

Mohan Embar gnustuff@thisiscool.com
Wed Sep 10 14:38:00 GMT 2003


Hi Andrew,
> > When the above skt.getTimeout() call (which happens AFTER the
> > skt.setSoTimeout() call and should therefore have no effect on it)
> > is commented out, no message boxes appear.
> > 
> > I know I need to troubleshoot this and document this much further, but what
> > I'm looking for is any sort of "aha" here. Keep in mind that this is a
> > statically linked libgcj.
>>Well, I can't believe that the right method is being called. You must
>have a version mismatch between .class and .java and .o. What makes
>you thisnk skt.getTimeout() really is called?

Good gravy. You're right. The call in impl.setOption() in DatagramSocket:
---------------------------------------8<----------------------------------
 public synchronized void setSoTimeout(int timeout) throws SocketException
 {
 if (timeout < 0)
 throw new IllegalArgumentException("Invalid timeout: " + timeout);
 impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout));
 }
---------------------------------------8<----------------------------------
...ends up calling getOption() in natPlainDatagramSocketImplWin32.cc:
and impl.getOption() ends up calling setOption with a totally bogus
second parameter.
I'm pretty sure that everything is in sync. I even did a clean get and build
of everything from CVS last night. Do you have any advice as to how
the wrong CNI-native method could get invoked? Or any tips at all?
I'll continue to troubleshoot this more on my end.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /