ltn12 : what is it?

As some of you will know, I have an app out there which for *some* people shows a black screen.
I can’t recreate it.

So Im going through my code now, line by line, looking for clues.

One line I found is

_G.ltn12 = require(“ltn12”)

Now, this worries me. I have no idea what this library does, or why its in the code.
And Im pretty sure I didn’t put it there.
So either its a legacy from a staggeringly early coding session where I started with something and changed it, or its been inserted by CIDER or Code Complete when I tested those.

Does anyone know what its for?

[import]uid: 108660 topic_id: 24454 reply_id: 324454[/import]

I can’t tell you specifically, but it has to do with filtering data. You can read all about it here. [import]uid: 17138 topic_id: 24454 reply_id: 98910[/import]

The only time I thought I might need that library is for networking (Lua sockets), and in the end I was able to achieve FTP read and write (my only goal in that lone case) without using “ltn12” at all! If you don’t know why that library is req’d into your code, and don’t remember adding it, then absolutely get rid of it. Atop that it’s declared as global, which could be even worse. [import]uid: 9747 topic_id: 24454 reply_id: 98913[/import]

I’ve taken it out and all seems well. Cant find any reference to it in any file.

(Global is OK, you know.
For instance, I create some sounds in the global scope so that I can use them throughout.
And the json library is useful in many places, so I don’t keep declaring it in in every lua module.)

Meanwhile, after 5 hours of brain-numbing debugging, I think I have tracked down the source of my original problem. Fingers crossed!
[import]uid: 108660 topic_id: 24454 reply_id: 98914[/import]

it’s part of Lua sockets. If you are doing http requests and not using the network.request or network.download api’s, then you will need that to actually save the results of an http request.

It by itself shouldn’t cause any problems other than making your app bigger.
[import]uid: 19626 topic_id: 24454 reply_id: 99010[/import]

Ive removed it. There were no references to it anywhere.
Odd. [import]uid: 108660 topic_id: 24454 reply_id: 99011[/import]