Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Run -> Run as -> Launch in LSL Sim #37

Closed
Corysia opened this issue Nov 11, 2016 · 17 comments
Closed

Cannot Run -> Run as -> Launch in LSL Sim #37

Corysia opened this issue Nov 11, 2016 · 17 comments
Labels
Milestone

Comments

@Corysia
Copy link

Corysia commented Nov 11, 2016

It's possible I'm doing something wrong, but I keep getting an error when trying to run/debug an LSL script. I'm choosing Run -> Run as -> Launch in LSL Sim

An internal error occurred during: "Launching Example".
Could not initialize class lslforge.debug.LSLSimInteractor$ContinueCommand

The simple script is:

integer foo()
{
return 1;
}

default
{
state_entry()
{
llSay(0, "testing");
integer value = foo();
}
}

@raysilent
Copy link
Owner

The same will be under Windows.
The priority is in supporting editing ("compiling") features, I don't think we are capable to go beyond that.

@raysilent raysilent changed the title Cannot execute LSL (Mac) Cannot Run -> Run as -> Launch in LSL Sim Nov 11, 2016
@Corysia
Copy link
Author

Corysia commented Nov 11, 2016

Are you saying that LSLForge has dropped support for executing and debugging LSL Scripts? Or is this just an issue for 0.1.9? The functionality was there in 0.1.2. I'd verify it was still there in 0.1.6 if I could get that to install, but it doesn't seem to want to.

https://sapphovix.wordpress.com/2012/10/03/the-simplest-lsl-script-example/

@raysilent
Copy link
Owner

It might be a bug then, thank you for any additional info

@Corysia
Copy link
Author

Corysia commented Nov 11, 2016

I'm pretty sure it is, since I used to use LSPlus and LSLForge. ;)

But, if you look at the original project page, it reads:

LSLForge

LSLForge is a fork of the popular LSLPlus editing evironment, to provide Linden Scripting Language (LSL) support in Eclipse.

Description

LSLForge is a plugin for the Eclipse platform. The plugin allows editing, "compiling" (gathering code included in modules), executing, and unit testing your Second Life® Linden Scripting Language (LSL) code.

https://code.google.com/archive/p/lslforge/

As it's been quite some time since I used these, I went looking for a page that showed an example of editing and debugging, which is where I found that wordpress article. You'll notice it refers to creating a file with Select File -> New ->New LSLForgeScript which doesn't appear to be an option in 0.1.9. Perhaps this is a problem with Neon or the beginning of the path for tracking down the problem. This prevents the template .lsl and .lslp files from being created. Also, there's no way to create the .simp file, which is needed for debugging.

@raysilent
Copy link
Owner

raysilent commented Nov 11, 2016

Confirming that the feature worked till 0.1.8
So it was introduced somewhere between 0.1.8 and 0.1.9

@raysilent
Copy link
Owner

@Corysia please test it out using https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.1/eclipse/ as a source for plugin

@raysilent raysilent added this to the 0.1.9.1 milestone Nov 13, 2016
@Corysia
Copy link
Author

Corysia commented Nov 13, 2016

I can create a configuration now. Both a LSL Simulator environment and a Unit test environment. But when I try to run it, I get a Java NullPointerException. There's not a lot of debugging info that I can see.

An internal error occurred during: "Launching Test Config".
java.lang.NullPointerException

If there's a debug log with a stacktrace, I'm not sure where to look.

@raysilent
Copy link
Owner

@Corysia it would help if you tried https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.1/eclipse/archive/0.1.6 with a fresh eclipse copy

If it doesn't work may be try 0.1.5 etc. untill you find infected configuration.

Then may be you can create a project with the basic files so it could be easity reproduced.
Thank you for your help.

@Corysia
Copy link
Author

Corysia commented Nov 14, 2016

@raysilent it looks like 0.1.6 works more like it is supposed to. I think I've uncovered two separate bugs. One, the Project support isn't creating the lsl and lslp files (see below) and two, the LSL doesn't want to run.

Setup

  1. Install Eclipse Neon -- I chose C++ since I do all my Java work in IntelliJ IDEA
  2. In Eclipse, Help -> Install New Software... and used the url https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.1/eclipse/archive/0.1.6 as you suggested.

