background-typecheck-arbitrary seems to hang

Help
2010-05-16
2012-12-06
1 2 > >> (Page 1 of 2)
  • Han Joosten
    Han Joosten
    2010-05-16

    I was editting one of my haskell files in my project. It contained a syntax error, which I corrected. However, now nothing more seems to happen: In the progress bar it says "Scion command 'background-typecheck-arbitrary'.  In the progress view, quite a few lines show with the same message, all (exept for the first line) indicating that they are waiting.
    I had a look at the scion console. This contains a line 'waiting for next client'. 
    There is not much cpu used at all, so I think nothing is being done that has to be waited for.
    Is this normal behaviour? If so, what do I do wrong? If not, is there a workaround?

    I made a screenshot, that might help telling what is going on:


    Thanks again for any help!

     
  • JP Moresmau
    JP Moresmau
    2010-05-16

    Yes, I have the same issue sometimes. For me, it's UTF-8 characters that cause Scion to crash when it tries to ouput the command to the logger. You can see that by looking at the end of the line before "waiting for next client". I get something like hPutChar, character not in code page error. This seems to be new behavior from GHC 6.12. I think if you close and reopen the project it will restart scion, but when you type in the same character it will crash again, I'm afraid. I'm going to look at the issue very quickly since it's annoying me too, I'll keep you posted.

     
  • Han Joosten
    Han Joosten
    2010-05-17

    Hi JP,

    closing and reopening my project isn't really an option, for I have about 70 modules in my project. I hope that you will be able to find a solution on the short term. If there is anything I can do to help you testing, let me know. Good luck!

    Han.

     
  • Han Joosten
    Han Joosten
    2010-05-17

    Since I am not familliar with git, I am not sure that I got your patch. What I did is I opened the Git Bash command prompt, and I said:
    git clone git://github.com/JPMoresmau/scion.git
    Then I went to that directory with a windows cmd, and said:
    cabal install
    The scion package was compiled and linked. Everything looks fine.

    Then I started eclipse, and went to my project. I did some minor editing, but I got strange error messages. It complained about syntax errors, but the token it mentioned was nowhere near the line that was mentioned in the error message.
    I tried some more things, like building the whole project. Everything seemed to be malfunctioning, so I decided to try to close the project. Again, nothing.
    Then I tried to close eclips all together. The main window closed, but the progress information is still there. For what it is worth, it shows some events in the queue, i presume:


    I could not close this window, and eventually, I had to kill the process using the process manager.

    I'll try to start up again, to see what happens.

     
  • Han Joosten
    Han Joosten
    2010-05-17

    After starting eclipse again, the syntax error showed up, but in a rather different place. The token it complained about was at line 101, but in my previous session it said that it was at line 64. Is the saved file used for compiling, or the contents of a file that has been edited, but not saved ? Could this have anything to do with this bug?

    After a very short time of editting, again

    and there is still a complaint about the syntax. Double clicking on the error message should show the token, but a very different location in the file is shown. the next picture is right after I had doubbleclicked the error message:


    The patch seems to make things even worse

     
  • JP Moresmau
    JP Moresmau
    2010-05-17

    You misread my mail. The patch is in eclipsefp, not in scion! So you need to get the eclipsefp Java source code from git://github.com/JPMoresmau/eclipsefp.git, build it and try running eclipse with the built plugins! I haven't changed scion at all recently.
    If you get errors unrelated to the actual source code there must be an error in the Scion ouput or the eclipse log. Usually a file hasn't been loaded properly and hence the results from scion are from the previous file.

     
  • Han Joosten
    Han Joosten
    2010-05-17

    Oops, now I see. Sorry.
    However, this is a new problem: I know nothing about building Java. So yes, I have the new code, but no clue how to build it.
    I could of course experiment with it: I could import the code in a new java project in eclipse, but since I will build eclipse (?) this might not be the right way to go. is there a java translation for 'cabal install'  ;-) ?

     
  • JP Moresmau
    JP Moresmau
    2010-05-18

    Instructions to run EclipseFP from source can be found at http://eclipsefp.sourceforge.net/build.html. Basically you create an Eclipse workspace with the Eclipsefp plugins as projects, Eclipse will build everything for you and you can then run your own workspace from that. If it fixes your problems you can then generate the final jar files that you can copy in your eclipse plugins directory. Otherwise I suppose I can email you the patched plugin as a jar file.

     
  • Han Joosten
    Han Joosten
    2010-05-19

    Well, I followed the instructions, but I feel uncomfortable because I hardly know what it is that I am doing. I got to the point  (step 8 in the instructions) where a second instance of eclipse appeared, and my scion server was found automatically.
    However, I do not get the scion server to connect. I have looked around in other posts, for I am not the only one having problems to connect to the scion server. I figured out that it might have something to do with IPv6. I checked my network adapter, but it only has the original (IPv4) protocol installed.  I will have to see if I can get that up and running, to see if that helps.
    However, I am running short on time. I do this project in my spare time (not part of my job or whatsoever). I will continue my efforts to get this all to work (or to supply you with information what is the reason that it still doesn't work for me)
    Also, I will need some more info on what and how on you saying "you can then generate the final jar files that you can copy in your eclipse plugins directory". As a plain user of eclipsefp I have no experience at all with plugin developement, and until now I have been able to stay away from java programming (and hence its build process).
    If you think of some clues that might be helpfull, I would greatly appreciate it. Otherwise, I'll see what I can do next weekend.

     
  • JP Moresmau
    JP Moresmau
    2010-05-19

    Yeah, I haven't had time to test my IPV6 changes on a IPV4-only machine, I'll do that ASAP. The thing is that in one go I changed machine, OS, network stack and version of GHC, so I'm still busy figuring out what's broken and why.
    Generating the jar files from the source code is straightforward in Eclipse, I can give you instructions to do that if you need to. Basically from the source code of the different modules Eclipse can generate jar files that you copy to the eclipse folder itself, so you upgrade your own eclipse. But I appreciate that you just want to be a user of EclipseFP, while I come from a Java background so hacking in Java is not a problem, so you don't want to go into all of this if you can avoid it.
    If I was sure there's no other big bug lurking I would release a new version of EclipseFP that would hopefully fix your woes. At least when I know that IPV6/v4 thing is ok.

     
  • Han Joosten
    Han Joosten
    2010-05-20

    So that looks like it would be better if I would keep my machine IPV4 only, for the time being. That enables me to help you test. If it would work for me by then, I should be able to tell you if there are other problems or not. I would happily test that out.

     
  • JP Moresmau
    JP Moresmau
    2010-05-20

    OK, I have fixed the EclipseFp plugin to work with both IPV4 and IPV6. It works on my two machines, one where scion starts on IPV6 and one where it starts on IPV4. Under github.

     
  • Han Joosten
    Han Joosten
    2010-05-22

    I made a small video of what I did.
    watch it here.
    The result is that no new instance of eclipsfp shows up. Did I do something wrong?

     
  • Han Joosten
    Han Joosten
    2010-05-22

    aha, looked some closer now. I launched the new eclipse manually, and my "Hello world" application is running.

    However, I get warnings and errors when I try to build my own project. There seems to be a mis-synchronisation with the scion server. Some Id's that are expected are out of sync.
    Also, there is an error complaining about something like a JSONObject that cannot be cast:

     
  • JP Moresmau
    JP Moresmau
    2010-05-22

    You need scion from git://github.com/JPMoresmau/scion.git. Download, run cabal configure -fserver, cabal build, cabal install then make sure eclipsefp points to the scion-server executable you built. I have had to add extensions to scion to be able to do more using the GHC API than the original scion library did, but I don't think there is much activity on scion now apart from mine so I don't know if there'll be a release…

     
  • JP Moresmau
    JP Moresmau
    2010-05-22

    About your video: http://eclipsefp.sourceforge.net/build.html does say that the initial build of eclipse fp shows errors because of the order of build operations between antlr and java I think. So don't worry about them. There are also warnings that you can ignore (things like non localized messages, unused variables, etc…)

     
  • Han Joosten
    Han Joosten
    2010-05-25

    Hi Again,

    Sorry that I didn't react earlier. However, I now managed to build my project, which is great. I ignored the warnings because of the order in which the antlr and java stuff is built.
    However, I still have some issues:
    1st, after I checked out my project from the svn server, my main.hs got overridden by a new one, as in a new haskell project. This is minor, for I could retrieve the original from the svn server again.
    2nd, after my project has been built, whenever I do anything in the edit pane, the scion output complains about a mismatch in ID's, as you can see in the error log:

    loads of warnings of such are generated, which is of course annoying. Is there anything that can be done about this?
    Last but not least: I now have a second instance of eclipse in which my project can be built. Is there a way for me to get the plugin in my first version of eclipse?

     
  • JP Moresmau
    JP Moresmau
    2010-05-25

    1. Search for the file called ProjectModleFilesOp.java in the net.sf.eclipsefp.haskell.core plugin. It has a createFile method that checks that the file doesn't exist before creating it (!file.exists())
    2. I have never seen a mismatched id before! Can you send me the eclipse log file (workspace/.metadata/.log)?
    3. To build the final plugins yourself: go into the project net.sf.eclipsefp.haskell-feature. Open feature.xml. If you have the right eclipse plug in development plugins you should see a page with an "Exporting" section. Click on export wizard and choose a directory to generate everything into. This will generate a features and a plugins directory, with jars inside. Close eclipse, copy these directories into eclipse, restart. Voila!
    Maybe we should look into your mismatch ID issue before you update your whole eclipse, though.

    BTW, I'm working now in bundling scion inside eclipsefp to avoid downloading and building it manually.

     
  • JP Moresmau
    JP Moresmau
    2010-05-25

    Oh, and if your SVN server is public give me the url so I can try the "get from SVN overwrite Main.hs" issue myself.

     
  • Han Joosten
    Han Joosten
    2010-05-27

    Ok. Here is the log:

    !SESSION 2010-05-25 21:07:17.062 -------------------------------
    eclipse.buildId=unknown
    java.version=1.6.0_20
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=nl_NL
    Framework arguments:  -product org.eclipse.platform.ide
    Command-line arguments:  -product org.eclipse.platform.ide -data C:\data\EclipseWork/../runtime-New_configuration(2) -dev file:C:/data/EclipseWork/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86

    !ENTRY org.eclipse.epp.usagedata.recording 1 0 2010-05-25 21:08:40.906
    !MESSAGE Usage data uploaded to http://udc.eclipse.org/upload.php in 7579 milliseconds.

    !ENTRY net.sf.eclipsefp.haskell.scion.client 2 2 2010-05-25 21:22:31.546
    !MESSAGE The Scion server died unexpectedly and was restarted.
    !STACK 0
    The Scion server is not running.
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.runCommandSync(ScionServer.java:404)
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.runCommandSync(ScionServer.java:399)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance.runCommandSync(ScionInstance.java:203)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.run(ScionCommand.java:138)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    !ENTRY net.sf.eclipsefp.haskell.scion.client 4 4 2010-05-25 21:22:31.578
    !MESSAGE The Scion server is not running.
    !STACK 0
    The Scion server is not running.
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.runCommandSync(ScionServer.java:404)
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.runCommandSync(ScionServer.java:399)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance.runCommandSync(ScionInstance.java:203)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.run(ScionCommand.java:138)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    !ENTRY net.sf.eclipsefp.haskell.scion.client 4 4 2010-05-25 21:22:31.578
    !MESSAGE Error deleting problem markers
    !STACK 1
    org.eclipse.core.internal.resources.ResourceException: Resource '/ampersand' does not exist.
    at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:319)
    at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:196)
    at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:113)
    at org.eclipse.core.internal.resources.Resource.deleteMarkers(Resource.java:764)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance.deleteProblems(ScionInstance.java:285)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance$1.run(ScionInstance.java:165)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.run(ScionCommand.java:149)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    !SUBENTRY 1 org.eclipse.core.resources 4 368 2010-05-25 21:22:31.578
    !MESSAGE Resource '/ampersand' does not exist.

    !ENTRY net.sf.eclipsefp.haskell.scion.client 4 4 2010-05-25 21:22:33.984
    !MESSAGE The Scion server returned an error of type CommandFailed:
    user error (Error Parsing: file "C:\data\runtime-New_configuration(2)\ampersand\ampersand.cabal" doesn't exist. Cannot continue.)
    The command was:
    {
      "id": 1,
      "method": "list-cabal-components",
      "params": {"cabal-file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\ampersand.cabal"}
    }
    The response was:
    {
      "error": {
        "message": "user error (Error Parsing: file \"C:\\data\\runtime-New_configuration(2)\\ampersand\\ampersand.cabal\" doesn't exist. Cannot continue.)",
        "name": "CommandFailed"
      },
      "id": 1,
      "version": "0.1"
    }
    !STACK 0
    net.sf.eclipsefp.haskell.scion.exceptions.ScionCommandException: The Scion server returned an error of type CommandFailed:
    user error (Error Parsing: file "C:\data\runtime-New_configuration(2)\ampersand\ampersand.cabal" doesn't exist. Cannot continue.)
    The command was:
    {
      "id": 1,
      "method": "list-cabal-components",
      "params": {"cabal-file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\ampersand.cabal"}
    }
    The response was:
    {
      "error": {
        "message": "user error (Error Parsing: file \"C:\\data\\runtime-New_configuration(2)\\ampersand\\ampersand.cabal\" doesn't exist. Cannot continue.)",
        "name": "CommandFailed"
      },
      "id": 1,
      "version": "0.1"
    }
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.processResponseResult(ScionCommand.java:295)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.processResponse(ScionCommand.java:275)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.receiveResponse(ScionCommand.java:209)
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.runCommandSync(ScionServer.java:411)
    at net.sf.eclipsefp.haskell.scion.internal.client.ScionServer.runCommandSync(ScionServer.java:399)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance.runCommandSync(ScionInstance.java:203)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.run(ScionCommand.java:138)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Caused by: org.json.JSONException: JSONObject not found.
    at org.json.JSONObject.get(JSONObject.java:517)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.processResponseResult(ScionCommand.java:283)
    … 7 more

    !ENTRY net.sf.eclipsefp.haskell.scion.client 4 4 2010-05-25 21:22:33.984
    !MESSAGE Error deleting problem markers
    !STACK 1
    org.eclipse.core.internal.resources.ResourceException: Resource '/ampersand' does not exist.
    at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:319)
    at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:196)
    at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:113)
    at org.eclipse.core.internal.resources.Resource.deleteMarkers(Resource.java:764)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance.deleteProblems(ScionInstance.java:285)
    at net.sf.eclipsefp.haskell.scion.client.ScionInstance$1.run(ScionInstance.java:165)
    at net.sf.eclipsefp.haskell.scion.internal.commands.ScionCommand.run(ScionCommand.java:149)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    !SUBENTRY 1 org.eclipse.core.resources 4 368 2010-05-25 21:22:33.984
    !MESSAGE Resource '/ampersand' does not exist.

    !ENTRY net.sf.eclipsefp.haskell.scion.client 2 2 2010-05-25 21:29:07.234
    !MESSAGE The Scion server's response has ID 11, but we expected ID 13.
    The command was:
    {
      "id": 13,
      "method": "load",
      "params": {
        "component": {
          "cabal-file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\ampersand.cabal",
          "executable": "ampersand"
        },
        "output": true
      }
    }
    The response was:
    {
      "id": 11,
      "result": {
        "duration": 163.64063,
        "notes": [
          {
            "kind": "warning",
            "location": {
              "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Data\\Plug.hs",
              "region": [
                85,
                11,
                85,
                23
              ]
            },
            "message": "Warning: No explicit method nor default method for `flp'"
          },
          {
            "kind": "warning",
            "location": {
              "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Data\\Plug.hs",
              "region": [
                85,
                11,
                85,
                23
              ]
            },
            "message": "Warning: No explicit method nor default method for `isFalse'"
          },
          {
            "kind": "warning",
            "location": {
              "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Data\\Plug.hs",
              "region": [
                85,
                11,
                85,
                23
              ]
            },
            "message": "Warning: No explicit method nor default method for `isNot'"
          },
          {
            "kind": "warning",
            "location": {
              "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Data\\Plug.hs",
              "region": [
                85,
                11,
                85,
                23
              ]
            },
            "message": "Warning: No explicit method nor default method for `isProp'"
          },
          {
            "kind": "warning",
            "location": {
              "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Data\\Plug.hs",
              "region": [
                85,
                11,
                85,
                23
              ]
            },
            "message": "Warning: No explicit method nor default method for `isTrue'"
          },
          {
            "kind": "warning",
            "location": {
              "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Data\\Plug.hs",
              "region": [
                85,
                11,
                85,
                23
              ]
            },
            "message": "Warning: No explicit method nor default method for `typeUniq'"
          }
        ],
        "succeeded": true
      },
      "version": "0.1"
    }

    !ENTRY net.sf.eclipsefp.haskell.scion.client 2 2 2010-05-25 21:30:11.875
    !MESSAGE The Scion server's response has ID 12, but we expected ID 14.
    The command was:
    {
      "id": 14,
      "method": "thing-at-point",
      "params": {
        "column": 10,
        "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Main.hs",
        "line": 6
      }
    }
    The response was:
    {
      "id": 12,
      "result": {
        "duration": 13.171875,
        "notes": ,
        "succeeded": true
      },
      "version": "0.1"
    }

    !ENTRY net.sf.eclipsefp.haskell.scion.client 2 2 2010-05-25 21:30:12.859
    !MESSAGE The Scion server's response has ID 13, but we expected ID 15.
    The command was:
    {
      "id": 15,
      "method": "thing-at-point",
      "params": {
        "column": 7,
        "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Main.hs",
        "line": 9
      }
    }
    The response was:
    {
      "id": 13,
      "result": {
        "duration": 0.828125,
        "notes": ,
        "succeeded": true
      },
      "version": "0.1"
    }

    !ENTRY net.sf.eclipsefp.haskell.scion.client 2 2 2010-05-25 21:30:20.968
    !MESSAGE The Scion server's response has ID 14, but we expected ID 16.
    The command was:
    {
      "id": 16,
      "method": "thing-at-point",
      "params": {
        "column": 30,
        "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Main.hs",
        "line": 9
      }
    }
    The response was:
    {
      "id": 14,
      "result": {"Just": "no info"},
      "version": "0.1"
    }

    !ENTRY net.sf.eclipsefp.haskell.scion.client 2 2 2010-05-25 21:30:26.093
    !MESSAGE The Scion server's response has ID 15, but we expected ID 17.
    The command was:
    {
      "id": 17,
      "method": "thing-at-point",
      "params": {
        "column": 30,
        "file": "C:\\data\\runtime-New_configuration(2)\\ampersand\\src\\Main.hs",
        "line": 5
      }
    }
    The response was:
    {
      "id": 15,
      "result": {"Just": "no info"},
      "version": "0.1"
    }

     
  • Han Joosten
    Han Joosten
    2010-05-27

    Unfortunately, the svn server I use is not public (yet). We are currently thinking about making the project open source, but we are still discussing the licence form. However, I found another svn reposetory that hosts a Haskell project. Here is the link. That should behave the same…

     
  • JP Moresmau
    JP Moresmau
    2010-05-27

    That svn project doesn't have a Main.hs or a cabal file to test. I'll try it with a work SVN repository. I have committed a change where when we retry a command because of a timeout we keep the same sequence number, but I'm still not sure how you can get mismatch ids. Hopefully I'll release 111 soon so you have a bundled version to work with.

     
  • JP Moresmau
    JP Moresmau
    2010-05-28

    I have tested checking out an Haskell project from SVN. The Main.hs and cabal file are not overwritten. I'm of course using the latest code version.

     
  • Han Joosten
    Han Joosten
    2010-06-03

    It is well possible that I used old code, I am unsure about that. I'll wait for your release 111. then I'll let you know if that works for me. good luck and thanks in advance!

     
1 2 > >> (Page 1 of 2)