I've found the problem.

The NailGun client assumes that the strlen function will handle a null
pointer for the argument.
Under Solaris this is not the case (http://technopark02.blogspot.com/
2006/04/solaris-null-pointer-bugs-usrlib00so1.html)

The problem is in sendText.

With Nailgun 0.7.1, this starts at line 203.

I did a quick check for a null:

void sendText(char chunkType, char *text) {
  int len = 0;
  if ( text ) {
    len = strlen(text);
  }
  sendHeader(len, chunkType);
  sendAll(nailgunsocket, text, len);
}

and it seems to have fixed the problem, I've now got my REPL in
Vim. :)

On Sep 8, 9:10 pm, Michael Aldred <mike.ald...@gmail.com> wrote:
> G'day,
>
> I'm having a bit of trouble getting VimClojure working under
> OpenSolaris 2009.06 (I'm currently using the development IPS
> repository, however I still got the problem with the release
> repository).
>
> I'm compiled and installed vimclojure.jar, and ng.
>
> Vim correctly detects and highlights .clj files as clojure files, and
> I can start the ng server just fine:
>
> java -cp /export/home/aldredmr/local/clojure/clojure.jar:/export/home/
> aldredmr/local/clojure/clojure-contrib.jar:/export/home/aldredmr/local/
> clojure/vimclojure.jar com.martiansoftware.nailgun.NGServer 127.0.0.1
> NGServer started on 127.0.0.1, port 2113.
>
> However, when start vim, e.g.:
>
> gvim test.clj
>
> vim starts up, and I get the following from the ng server:
>
> java.io.EOFException
>         at java.io.DataInputStream.readFully(DataInputStream.java:180)
>         at java.io.DataInputStream.readFully(DataInputStream.java:152)
>         at com.martiansoftware.nailgun.NGSession.run(Unknown Source)
> java.io.EOFException
>         at java.io.DataInputStream.readFully(DataInputStream.java:180)
>         at java.io.DataInputStream.readFully(DataInputStream.java:152)
>         at com.martiansoftware.nailgun.NGSession.run(Unknown Source)
>
> Entering in :nmap in vim, I get the following:
>
> n  \K            :call <SNR>2_PreGetPage(0)<CR>
> n  gx            <Plug>NetrwBrowseX
> n  <Plug>NetrwBrowseX * :call netrw#NetrwBrowseX(expand("<cWORD>"),0)
> <CR>
>
> So it seems I'm unable to start the REPL.
>
> I've tried setting my CLASSPATH:
>
> echo $CLASSPATH
> /export/home/aldredmr/local/clojure/clojure.jar:/export/home/aldredmr/
> local/clojure/clojure-contrib.jar:/export/aldredmr/local/clojure/
> vimclojure.jar
>
> I think I've narrowed the problem down to the ng client, when I try
> "ng ng-alias" I get a core dump, so it appears that the ng client
> doesn't like OpenSolaris.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to