FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mango Beta 9
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Wed Jul 07, 2004 6:47 pm    Post subject: Reply with quote

Interesting about version() working differently. To get rid of the segfault (for now), comment out the testInvalidatee() shown below, within main().
Code:

        try {
            //testCluster();
            testInvalidatee();
            //testMulticast();

That's using a bunch of multicasting stuff that hasn't yet been tested on linux so, while I'm disappointed, I'm not too wildly surprised. I'd like to find out where in the multicast stuff it's segfaulting though ... if you're up for tracking that one down? Wink
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Wed Jul 07, 2004 7:11 pm    Post subject: Reply with quote

kris wrote:
Interesting about version() working differently. To get rid of the segfault (for now), comment out the testInvalidatee() shown below, within main().
Code:

        try {
            //testCluster();
            testInvalidatee();
            //testMulticast();


Oh I see! That was why it was segfaulting. I thought it was due to the opShift operators still. As you suggested I commented out the above and everything worked fine. I enabled testBuffer and testToken1 functions just to make sure. Unitest ran as expected.

kris wrote:
That's using a bunch of multicasting stuff that hasn't yet been tested on linux so, while I'm disappointed, I'm not too wildly surprised. I'd like to find out where in the multicast stuff it's segfaulting though ... if you're up for tracking that one down? Wink


Uh oh... I can see more sleepless nights around the corner... lol. I'll give it a whirl.

Later,

John
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Wed Jul 07, 2004 7:53 pm    Post subject: Reply with quote

Ahhhh, good on you John!

I'm happy that the Logger stuff at least worked on linux right out of the box; that's a good sign. I'm guessing that testClassSerialization() works fine on linux also.

That would isolate the segfault to either MulticastSocket, SocketListener, one or two Socket methods, or the static constructor ordering as setup by the compiler. I've been having some problems with the latter, and it may be different on linux than on Win32.

Do you have a source-level debugger?
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Wed Jul 07, 2004 10:28 pm    Post subject: Reply with quote

kris wrote:
That would isolate the segfault to either MulticastSocket, SocketListener, one or two Socket methods, or the static constructor ordering as setup by the compiler. I've been having some problems with the latter, and it may be different on linux than on Win32.


Well if it can be narrowed down to those, perhaps there's some hope. Smile

kris wrote:
Do you have a source-level debugger?


Hmmm... I haven't done much with a source level debugger on linux for ages... but it's easy enough to find one: gdb is the standard one on this platform and there are a couple of grahical interfaces to make it easier to play with (including ddd and kDbg). I'll get both set up on my linux system. I haven't tried using a debugger with D yet, though. I imagine it will be somewhat limited. But the tools are available, just so you know.

Later,

John
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Wed Jul 07, 2004 11:01 pm    Post subject: Reply with quote

This may be a stupid question, but how do you use a source level debugger with D on linux? Has anyone here done this before? I don't see how this can be done...

Later,

John
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Wed Jul 07, 2004 11:34 pm    Post subject: Reply with quote

JJR wrote:
Hmmm... I haven't done much with a source level debugger on linux for ages... but it's easy enough to find one: gdb is the standard one on this platform and there are a couple of grahical interfaces to make it easier to play with (including ddd and kDbg). I'll get both set up on my linux system. I haven't tried using a debugger with D yet, though. I imagine it will be somewhat limited. But the tools are available, just so you know.

I ask because bugs like this are often easy to isolate by simply stepping over function calls until something breaks. If I'm not familiar with the codebase then I find that easier than using printf or Stdout.

Having said that, I don't have a linux box (clearly!) so don't know how well D will work with KDbg et. al. One would hope that you'd get a similar set of symbols as the Win32 compiler emits? Failing that, I'll rattle some trace code into place to narrow things down; if that would help the process?
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Thu Jul 08, 2004 1:29 am    Post subject: Reply with quote

I realize how handy a tool the debugger can be. It just looks like there's no easy solution in that area for D yet (specifically on Linux). I played around with the debuggers I mentioned above... but I can't get things to work properly. If it would work at all, I think it would take quite a bit of manipulation to get the settings correct for D. Neither DDD nor Kdbg got along well with the D binary and source. I actually got further using the command line gdb. Yet I understood too little to get far with that. What we need is better debugger support and a tutorial that explains how to get started debugging D on linux.

I guess I'll sniffing out the bugs the old fashioned way for now.

Later,

John
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Thu Jul 08, 2004 12:51 pm    Post subject: Reply with quote

JJR wrote:
I played around with the debuggers I mentioned above... but I can't get things to work properly

That sucks ...
Back to top
View user's profile Send private message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Fri Jul 09, 2004 3:11 am    Post subject: A momentary hijack Reply with quote

I'm going to hijack your thread for a moment. Smile You may want to consider adding:

alias DisplayWriter.put put;

to the TextWriter class. For some reason, DMD0.94 wants to match all calls to TextWriter's put(IWritable). It might be a bug in DMD's override but just adding the alias makes things work. Either that or I'm doing something fishy?
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Jul 09, 2004 11:01 am    Post subject: Re: A momentary hijack Reply with quote

csauls wrote:
You may want to consider adding:

alias DisplayWriter.put put;

to the TextWriter class. For some reason, DMD0.94 wants to match all calls to TextWriter's put(IWritable). It might be a bug in DMD's override but just adding the alias makes things work. Either that or I'm doing something fishy?

This is on linux right?
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Jul 09, 2004 10:08 pm    Post subject: Reply with quote

kris wrote:
... a bunch of multicasting stuff that hasn't yet been tested on linux so, while I'm disappointed, I'm not too wildly surprised

May have located the segfault by accident ~ will post again tomorrow, and place a beta_9a.zip on SVN
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Fri Jul 09, 2004 11:28 pm    Post subject: Reply with quote

kris wrote:
kris wrote:
... a bunch of multicasting stuff that hasn't yet been tested on linux so, while I'm disappointed, I'm not too wildly surprised

May have located the segfault by accident ~ will post again tomorrow, and place a beta_9a.zip on SVN


Good to hear... I haven't made any headway. I look forward to trying out the new beta when it's out.
Back to top
View user's profile Send private message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Sat Jul 10, 2004 2:25 am    Post subject: Re: A momentary hijack Reply with quote

kris wrote:
csauls wrote:
You may want to consider adding:

alias DisplayWriter.put put;

to the TextWriter class. For some reason, DMD0.94 wants to match all calls to TextWriter's put(IWritable). It might be a bug in DMD's override but just adding the alias makes things work. Either that or I'm doing something fishy?

This is on linux right?

Nopers, WinXP. I'm temporarily without access to Linux while our devel box gets some cleanup/updating done. Good news though: we may try using Mango (and DSP?) to build a proof-of-concept site. Not up to me, but the recommendation has been made.
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sat Jul 10, 2004 11:18 am    Post subject: Re: A momentary hijack Reply with quote

csauls wrote:
kris wrote:
csauls wrote:
You may want to consider adding:

alias DisplayWriter.put put;

to the TextWriter class. For some reason, DMD0.94 wants to match all calls to TextWriter's put(IWritable). It might be a bug in DMD's override but just adding the alias makes things work. Either that or I'm doing something fishy?

This is on linux right?

Nopers, WinXP. I'm temporarily without access to Linux while our devel box gets some cleanup/updating done. Good news though: we may try using Mango (and DSP?) to build a proof-of-concept site. Not up to me, but the recommendation has been made.

Excellent!

Shame about TextWriter though; I don't understand how you're running into that issue and I'm not; it's as though we're running different versions of the compiler. Sure, there are some highly unintuitive and buggy idioms surrounding inherited methods of the same name ~ but I tried yesterday to get the behaviour you noted and failed miserably (it compiled fine). In fact, adding the alias broke it completely Crying or Very sad

Can you post a snippet of code that fails to compile please Chris? I'd like to remedy this sooner rather than later.

Cheers!
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sat Jul 10, 2004 2:00 pm    Post subject: Re: A momentary hijack Reply with quote

csauls wrote:
I'm going to hijack your thread for a moment. Smile You may want to consider adding:

alias DisplayWriter.put put;

to the TextWriter class. For some reason, DMD0.94 wants to match all calls to TextWriter's put(IWritable). It might be a bug in DMD's override but just adding the alias makes things work. Either that or I'm doing something fishy?

I suspect what might be happening is that you trying to put() a type that's not recognized by the set of put() prototypes in IWriter (or something like that). If dmd doesn't find a matching prototype it uses one of the others as "an example" in the error message; this can be really confusing.

For example: you will get a bogus error message if you try to put (int[]), since arrays of integers are not directly supported ...

Code:
TextWriter t = new TextWriter (...);
int[10] x;

t.put (x);

function opShl (bit x) does not match argument types (int[10])
cannot implicitly convert int[10] to IWritable


Which data type are you using?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 2 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group