Creating the LSL Project
In Eclipse:

  1. File -> New -> Other
  2. Select LSLForge Project -> Next
  3. Give it a name: Example
  4. Click Finish

Create a file for the project

  1. File -> New LSLForge Script This option doesn't appear in 0.1.9.1 and should.
  2. Select the Example directory
  3. Enter a name for the script without the suffix. E.g., Example
  4. NoticeExample.lsl and Example.lslp are created. This does not happen in 0.1.9.1 and should.

Example.lsl will contain the following boilerplate
default { state_entry() { llOwnerSay("Hello Scripter"); } }

Create a Run configuration so you can execute your LSL

  1. Run -> Run Configurations...
  2. Right-click Run LSL Simulator and choose New
  3. Give it a name such as LSL Emulator
  4. Select Apply
  5. Select Run

At this point, your LSL should execute and print out "Hello Scripter". But instead, in both 0.1.9.1 and 0.1.6, I'm getting a Java NPE. This makes me think this NPE is a Neon thing, so I will have to try with an older version of Eclipse.

At this point, I do not have a working version of LSLForge running on a Mac (or any other OS), however a friend of mine does. I will find out from him what version of Eclipse he is using and try the same steps above against that and let you know if it executes like it should.

@raysilent
Copy link
Owner

I cannot reproduce "Example.lslp - Example.lsl" pair bug. The plugin may require full Java installation though. May be you can try eclipse-java instead?

@Corysia
Copy link
Author

Corysia commented Nov 14, 2016

You can't reproduce it? Meaning that you do get both "Example.lsl" and "Example.lslp" created? That's what is supposed to happen, but it doesn't happen with me with Neon and 0.1.9.1. It works as it should with Neon and 0.1.6, meaning that the files are created. I've updated my previous comment to be clearer.

My friend runs Luna 4.4.2 and 0.1.6, which he installed some time ago. I just tried it and it's not behaving right, either, acting more like what I've seen with 0.1.9.1. I will try the Java version next.

@raysilent
Copy link
Owner

Yes I do get 2 files, Example.lsl has this:

// Example.lslp 
// 2016-11-13 18:55:57 - LSLForge (0.1.9.1) generated


default {

    state_entry() {
    llOwnerSay("Hello Scripter");
  }
}

@raysilent
Copy link
Owner

raysilent commented Nov 14, 2016

The second issue is reproducable though. I get

An internal error occurred during: "Launching New_configuration (1)".
java.lang.NullPointerException

and according to logs that's what happens:

!ENTRY org.eclipse.core.jobs 4 2 2016-11-13 18:59:36.128
!MESSAGE An internal error occurred during: "Launching New_configuration (1)".
!STACK 0
java.lang.NullPointerException
    at lslforge.launching.SimLaunchDelegate.launch(SimLaunchDelegate.java:48)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Also creating New Sim Project files produces a window with the following:

Cannot construct lslforge.sim.SimProject$WorldNode as it does not have a no-args constructor
---- Debugging information ----
message             : Cannot construct lslforge.sim.SimProject$WorldNode as it does not have a no-args constructor
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Cannot construct lslforge.sim.SimProject$WorldNode as it does not have a no-args constructor
class               : lslforge.sim.SimProject$WorldNode
required-type       : lslforge.sim.SimProject$WorldNode
path                : /worldNode
-------------------------------

@raysilent
Copy link
Owner

raysilent commented Nov 14, 2016

I'm locally updating xstream to 1.4.9 version and it seems resolving at least visible to me NullPointerExceptions.

Now xstream seems to require other jars, and adding "xmlpull" is giving a more success.

@raysilent
Copy link
Owner

@Corysia test it out please (with a clean install)

@Corysia
Copy link
Author

Corysia commented Nov 14, 2016

@raysilent I pulled the latest from https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.1/eclipse with Neon (Java) after cleaning my install. The error for the New Sim Project file is gone and I can execute a simple "Hello World" script! I can even set a breakpoint and it'll pause when debugging.

I'm able to insert Objects in to the Sim Project, and assign a script to it. It seems to me, all the basic stuff is working! =)

@raysilent
Copy link
Owner

raysilent commented Nov 14, 2016

Awesome! I'll close the issue then. We can always create a new one with new details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants