[ZeroBrane Studio] Re: Getting basics working

  • From: Tim Channon <tc@xxxxxxxx>
  • To: zerobrane@xxxxxxxxxxxxx
  • Date: Fri, 19 Sep 2014 03:50:04 +0100

Afraid not, still get exception..

Lua source, all of it, is completely standard.
luasocket has been called many times today as part of other things.

Head scratching time.

Is the OS bright enough to not share the luasocket dll?

Here is something strange. I had manually put path.lua in a file user.lua When I open user.lua with the ide is offers a new file, not the existing one in /cfg However, if I comment out path.lua in the /cfg file it uses the ide local copy of lua, ie. it must be seeing the file.

Turning to system stuff, process monitor reveals a nutty as a fruit cake situation. It is normal for Lua to make a meal of trying to locate libraries, this though has me amused. Seems to culminate in something finding a copy of lualib51.dll

Somehow this is tangled with a lot of socket file activity. A conflict looks likely.

Okay, so what? Well, I didn't know there is a copy with gnuplot binaries. Yes it is installed. I have no idea what is going on.

Tim


On 19/09/2014 01:00, Paul K wrote:
The system Lua here which is binary incompatible is completely reliable. Using 
it seems to need remote debug via TCP/IP.

If you can load luasocket or provide your own interface that mimics
the API luasocket provides, you should be fine.

Adding this to a script
require('mobdebug').start
Producing Compilation error on line 2:

You should be using "require('mobdebug').start()" if you are running
on the same machine and
"require('mobdebug').start('ip.address.of.computer-with-ZBS')" if you
are running on a different one. There shouldn't be any compilation
errors.

And "The instruction at 0x66d8171d referenced memory at 0x00000061. The memory could 
not be read."

I'm not sure what may be causing this in your case, but it could be
related to the incorrect ".start" reference (as it should be a
function call).

If you still get an error when you change it to a function call, try
to replace it with something simpler, for example, "require'socket'"
to see if it works. If it does, try to then open that socket to
connect to localhost:8172. I expect mobdebug to work if you can get
luasocket connection to work in your environment.

Paul.




Other related posts: