Minetest logo

IRC log for #minetest-dev, 2013-08-19

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

All times shown according to UTC.

Time Nick Message
00:30 diemartin joined #minetest-dev
00:51 kaeza joined #minetest-dev
02:55 ch98 joined #minetest-dev
03:29 khonkhortisan joined #minetest-dev
04:13 aoper joined #minetest-dev
04:24 khonkhortisan joined #minetest-dev
04:39 nolan_ joined #minetest-dev
04:52 Miner_48er joined #minetest-dev
04:53 neko259 joined #minetest-dev
05:37 khonkhortisan joined #minetest-dev
05:40 ch98 joined #minetest-dev
06:17 darkrose joined #minetest-dev
06:17 darkrose joined #minetest-dev
06:21 n4x joined #minetest-dev
06:37 Ritchie joined #minetest-dev
06:54 proller joined #minetest-dev
07:17 diemartin joined #minetest-dev
07:33 proller joined #minetest-dev
07:50 Calinou joined #minetest-dev
08:21 psedlak joined #minetest-dev
08:33 kaeza joined #minetest-dev
08:46 Calinou joined #minetest-dev
09:05 darkrose joined #minetest-dev
09:38 proller joined #minetest-dev
10:07 BlockMen joined #minetest-dev
10:18 nyuszika7h joined #minetest-dev
10:19 kahrl I'll just leave this here because I've gotta go
10:20 kahrl https://github.com/kahrl/minetest/commit/05cd13312d2c480d3c9fa50cf8a61255d2596d1f <-- fixes several problems related (or unrelated) to formspec focus
10:21 kahrl - focus is no longer reset when formspec fields are submitted (e.g. when clicking some item in some list in the main menu)
10:21 kahrl - notably scrolling lists with the wheel works again
10:22 kahrl - scrolls the hovered gui element instead of the focused one when using the mouse wheel
10:23 celeron55 what kind of sc
10:23 kahrl - some random improvements to the world configuration screen, e.g. don't try to put two colors when a mod is both a game mod and a modpack
10:23 celeron55 *sorcery is this
10:23 kahrl not even black magic this time :P
10:24 kahrl well I guess it could be called that
10:24 kahrl the event receiver in main.cpp checks if there is any modal menu active and calls its preprocessEvent method
10:25 celeron55 it looks like you hijack input events and handle them by yourself 8)
10:25 kahrl only sane (?) way to do it
10:25 celeron55 we need to get the irrlicht people look at this some day, they'll expolode
10:25 celeron55 -o
10:28 celeron55 it looks good enough to me
10:58 Calinou joined #minetest-dev
11:02 Jordach joined #minetest-dev
11:03 psedlak_ joined #minetest-dev
12:10 psedlak__ joined #minetest-dev
12:23 kahrl fix for minetest_game mods not appearing in the world config dialog: https://github.com/kahrl/minetest/commit/0ecc443c3d870e00b831e39783c3c47a4ee3142e
12:24 sfan5 they aren't supposed to appear there, are they?
12:24 kahrl they are if you uncheck the "hide game" checkbox
12:26 kahrl it didn't work before because the code checked in games/<gameid> which is games/minetest
12:26 sfan5 commit seems fine
12:56 kahrl Allow SIGINT to kill mainmenu again: https://github.com/kahrl/minetest/commit/594d5d74dfb04d09ea83b7176ca051efb2e83b65
13:13 PilzAdam joined #minetest-dev
13:22 Weedy_lappy joined #minetest-dev
13:22 Weedy_lappy joined #minetest-dev
13:28 ironzorg joined #minetest-dev
13:31 darkrose joined #minetest-dev
13:31 darkrose joined #minetest-dev
13:36 psedlak joined #minetest-dev
13:42 PilzAdam kahrl, all these commits work fine
13:42 PilzAdam feel free to push them
13:50 kahrl PilzAdam: should I squash them?
13:50 PilzAdam no
13:51 PilzAdam they all have a reasonable size and content
13:54 PilzAdam 2 things left: https://github.com/minetest/minetest/issues/814 :-)
13:54 PilzAdam Ill merge https://github.com/minetest/minetest/pull/877, its needed for mingw too
13:55 kahrl sure
13:56 kahrl is the original code there actually invalid C++ or this just windows being stupid?
13:58 PilzAdam dunno
14:01 Neological joined #minetest-dev
14:05 psedlak_ joined #minetest-dev
14:35 Calinou joined #minetest-dev
14:49 NakedFury joined #minetest-dev
14:56 hmmmm joined #minetest-dev
15:01 rubenwardy joined #minetest-dev
15:03 Weedy joined #minetest-dev
15:03 Weedy joined #minetest-dev
15:32 ch98 joined #minetest-dev
15:41 sapier joined #minetest-dev
15:41 sapier https://github.com/minetest/minetest/commit/8548bb75b66f871d1b6941ca9b79012e88274799 ??? Focus fixes??
15:43 kahrl sapier: iirc I had to fix the color thing to actually be able to test some focus stuff with the world configuration dialog
15:44 AllegedlyDead joined #minetest-dev
15:45 sapier maybe I'm blind but I don't see any color fix?
15:46 kahrl before that commit, when you have a game mod that was also a modpack it was displayed as a blue "#0000DD    ..."
15:46 kahrl had*
15:46 sapier is it reasonable for a gamemod to be a modpack too?
15:47 kahrl I also removed the checkbox to enable/disable a game mod because it was useless
15:47 kahrl sure
15:48 sapier wasn't there a one fix per commit policy once?
15:48 ShadowNinja I need the ability to enable nested mods. Currently I can't enable modpacks from the menu because it enables the modpack name(Which is invalid) instead of all of the mods in the modpack.
15:48 kahrl sapier: tell that to omnicleanup
15:48 sapier I'm not talking about things that depend on each other kahrl
15:48 sapier those will be special of course
15:49 sapier it's lua shadow so you can have a look at it and fix it too shadow ;-)
15:49 kahrl well I'm not aware of such a policy
15:49 kahrl but of course it's nice to do it anyway
15:49 sapier and comments about what's included too would be nice too ;-P
15:51 sapier https://github.com/minetest/minetest/commit/ade70fe4b92202065c17d04f21415848b2c6d419 did anyone try this out?
15:51 kahrl http://irc.minetest.ru/minetest-dev/2013-08-19#i_3272417
15:51 sapier especialy the l_mainmenu.cpp changes?
15:51 kahrl it's too late to change the commit message
15:52 kahrl yeah
15:53 sapier I hope this is going to work without crash closing menu was done  this way on purpose
15:54 sapier btw using a unprotected variable from different threads is very bad style even if it's most likely no issue in this cas
15:54 sapier e
15:54 kahrl different threads?
15:55 sapier I guess kill passed to GUIEngine will not be set from it's own thread
15:56 kahrl what thread is there other than main
15:57 sapier I hope none otherwise my assumption "it's no issue" will be false
15:57 kahrl hope is a bad thing in concurrent programming :P
16:03 kahrl sapier: do you happen to know what broke the "Rename modpack" feature of the modmgr?
16:03 kahrl it seems the modlist is nil
16:03 sapier ok quitMenu is called implicite when exiting run loop so this is was redundant hmm no actually I wonder why this didn't crash?
16:03 kahrl should it be global_mods?
16:04 kahrl I stumbled over quitMenu too
16:04 sapier maybe the path fixes?
16:04 sapier oh it doesn't crash because it's just quit not deleted ... no idea what's difference
16:05 jeremytoo joined #minetest-dev
16:05 sapier btw kahrl did you read my comment about os.clock()?
16:05 kahrl quitMenu is a delete, or did something else grab another reference?
16:06 sapier no opposit delete isn't same as quit
16:06 kahrl I read the os.clock comments but wasn't sure what they were about
16:06 sapier drop isn't delete too .. just decrement use count
16:06 kahrl well yeah
16:06 sapier os.clock() was suggested as timesource for profiling
16:07 sapier but it's accuracy is 10ms only so it's not very usefull ... functions requireing <10ms already may be a problem
16:07 sapier and thouse would be counted as 0ms
16:07 kahrl well I didn't suggest it I just was talking about what some profiling library used
16:08 sapier I know, I didn't know about it's lack of accuracy by that time too ... at least I didn't remember it that time
16:09 sapier has on_shutdown been fixed for singleplayer by now?
16:11 kahrl don't think so
16:11 PilzAdam sapier, I think https://github.com/minetest/minetest/issues/420 can be closed
16:11 PilzAdam since technically the client doesnt quit but rather the server shuts down
16:12 sapier no
16:12 sapier this can't be closed
16:12 sapier the map is shut down if you need to do cleanup you can do this on server but not in singleplayer
16:13 sapier oops different case
16:13 sapier mixed up two issues
16:13 sapier the issue with on leaveplayer is similar
16:14 sapier in mobf you can ride ostriches, if you ride one your saddle is put to ostrich
16:14 sapier on server as soon as you leave you take it with you and the ostrich is freed
16:14 sapier in singleplayer this can't be done because no on_leaveplayer is called
16:15 kahrl I don't think a (multiplayer) server calls on_leaveplayer when you do a /shutdown, though
16:15 PilzAdam on_leaveplayer() isnt called for players that are connected while the server shuts down, so you have to do it on on_shutdown()
16:15 PilzAdam (which is broken in singleplayer ;-))
16:15 sapier and it'd be not a big deal to call the onleaveplayer in destructor
16:16 sapier can we just fix both issues? actually a player needs to leave the server on shutdown or don't we even send a quit message to client?
16:17 BlockMen ok, i have changed #880 now. should i squash the commits?
16:19 kahrl BlockMen: don't you have to add 1 to wlabel.length()?
16:19 kahrl for the null terminator
16:22 BlockMen kahrl, idk. but if you are asking this way i guess i have to ;)
16:24 kahrl actually sprintf(..."%ls"...) converts to multibyte according to my manpage so even that is probably not enough
16:25 kahrl any code like that should certainly use snprintf
16:28 sapier <ironic>I thought all mt programmers where as good as knowing instantly when sprintf is enough?</ironic>
16:30 kahrl BlockMen: any reason you didn't use wide_to_narrow?
16:32 BlockMen kahrl, nope. im still kinda noob i guess...
16:33 kahrl well it could've been due to another msvc stupidism, to be fair ;)
16:34 sapier BlockMen simple rule (even if some ppl don't accept it) wherever memory or strings are copied or written and a snprintf() ... mention the N is available use it
16:34 sapier in worst case it doesn't harm in best case it protects buffer overflows
16:35 kahrl it harms the performance!
16:35 sapier if you copy strings you already did harm performance ;-P
16:36 sapier and gues how harmfull a buffer overflow will be to performance
16:37 kahrl no but seriously I wonder why people didn't invent a memncpy yet
16:37 sapier but I know we add on step on the fly rotation features to avoid lazzy modders need to fix their models
16:37 sapier because memcopy already contains a size ;-P they just forgot the n when creating the function
16:38 kahrl but it's so insecure without the n!
16:38 sapier #define memncpy memcpy
16:38 sapier done
16:38 sapier add this to your code and it will be safe
16:39 sapier this would have prevented titanic from sink too
16:39 sapier sink is wrong am I right?
16:39 kahrl it would have protected the world from a bad movie
16:40 sapier there have been worse
16:42 sapier still using n functions everytime and think about using a non-n function in performance critical functions where possible is much more sane behaviour than the other way round
16:45 kahrl there aren't really any strcpy/strcat/sprintf calls in minetest thanks to std::string and util/string.h
16:45 kahrl there is exactly one sprintf call (in filesys.cpp), and it looks like it has a buffer overflow
16:46 sapier really? so we have 100% error occurance?
16:46 kahrl guess so
16:46 sapier I couldn't have given a better proof ;-P
16:47 kahrl it only affects windows though so everyone sane is safe
16:47 sapier doesn't make a difference
16:47 kahrl windows is already compromised anyway
16:48 sapier *smile* nice to read you finding excuses ;-P
16:49 kahrl eh, when someone uses sprintf you recommend snprintf, I recommend ostringstream or some util function, where's the difference?
16:50 sapier I don't have any problem with ostringstream or other (prooven) utils ... as long as it's not sprintf ;-)
16:51 sapier just if you feel you have to use a function where a n version exists use it
16:52 sapier do flowers really need to spawn that dense?
16:52 sfan5[Mac] joined #minetest-dev
16:53 IceCraft joined #minetest-dev
16:54 kahrl anyway using your recommendation to replace sprintf with snprintf in BlockMen's code we would have had code without a buffer overflow (presumably), but which cuts off certain strings
16:54 kahrl that's why I don't like the strn functions, they hide programming errors
16:54 sapier I prefere cut strings to buffer overflows but I'd even prefer not having both ;-)
16:55 kahrl if they threw an assert in the debug build when the buffer runs full, fine
16:55 sapier the error is already hidden ... don't talk to me about debug builds while debug build is built -O1
16:56 kahrl ...
16:57 kahrl anyway, gotta run
16:59 BlockMen should i use snprintf now or not?
17:00 sapier if you don't find a better solution yes
17:02 Miner_48er joined #minetest-dev
17:03 sapier1 joined #minetest-dev
17:04 BlockMen hmm...why does this let mt crash? 'snprintf (str, (int)wlabel.length(), "%ls", wlabel.c_str());'
17:05 sfan5[Mac] why do you cast wlabel.length() to int?
17:05 sfan5[Mac] that should not be necessary if you do everything right
17:06 BlockMen that was just a try..it also crashes without (int)
17:06 sapier1 you should cast to size_t
17:06 sapier1 what error is thrown?
17:07 sapier1 it's fine as long as str is valid
17:07 BlockMen none, just the windows error screen
17:07 BlockMen i will try with cast to size_t
17:08 sapier1 yes but sfan is right if you do everything right this shouldn't be a difference
17:11 BlockMen thats correct, because it still crashes
17:11 sapier1 do you have a debugger at hands?
17:12 sapier1 most time reproducable crashes are quite easy to be found with debugger
17:19 kaeza joined #minetest-dev
17:21 neko259 joined #minetest-dev
17:26 nore joined #minetest-dev
17:36 BlockMen no, MSVC crashes when debuging
17:36 BlockMen but it works with wide_to_narrow()
17:37 BlockMen could someone with linux test that -> http://pastebin.com/5iMErqRg ?
17:40 Zeitgeist_ joined #minetest-dev
17:47 Calinou joined #minetest-dev
18:26 andersje BlockMen:  if it'd help, I could give you a linux VM and ssh access for testing.
18:28 BlockMen thanks andersje!, but there are enough devs around here and theres no need to hurry ;)
18:29 andersje okay.  I've got a couple of decent sized servers I used to use for an inhouse VM farm, so if you'd _like_ a linux VM (your distro of choice!), I'd be happy to give you one.  just let me know :)
18:32 proller want to commit: better heat calc : https://github.com/proller/minetest/compare/heat
18:32 BlockMen andersje, thats cool. i will keep in mind and adress you in case i need one ;)
18:34 kahrl BlockMen: seems to work here (tried de_DE)
18:39 BlockMen kahrl, ok. then i will change my commit to that
18:40 kahrl tiny nitpick: the variable wlabel should probably be renamed
18:40 kahrl perhaps wtext
18:42 BlockMen sure, sounds good
18:45 BlockMen kahrl, more suggestions? otherwise i would squash the commits then
18:46 kahrl maybe check the return value of luaL_checkstring
18:46 BlockMen check on what?
18:47 kahrl null pointer
18:48 kahrl I know few places in the mod api code check it, but strictly speaking it must be checked
18:50 kahrl or does luaL_checkstring never return NULL? I can't find that guarantee anywhere right now
18:51 BlockMen dunno, where is luaL_checkstring defined?
18:51 kahrl lauxlib.h
18:53 kahrl ah, yeah, it (= luaL_checklstring) actually checks the return value of lua_tolstring and throws an error if it is 0
18:53 kahrl so the return value of luaL_checkstring can't be 0
18:53 kahrl everything is good :)
18:54 kahrl (I'll assume luajit doesn't do it differently)
18:55 BlockMen ok, then i will squash it
18:55 BlockMen :)
19:09 BlockMen squashed, maybe another dev want take a look at #880?
19:10 kahrl looks good, if another dev approves it can be pushed
19:10 proller joined #minetest-dev
19:12 kahrl suggestion for fixing the buffer overflow in GetDirListing: https://gist.github.com/kahrl/6272842
19:12 kahrl (completely untested, don't even know if it compiles)
19:29 celeron55 oh, that ancient code gets a rework 8)
19:30 celeron55 had to actually look this up
19:31 Miner_48er minetest.conf.example "num_emerge_threads = " slightly buggy caves mean?
19:31 celeron55 it stems up from some overenthusiastic RPG project that i and some others started and ended in... 2007
19:32 kahrl heh, neat little trivia of minetest archeology
19:34 proller want to commit: better heat calc : https://github.com/proller/minetest/compare/heat
19:34 proller and this https://github.com/proller/minetest/compare/liquid63
19:39 ShadowNinja proller: Some lines look too long.
19:41 proller will cut them...
19:46 Jordach joined #minetest-dev
20:00 proller in firs only comments too long
20:07 PilzAdam joined #minetest-dev
20:12 Neological joined #minetest-dev
20:27 kaeza joined #minetest-dev
20:28 PilzAdam #880 works fine on Linux and with mingw
20:30 PilzAdam I merge it then
21:01 BlockMen left #minetest-dev
21:04 proller cutted: https://github.com/proller/minetest/compare/heat
21:11 ShadowNinja proller: Also liquid63.
21:12 proller in progress
21:18 proller 80 chars in fullhd age too low 8(
21:27 Exio4 it is guideline
21:29 proller fixed
21:29 Exio4 s/g/a &/
21:57 proller PilzAdam, box for liquid seems fixed here - https://github.com/proller/minetest/compare/liquid63
22:02 smoke_fumus joined #minetest-dev
22:02 proller and bucket works ok
22:03 proller https://gist.github.com/PilzAdam/5687050 -- 1 ok, 2 ok in ^^, 3 ok in ^^, 4 - maybe fixed in v7
23:27 Taoki joined #minetest-dev
23:43 Taoki joined #minetest-dev

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