Review Request 117878: Implements a luajit backend for Cantor
Filipe Saraiva
filipe at kde.org
Sat May 3 01:37:44 UTC 2014
> On April 30, 2014, 1:46 a.m., Filipe Saraiva wrote:
> > More a question Lucas, maybe you missed a FindLuaJIT.cmake file in this patch.
>
> Lucas Hermann Negri wrote:
> The new patch adds the missing FindLuaJIT.cmake, the binary file and also fixes an issue with the string encoding that I missed on the last patch.
>
> Filipe Saraiva wrote:
> Hi Lucas,
>
> There is a small error in FindLuaJIT.cmake. You must to change the line 5, see below:
>
> -FIND_PATH (LUAJIT_INCLUDE_DIR lua.h ${LUA_INCLUDE_DIRS} )
> +FIND_PATH (LUAJIT_INCLUDE_DIR lua.h ${LUAJIT_INCLUDE_DIRS} )
>
> I am getting an error, Cantor is crashing when I select Lua backend. The KCrash stack message is:
>
> Application: Cantor (cantor), signal: Aborted
> Using host libthread_db library "/lib64/libthread_db.so.1".
> gobject.pyc: gdb was not built with custom backtrace support, disabling.
> [KCrash Handler]
> #5 0x00007fbd653f5d39 in raise () from /lib64/libc.so.6
> #6 0x00007fbd653f7368 in abort () from /lib64/libc.so.6
> #7 0x00007fbd65cee6b5 in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6
> #8 0x00007fbd65cec826 in __cxxabiv1::__terminate(void (*)()) () from /lib64/libstdc++.so.6
> #9 0x00007fbd65cec853 in std::terminate() () from /lib64/libstdc++.so.6
> #10 0x00007fbd65cecac6 in __cxa_rethrow () from /lib64/libstdc++.so.6
> #11 0x00007fbd668c0ce6 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
> #12 0x00007fbd668c5bdb in QCoreApplication::exec() () from /lib64/libQtCore.so.4
> #13 0x000000000040a50f in main (argc=1, argv=0x7fffbda6a2d8) at /home/kdevil/kdesrc/kdeedu/cantor/src/main.cpp:89
>
> The terminal output is in http://paste.kde.org/pscsa03im Maybe lines 142 -- 146 can say something.
>
> Lucas Hermann Negri wrote:
> Thanks for your review. I've fixed the .cmake. I could not reproduce the crash. Can you generate a more detailed backtrace? I suspect that there is an exception being thrown on LuaSession::login(), but I'm not sure why.
>
> Thanks.
>
> Filipe Saraiva wrote:
> Hi Lucas, I identified where is the problem.
>
> luassesion.cpp - line 42:
>
> luaL_loadstring(m_L, "function print(...) local t={}; for i = 1, select('#',...) do; local a=select(i,...); t[i]=tostring(a); end; table.insert(__cantor, table.concat(t,'\t')) end"); lua_call(m_L, 0, 0);
>
> I wrote a kDebug() message before and after the lua_call(m_L, 0, 0); - only the kDebug() message before the lua_call worked. Then I commented this line, compiled the Cantor and I can run Lua backend without crash.
>
> Maybe does luaL_loadstring have anything strange to my system?
>
Nice, Patch 3 fixed the problem. Now I will verify your code.
I talked with Alex Rieder and he is reviewing in your code too.
- Filipe
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117878/#review56942
-----------------------------------------------------------
On May 3, 2014, 12:55 a.m., Lucas Hermann Negri wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117878/
> -----------------------------------------------------------
>
> (Updated May 3, 2014, 12:55 a.m.)
>
>
> Review request for KDE Edu, Alexander Rieder and Filipe Saraiva.
>
>
> Repository: cantor
>
>
> Description
> -------
>
> Implements a luajit backend for Cantor. Implements highlighting, completion, and other features (variable explorer is missing).
>
> Is compatible with Lua science/math libraries like numlua[1] and lna[2].
>
> [1]: https://github.com/carvalho/numlua
> [2]: https://bitbucket.org/lucashnegri/lna
>
>
> Diffs
> -----
>
> cmake/FindLuaJIT.cmake PRE-CREATION
> icons/hi48-app-luabackend.png PRE-CREATION
> src/backends/CMakeLists.txt e89d9e6
> src/backends/lua/CMakeLists.txt PRE-CREATION
> src/backends/lua/luabackend.cpp PRE-CREATION
> src/backends/lua/luabackend.desktop PRE-CREATION
> src/backends/lua/luabackend.h PRE-CREATION
> src/backends/lua/luabackend.kcfg PRE-CREATION
> src/backends/lua/luacompletionobject.h PRE-CREATION
> src/backends/lua/luacompletionobject.cpp PRE-CREATION
> src/backends/lua/luaexpression.h PRE-CREATION
> src/backends/lua/luaexpression.cpp PRE-CREATION
> src/backends/lua/luaextensions.h PRE-CREATION
> src/backends/lua/luaextensions.cpp PRE-CREATION
> src/backends/lua/luahelper.h PRE-CREATION
> src/backends/lua/luahelper.cpp PRE-CREATION
> src/backends/lua/luahighlighter.h PRE-CREATION
> src/backends/lua/luahighlighter.cpp PRE-CREATION
> src/backends/lua/luasession.h PRE-CREATION
> src/backends/lua/luasession.cpp PRE-CREATION
> src/backends/lua/settings.kcfgc PRE-CREATION
> src/backends/lua/settings.ui PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/117878/diff/
>
>
> Testing
> -------
>
> Basic testing performed manually. Everything seems to work as expected.
>
>
> Thanks,
>
> Lucas Hermann Negri
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20140503/bac39722/attachment.html>
More information about the kde-edu
mailing list