Penlight Library breaks Glider Debugger

We would like to use the Lua penlight library (http://stevedonovan.github.io/Penlight/api/index.html) which works well in the simulator and on device, BUT breaks the LuaGlider debugger.

If we set a breakpoint and run the debugger we get an error like:

Runtime error: …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:226: Encoding of function: 0x10f80dc10 unsupported

stack traceback:

    [C]: ?

    [C]: in function ‘error’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:226: in function ‘WriteError’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:235: in function ‘WriteFunction’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:154: in function ‘Write’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:219: in function ‘WriteTable’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:152: in function ‘Write’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:219: in function ‘WriteTable’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:152: in function ‘Write’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:219: in function ‘WriteTable’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:152: in function ‘Write’

    …

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:219: in function ‘WriteTable’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:152: in function ‘Write’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:219: in function ‘WriteTable’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:152: in function ‘Write’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:524: in function ‘encode’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:545: in function ‘sendObject’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:955: in function ‘writeVariableDump’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:1008: in function ‘p’

    …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:1340: in function <…trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:1244>

    …ctBuilds/trunk(Builds)/trunk(default)/trunk/main.lua:100: in main chunk

The above function code 0x10f80dc10 is not in _G - so we have no idea which function is unsupported

The pl library is using “forbidden” lua functions like loadstring etc. but we are quite sure, we are not using them (the code works fine in Simulator) and we commented them out.  We do not require the complete library, only modules we need.

Does anybody use the penlight library with the debugger working or as any hints what to do ?

kind regards,

Sven

@Sven,

Please download the 1.9.1 update (via help-> check for updates) and let us know if it fixes the issue. If not then please point us to an example so we can replicate this problem.

Regards,

M.Y. developers

great ! debugger works again - thanks fpr the quick response :slight_smile:

Hello Sven,

Great! If possible please do send us an example or two so we can add it to our unit tests. This way we won’t break anything for you in a future release. 

Regards,

M.Y. Developers

Hello Sven,

Just testing out penlight and it seems to be working great with the Glider autocomplete, it is nice that the library source code already has the luadoc comments in it. Please let us know of any autocompletion oddities that you come across.

Regards,

M.Y. Developers

There are no specific examples; all we (I’m a colleague of Sven) had to do to provoke the error was require Penlight…

pl = require "pl.import\_into"()

…and then place a breakpoint anywhere in our code - even without actually using any Penlight functionality.

HTH,

Martin

Hello Martin,

Thanks for the use case. Please let us know if you run into any other issue.

Regards,

M.Y. Developers

@Sven,

Please download the 1.9.1 update (via help-> check for updates) and let us know if it fixes the issue. If not then please point us to an example so we can replicate this problem.

Regards,

M.Y. developers

great ! debugger works again - thanks fpr the quick response :slight_smile:

Hello Sven,

Great! If possible please do send us an example or two so we can add it to our unit tests. This way we won’t break anything for you in a future release. 

Regards,

M.Y. Developers

Hello Sven,

Just testing out penlight and it seems to be working great with the Glider autocomplete, it is nice that the library source code already has the luadoc comments in it. Please let us know of any autocompletion oddities that you come across.

Regards,

M.Y. Developers

There are no specific examples; all we (I’m a colleague of Sven) had to do to provoke the error was require Penlight…

pl = require "pl.import\_into"()

…and then place a breakpoint anywhere in our code - even without actually using any Penlight functionality.

HTH,

Martin

Hello Martin,

Thanks for the use case. Please let us know if you run into any other issue.

Regards,

M.Y. Developers

hello mfindert,

module ‘pl.import_into’ not found:resource (pl.import_into.lu) does not exist in archive

no field package.preload[‘pl.import_into’]

no file ‘/Users/Application Support/Corona/Simulator/Plugins/pl/import_into.lua’

no file ‘/Users/Application Support/luaglider2/dev/ProjectBuilds/…/pl/import_into.lua’

no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/pl/import_into.lua’

no file ‘/Users/Application Support/Corona/Simulator/Plugins/pl/import_into.dylib’

no file ‘./pl/import_into.dylib’

no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/pl/import_into.dylib’

no file ‘/Users/Application Support/Corona/Simulator/Plugins/pl.dylib’

no file ‘./pl.dylib’

no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/pl.dylib’

message

  1.  .apk file installed then open app then error on run time.:

Runtime error: …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:226: 

 

  1.   the warning itself states “press the hammer when building for devices”. so instead of running play (the triangle) you press the hammer with the cleaning brush and then perform the build. In doing so the debugger library won’t be included in the build…

hello mfindert,

module ‘pl.import_into’ not found:resource (pl.import_into.lu) does not exist in archive

no field package.preload[‘pl.import_into’]

no file ‘/Users/Application Support/Corona/Simulator/Plugins/pl/import_into.lua’

no file ‘/Users/Application Support/luaglider2/dev/ProjectBuilds/…/pl/import_into.lua’

no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/pl/import_into.lua’

no file ‘/Users/Application Support/Corona/Simulator/Plugins/pl/import_into.dylib’

no file ‘./pl/import_into.dylib’

no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/pl/import_into.dylib’

no file ‘/Users/Application Support/Corona/Simulator/Plugins/pl.dylib’

no file ‘./pl.dylib’

no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/pl.dylib’

message

  1.  .apk file installed then open app then error on run time.:

Runtime error: …trunk(Builds)/trunk(default)/trunk/CiderDebugger.lua:226: 

 

  1.   the warning itself states “press the hammer when building for devices”. so instead of running play (the triangle) you press the hammer with the cleaning brush and then perform the build. In doing so the debugger library won’t be included in the build…