Minetest logo

IRC log for #minetest-dev, 2014-08-14

| Channels | #minetest-dev index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:00 * Taoki wonders why the commit rate dropped so drastically during the last weeks. Hope it's just vacation and no issues of any sort
00:01 domtron joined #minetest-dev
00:32 domtron joined #minetest-dev
00:48 Zeno` joined #minetest-dev
01:01 domtron joined #minetest-dev
02:26 domtron left #minetest-dev
02:37 Miner_48er joined #minetest-dev
03:41 jentron joined #minetest-dev
03:42 jentron left #minetest-dev
03:49 harrison joined #minetest-dev
03:50 Eater4_ joined #minetest-dev
03:52 lanxu_ joined #minetest-dev
04:57 asl joined #minetest-dev
05:18 Zeno` can somebody close or delete https://github.com/minetest/minetest/pull/1560  please?
05:21 BlockMen joined #minetest-dev
05:21 BlockMen pushing this in a few minutes https://github.com/BlockMen/minetest/commi​t/e9e9e42573a50dbf94370996d65b03dca1d5c284
05:23 Zeno` can somebody close or delete https://github.com/minetest/minetest/pull/1560  please?
05:43 Hunterz joined #minetest-dev
06:11 hmmmm joined #minetest-dev
06:25 ^v joined #minetest-dev
06:27 SmugLeaf joined #minetest-dev
07:00 NakedFury joined #minetest-dev
08:15 casimir joined #minetest-dev
08:27 nore joined #minetest-dev
09:29 nore joined #minetest-dev
09:30 alexxss joined #minetest-dev
09:38 PenguinDad joined #minetest-dev
09:45 Calinou joined #minetest-dev
09:57 proller joined #minetest-dev
10:14 Megaf joined #minetest-dev
10:22 Megaf I really do need help with this https://github.com/minetest/minetes​t/issues/1556#issuecomment-52167033
10:38 Zeno` could be a million things because of the silly try/catch macros BEGIN_DEBUG_EXCEPTION_HANDLER and END_PORTABLE_DEBUG_EXCEPTION_HANDLER
10:38 Zeno` I do notice that in httpfetch.cpp the result of new is not checked, but I doubt that is the cause
10:39 Zeno` The result of HTTPFetchOngoing *ongoing =     *
10:39 Zeno` Anyway this is a server build?
10:41 Zeno` There are about 700 possible points where the exception could be triggered
10:44 Megaf Zeno`: Yep, that’s my server
10:44 Megaf it crashes every day because of that bug
10:44 Megaf and it’s a new bug, sapier is really good in introducing new bugs
10:44 Megaf im not using redis nor leveldb
10:45 Megaf and Im using irrlicht 1.8.1
10:45 Megaf left #minetest-dev
10:47 Megaf joined #minetest-dev
10:48 Megaf also, it takes longer to compile after every git pull
10:48 Megaf not so long ago it would take only 2:50 minutes to compile minetest server here, now it takes 3:50
10:49 Zeno` in main.cpp lines 915 to 1945 are wrapped in that try/catch kludge
10:49 Zeno` so without a full backtrace it's going to be hard to track down
10:52 Zeno` could be any of those 1000+ lines or the functions they call
10:53 Megaf so I would need to compile and run in debug mode
10:54 Zeno` You can get a backtrace without debug mode (if the core is dumped)
10:54 Megaf How do I do that?
10:54 Zeno` Are there any .core files in your directories?
10:58 Zeno` core. *
10:58 Megaf nope
10:59 Zeno` yeah, probably because of the try/catch thing
10:59 Zeno` I'm not sure of the best approach here
11:07 ImQ009 joined #minetest-dev
11:09 Jordach joined #minetest-dev
11:33 NakedFury joined #minetest-dev
11:44 kahrl_ well, Megaf is gone, but what is producing "C++ exception" is LuaJIT
11:45 kahrl_ so the way to figure out what's happening is to compile with vanilla Lua
11:46 kahrl (maybe.)
11:47 kahrl at least Lua will give a different message, hopefully a more helpful one
11:47 Zeno` You sure about that?
11:48 kahrl yeah
11:48 kahrl I grepped the sources of Lua and LuaJIT
11:50 Zeno` Yeah ok, END_PORTABLE_DEBUG_EXCEPTION_HANDLER gives a message like "ERROR: An unhandled exception occurred:"
11:50 Zeno` still, over 1000 lines of code wrapped in that try/catch is... kind of crazy
11:58 nore joined #minetest-dev
11:59 kahrl well the way to make luajit not convert all messages to "C++ exception" is http://luajit.org/ext_c_api.html#mode_wrapcfunc
11:59 kahrl in fact, ScriptApiBase calls luaJIT_setmode like that
11:59 kahrl but our script_exception_wrapper only handles LuaError... why?
11:59 kahrl shouldn't it handle all C++ exceptions?
12:00 kahrl ShadowNinja: ping
12:01 Zeno` I'm not a fan of exceptions. I'd rather a crash *shrug*
12:06 kahrl hah, I remember now
12:06 kahrl http://irc.minetest.ru/minet​est-dev/2013-12-18#i_3501880
12:07 kahrl ShadowNinja: I guess change script_exception_wrapper back to the version from the example, if you think that's okay
12:08 kahrl I didn't fully understand what that code did at the time
12:14 kahrl Zeno`: the problem with just crashing is that the exception message goes to highly system specific place, if it gets logged at all
12:14 kahrl with our try-catch we can log it to debug.txt like everything else
12:14 kahrl goes to a*
12:17 Zeno` a specific case within 1000+ lines of code
12:18 kahrl ?
12:19 kahrl the exception message is supposed to tell you what happened, but in Megaf's case LuaJIT clobbered it
12:19 Zeno` in main.cpp between lines 915 to 1945 how do do tell where the exception occurred (without a backtrace)?
12:20 kahrl how would you do it without the try-catch?
12:21 Zeno` Honestly, I'd do it the C way and just not use try-catch at all
12:22 Zeno` the problem, as I see it, is that try-catch is used as a... catch-all
12:23 kahrl so you'd use error return codes?
12:23 Zeno` so there are heaps of new statements that don't even check that NULL is not returned; instead the exception system is expected to handle it
12:23 kahrl new never returns NULL, it raises std::bad_alloc
12:24 Zeno` err, yes it does
12:24 Zeno` my bad
12:25 kahrl with error return codes, there would be lots of places in minetest that don't check those and then cause a failure much later
12:27 Zeno` yes
12:28 Zeno` I guess what needs to be seen is what difference refactoring main() and run_game() would do
12:29 Zeno` To me, and maybe I'm stupid, those two functions are very... difficult
12:34 kahrl everyone requests refactoring those because it's easy; nobody refactors those because it's hard
12:36 Zeno` heh
12:38 kahrl anyway, I'm not a big fan of exceptions myself, but in most cases where minetest uses them it's useful (e.g. serialization code would be horribly cluttered otherwise)
12:55 proller joined #minetest-dev
12:59 proller joined #minetest-dev
13:05 cg72 joined #minetest-dev
13:41 VanessaE joined #minetest-dev
13:47 Amaz joined #minetest-dev
13:50 hmmmm joined #minetest-dev
13:58 Jordach joined #minetest-dev
14:10 asl joined #minetest-dev
14:14 kaeza joined #minetest-dev
14:35 Calinou joined #minetest-dev
14:50 ImQ009 joined #minetest-dev
14:55 casimir joined #minetest-dev
15:12 proller joined #minetest-dev
16:29 Hunterz joined #minetest-dev
16:43 Krock joined #minetest-dev
16:46 BlockMen joined #minetest-dev
16:58 Amaz joined #minetest-dev
17:20 khonkhortisan joined #minetest-dev
17:46 VanessaE RealBadAngel: YOur lighting changes skipped something.
17:46 VanessaE nodeboxes aren't being shaded.
17:48 kahrl I noticed that when testing earlier, but it wasn't much different from master so I didn't mention it
17:49 VanessaE maybe it's just with shaders turned off.  I'll check that in a moment
17:49 VanessaE (I'm playing without them right now)
17:49 VanessaE strike that, shaders were turned on.
17:49 * VanessaE turns them off.
17:50 Calinou no shading on nodeboxes with shaders on
17:50 VanessaE seems to lack face shading either way.
17:50 VanessaE that's a regression for sure. I know it worked before - I removed a bunch of redundant textures from Homedecor in response to it working, a while back.
17:53 Calinou if only smooth lighting worked on nodeboxes too… like in Voxelands
17:53 Megaf joined #minetest-dev
17:53 VanessaE yeah
17:53 Megaf yes
17:53 Megaf left #minetest-dev
17:54 Megaf joined #minetest-dev
17:56 Miner_48er joined #minetest-dev
17:56 rubenwardy joined #minetest-dev
18:04 Taoki joined #minetest-dev
18:08 kahrl Megaf: did you see my earlier suggestion?
18:08 Taoki joined #minetest-dev
18:08 Megaf kahrl: I think I missed it, can you please tell me again?
18:08 Megaf sorry
18:09 kahrl Megaf: can you try compiling without luajit?
18:09 kahrl and running your server with just normal lua
18:09 kahrl (if the machine can handle it)
18:09 kahrl because luajit is what changes C++ exception messages to "C++ exception"
18:13 ^v joined #minetest-dev
18:15 Megaf I see
18:15 Megaf Im not even sure if luajit can be disabled
18:15 sfan5 -DDISABLE_LUAJIT=1
18:15 sfan5 rtfm
18:15 alexxs joined #minetest-dev
18:15 sfan5 http://dev.minetest.net/CMake_Options
18:16 sfan5 I didn't spend my time to make that page so that nobody reads it
18:18 Megaf anyway, my server wont handle the load without luajit
18:19 sfan5 why not?
18:22 Krock Megaf, LuaJIT is nice and fast :)
18:23 kahrl Krock: "without", not "with"
18:23 Krock I didn't get the problem. *gets logs*
18:25 Krock Megaf, would be interested if you could rewrite it.. http://irc.minetest.ru/minet​est-dev/2014-08-13#i_3866066
18:28 kahrl Megaf: another thing to try (with luajit) is this patch: https://gist.github.com/kahrl/c81254227e11f09fd31f
18:30 Guest20054 joined #minetest-dev
18:31 sapier joined #minetest-dev
18:35 Guest20054 joined #minetest-dev
18:37 nore joined #minetest-dev
18:37 VanessaE sfan5: would you be willing to make a quick patch to the screwdriver mod?
18:37 sfan5 maybe
18:38 sapier wtf since when do some ppl define coding style without discussion and in a quite silly and incomplete way
18:38 VanessaE something at about line 59 that checks for a group, say norotate=1, that if present, causes the screwdriver to do nothing.
18:38 Megaf kahrl: I don’t have the knowledge to do it
18:38 sfan5 sapier: not my fault, that was ShadowNinja
18:38 VanessaE for nodes that have facedir but should not be rotatable by the screwdriver (e.g. anything composed of two or more nodes)
18:39 sapier silly because it defines how content of comment which noone can truly define correct but doesn't even mention multiline comments which are quite common
18:39 sfan5 anyway: --foo comments are ugly
18:39 sfan5 use -- foo
18:39 Megaf kahrl: what is your patch supposed to do?
18:39 sapier I'm gonna remove all comments ... quite easy
18:40 sfan5 lolno
18:40 sapier and that crazy 8 spaces thing again ... goddamn ShadowNinja can't you one time accept decisions beeing made without using any chance to push your personal which again
18:42 rubenwardy There is a lot of dead code in Minetest. Just search for #if 0
18:42 sfan5 dead code is something different
18:42 kahrl Megaf: it "wraps" C++ exceptions thrown inside code called by lua, so the message survives getting handed up through the lua calls
18:43 rubenwardy the_game is huge
18:43 VanessaE sfan5: reason I ask for this is because I've got a few objects in homedecor that, if first rotated with a screwdriver and then dug, will cause a crash.  I can prevent the crash easily, but these items should *never* be rotated, ever, and it would take some rather hacky, honestly nasty code to undo such rotations.
18:43 Megaf so it doesn’t avoids the crash, it only gives more information on the crash, right?
18:44 kahrl Megaf: yeah
18:44 kahrl at this point I don't even have the slightest clue where the crash could be
18:45 kahrl VanessaE: why should they never be rotated?
18:46 Calinou VanessaE, no_rotate, not norotate
18:46 VanessaE kahrl: because they consist of side-by-side, paired nodes.  think X/Z equivalent of doors.
18:46 rubenwardy 52 sections of dead code using #if 0
18:46 kahrl oh, ok
18:46 VanessaE a desk, pool table, or bed for example.
18:47 sapier can we move wiki to github? I don't wanna memorize a 4th password for minetest only
18:47 sfan5 sapier: heard of .txt files?
18:47 kahrl what if someone wants to put a bed on (below) the ceiling?
18:47 VanessaE Calinou: no_rotate = 1  seems right, yes.  sfan5 can you add a check for this? :)
18:47 sfan5 VanessaE: quite busy atm
18:47 VanessaE kahrl: then I would add the necessary code in my mod to autorotate it on place.
18:47 kahrl or in a house standing sideways
18:48 VanessaE if you tried to use a screwdriver to rotate it, you'd have to rotate both nodes AND move one of them to follow.
18:49 VanessaE sfan5: ok.
19:01 sapier http://dev.minetest.net/Lua_code_style_guidelines ok now lets discuss about them to get a version everyone can live with
19:01 sapier ShadowNinja: thanks for the work you did it's a good base for review
19:03 VanessaE sfan5: well if you feel inclined, I guess it would be:  if (ndef.groups and ndef.groups.no_rotate == 1) then return end   right after line 80 in screwdriver/init.lua
19:04 rubenwardy left #minetest-dev
19:07 sapier sfan5 did you only read or did you test it too?
19:08 sfan5 sapier: read
19:09 sapier great ... so everyone is bitching around about the unimportant things again and real problems go in undetected
19:10 sfan5 the real problem is you writing bad code
19:11 sapier well at least I do look for bugs instead of some ppl bitching around about coding style as ShadowNinja ... find that damn user deletion issue ShadowNinja it's caused by your player unload fix
19:11 sapier and don't rely on a workaround as the pull request we have
19:13 sapier I don't blame anyone for adding bugs but I get mad if someone doesn't fix the bugs she/he added
19:16 sapier any comments about renaming the "tracing" pull to accounting?
19:17 VanessaE sapier: profiling
19:17 sapier yes but is it really profiling? we don't store full function trace
19:17 VanessaE accounting would seem to suggest the same thing, to me anyway
19:18 sapier hmm
19:18 VanessaE tracing, even worse
19:18 VanessaE that suggests instruction-level :)
19:18 sapier well profile would at least result in "save_mod_profile" ... sounds better then "save_mod_bill" :-)
19:19 VanessaE haha
19:19 VanessaE I get enough bills in the post every week anyway ;)
19:20 GhostDoge joined #minetest-dev
19:26 jin_xi joined #minetest-dev
19:28 proller joined #minetest-dev
19:37 CaIinou joined #minetest-dev
19:38 sapier sfan5 nevertheless I fixed almost all your comments ... still we need to check that style guide and settle the questionable points
19:38 * sfan5 nods
19:39 Jordach you'll have a field day with BFD ;3
19:39 harrison joined #minetest-dev
19:39 Amaz joined #minetest-dev
19:40 sapier As I said I agree to most of those rules but I don't like unspecific rules which don't actually specify anything ... same things are in c++ guidelines too but not as rule but as suggestion ... that's where they belong (imho of course)
19:41 sapier does anyone know a tool to create doc from luadoc comments?
19:42 sapier hmm examples on luadoc page result in 404 ... not very trustworthy ;-)
19:42 sfan5 direct any rants to ShadowNinja please :)
19:43 sapier well shadow is hiding for weeks now ;-P
19:44 BlockMen left #minetest-dev
19:45 kahrl wasn't he here this week? I remember him asking me something
19:50 Miner_48er sapier https://github.com/keplerproject/lua​doc/blob/master/doc/us/examples.html
19:50 Miner_48er http://keplerproject.github.io/​luadoc/examples/lfs/lfs.luadoc
19:53 sapier Miner_48er: where's the doc? I just see 404 on the example links provided there
19:55 kahrl last release 2008?
19:56 kahrl looks either unmaintained or very mature
19:57 sapier it ain't marture
19:57 sapier eclipse uses luadoc for it's outline in lua plugin and there it's in quite early development state
20:01 sapier for mobf I use lua2dox ... a lua to doxygen converter ... better then luadoc but stil beta
20:31 Miner_48er joined #minetest-dev
20:51 ImQ009 joined #minetest-dev
20:58 kaeza joined #minetest-dev
21:18 cg72 joined #minetest-dev
22:23 RealBadAngel VanessaE, i will check the nodeboxes tommorow
22:24 RealBadAngel but if it is not working with them it can mean only one thing, that normal vectors for nodeboxes are screwed
22:25 RealBadAngel only condition when shading are normal to the vertex
22:25 RealBadAngel sorry, and being a lightsource -> shading off
22:29 RealBadAngel kahrl, here?
22:31 RealBadAngel anyway, for the record, you were wrong bout need to have finalColorBlend reimplemented in shaders
22:31 RealBadAngel when day/night ratio changes vertex colors are refreshed in mapblockMesh::animate
22:32 RealBadAngel shaders just need current vc, nothing more
22:32 RealBadAngel even more, theres absolutely no need for vertex shader to calculate it again each render step
22:33 RealBadAngel so im going to remove that code from shaders
22:34 RealBadAngel (tested/works)
22:35 RealBadAngel but on the second hand, theres another option
22:36 RealBadAngel started to type but then thought "no"
22:36 RealBadAngel GPU time is way more precious than CPU
22:37 RealBadAngel especially when multiple rendering passes are about to happen
23:01 yummy_ginger joined #minetest-dev
23:03 yummy_ginger joined #minetest-dev
23:16 dumdidum joined #minetest-dev
23:16 dumdidum left #minetest-dev

| Channels | #minetest-dev index | Today | | Google Search | Plaintext