Comments (6)
Segfaults for me in every constellation....
I tried to debug it with gdb and got the following; segfaults and combinations are at line 24 following.
At least the version with the single user or session number, wrapped in a table, should work, or do i call wrongly?
client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", {u}
client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", {s}
mumble = require("mumble") -- get the mumble API
local host = "localhost"
local port = 64738
local cert = "bot.pem"
local key = "bot.key"
print("connecting to "..host.." on port "..port.." (cert: "..cert.."; key: "..key..")")
local client = assert(mumble.connect(host, port, cert, key))
client:auth("test")
print(" connect and bind: OK")
client:hook("OnServerSync", function(event)
print("Sync done; server greeted with: ", event.welcome_text)
print("send plugin message to all users ")
users = client:getUsers()
i=0
for s,u in pairs(users) do
i=i+1
print(" "..i.." ("..s.."): "..u:getName())
-- client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", s) -- segfault at at mumble.c:375 / client.c:105
-- client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", {s}) --segfault at client.c:120
-- client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", u) --segfault at at mumble.c:375 / client.c:105
-- client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", {u}) -- segfault at at client.c:117
end
--segfault client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", client:getUsers())
print("send ok")
end)
mumble.loop()
from lua-mumble.
There is something wrong with your build. For some reason it's crashing on lines that are erroring, such as.
-- client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", s) -- segfault at at mumble.c:375 / client.c:105
and
-- client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", u) --segfault at at mumble.c:375 / client.c:105
It's crashing in the error handler.. When you compile the module are you getting any warnings about a definition of luaL_traceback
?
Anyway, I think I fixed the issue in 14b3724 with the other valid lines, mainly..
-- client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", {s}) --segfault at client.c:120
and
-- client:sendPluginData("FGCOM:UPD_LOC", "CALLSIGN=test", {u}) -- segfault at at client.c:117
from lua-mumble.
Hi, no, i got no warnings. Compile was fine, like it is now (see below).
I just pulled to 14b3724 and recompiled using make clean; make debug
, got no errors again.
Now the segfault is gone
You can also check with a very simple bot that justs checks for incoming messages and prints if so:
-- Sample Bot to check for incoming plugin messages
mumble = require("mumble") -- get the mumble API
local host = "localhost"
local port = 64738
local cert = "bot.pem"
local key = "bot.key"
print("connecting to "..host.." on port "..port.." (cert: "..cert.."; key: "..key..")")
local client = assert(mumble.connect(host, port, cert, key))
client:auth("test-rcv")
print(" connect and bind: OK")
client:hook("OnPluginData", function(event)
--["sender"] = mumble.user sender, -- Who sent this data packet
--["id"] = Number id, -- The data ID of this packet
--["data"] = String data, -- The data sent (can be binary data)
--["receivers"] = { -- A table of who is receiving this data
-- [1] = mumble.user,
--},
print("DATA INCOMING FROM="..event.sender:getSession())
end)
mumble.loop()
However no message is printed, ever, from the bot sending stuff.
mumble client plugin messages are printed however, so the infrastructure basicly works, there is just something still wroing with the sending part...
Compile for current commit:
beni@segin:~/Dokumente/FGFS/work/lua-mumble$ make clean;make debug
rm *.o *.so proto/*.o proto/*.c proto/*.h
protoc-c --c_out=. proto/Mumble.proto
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o proto/Mumble.o proto/Mumble.pb-c.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o decoder.o decoder.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o user.o user.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o packet.o packet.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o channel.o channel.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o stb_vorbis.o stb_vorbis.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o client.o client.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o target.o target.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o encoder.o encoder.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o audio.o audio.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o mumble.o mumble.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o util.o util.c
cc -c -I/usr/include/luajit-2.1 -I/usr/include/opus -fPIC -I. -DDEBUG -g -o timer.o timer.c
cc -shared -fPIC -I. -DDEBUG -g -o mumble.so proto/Mumble.o decoder.o user.o packet.o channel.o stb_vorbis.o client.o target.o encoder.o audio.o mumble.o util.o timer.o -lssl -lluajit-5.1 -lprotobuf-c -lopus -lev
beni@segin:~/Dokumente/FGFS/work/lua-mumble$
from lua-mumble.
Hmm, I don't really have any way to test this plugin system stuff since it requires mumble 1.4.0 and my server is on 1.3.1. It should be sending it, and I don't see a reason why it wouldn't be..
Nevermind, I think I know why! Will have a fix shortly!
from lua-mumble.
That last commit did the trick!
Its working!!!!!
Thank you very much for your efforts!!!!
from lua-mumble.
Nice. :) Glad it works.
from lua-mumble.
Related Issues (20)
- client.me object absent
- Compilation error from duplicate packet_handler definitions HOT 6
- Private message event HOT 1
- Question: How to capture incoming audio stream? HOT 20
- timer.c realloc(): invalid next size HOT 41
- hook onUserChannel() not called? HOT 2
- Add sample speed informatin to OnUserSpeak() hook HOT 10
- uninitialized error variable in client_play() HOT 3
- client_isPlaying channel taken from incorrect argument
- Played samples not audible after some time (client:transmit) HOT 13
- client:play() arguments? HOT 3
- Hook:OnMessage HOT 5
- sendPluginData with list broken? `bad argument #3 to 'sendPluginData' (mumble.user expected, got table)` HOT 25
- How to compile? HOT 19
- Stuttery Audio playback HOT 9
- Timer counter HOT 1
- Crash in timer.lua example script HOT 7
- Typo in README.md (mumble.user:isMuted()) and non-working mumble.user:isSelfMute() HOT 2
- Add plugin packets HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-mumble.