Time Nick Message 03:43 yh1986 Anybody use ogles 2.0 and shaders? 03:50 yh1986 "vVertexColor = inVertexColor.bgra;" because inVertexColor from color int A8R8G8B8 format inside u32? but only red component is nozero, also It differs from device to device. why? 03:51 est31 hi yh1986 :) 03:52 yh1986 hi 03:57 yh1986 r、g、b component should equal and is nozero, because this code "setMeshColor(m_node->getMesh(), video::SColor(255,li,li,li));", so this was a strange thing. 04:00 est31 perhaps somebody can answer who knows minetest graphics more. I'm not that graphis person 04:01 Zeno` differs? 04:01 Zeno` without knowing which bit of code you're talking about I would say that it's because of big endian vs. little endian 04:02 hmmmm er 04:02 hmmmm it sounds like it might be inside of a shader 04:02 hmmmm yea... we lack context 04:03 yh1986 zeno,two devices is all little endian 04:04 hmmmm if it had anything to do with endianness, there would be three non-zero fields 04:05 yh1986 hmmmm, yes "COGLES2Solid.vsh" 04:07 hmmmm where did you find that piece of code exactly?? I can't find the file it's located in 04:07 hmmmm the one with video::SColor(255,li,li,li) 04:07 est31 perhaps irrlicht? 04:07 hmmmm well then that would be an irrlicht bug, not a minetest bug :) 04:07 est31 we patch irrlicht for android at various places 04:08 hmmmm hmm nevermind found it 04:08 hmmmm content_cao.cpp 04:08 est31 ok 04:08 hmmmm in any case the android distribution does contain a patch for OGLES2 04:09 hmmmm build/android/irrlicht-texturehack.patch 04:09 hmmmm he left 04:09 hmmmm :/ 04:10 hmmmm anyway if you look at that patch, it converts the pixels from ARGB format to RBGA 04:10 hmmmm why, I have no idea 04:10 hmmmm i wish there was a note here explaining why this is done 04:14 hmmmm nevermind, that's for OGLES1 04:14 yh1986 ? 04:14 hmmmm i don't know 04:15 hmmmm this isn't the first time we had all-red graphics, this also happens on ATI cards sometimes, if i recall 04:15 yh1986 why for OGLES1? ES1 need a shader> 04:15 yh1986 ? 04:16 hmmmm no, i was just speculating. there's a file that patches irrlicht for OGLES1 and I thought was related but it's not 04:18 Zeno` CColorConverter.cpp may give some insights, but *shrug* 04:19 est31 Zeno`, btw why do you think sizeof(u32) is bad? 04:19 Zeno` est31, do I? 04:19 est31 yes, if I remember correctly 04:20 est31 but perhaps I've read it wrongly 04:20 yh1986 hard code "Color.g = Color.b = Color.r" can resolve all-red graphics, i don't know why only red is non-zero. 04:20 Zeno` I think it's bad if you have something like s32 array[23902]; and do something like memcpy(dest, array, n * sizeof(s32)); 04:20 Zeno` instead of sizeof(*array) or sizeof(array[0]) 04:20 hmmmm yh1986, that would fix it, i'm sure, but that's not fixing the actual cause of the problem 04:21 est31 ok Zeno` yes thats cleaner 04:21 Zeno` i.e. I think it's bad to explicitly put the type when the type can be inferred 04:22 est31 yes 04:26 Zeno` BTW, I get all red textures with shaders on (on Android) for any version of OGLES :) 04:28 Zeno` https://github.com/minetest/minetest/issues/2501#issuecomment-98384505 04:28 Zeno` O.o 04:28 est31 :( 04:35 Zeno` est31, do shaders work for you on Android? 04:35 Zeno` Or am I just unlucky 04:36 est31 neither for me 04:37 est31 opened #2502 04:37 ShadowBot https://github.com/minetest/minetest/issues/2502 -- Shaders on android produce wrong colors 04:37 est31 which was a dupe of #2060 04:37 ShadowBot https://github.com/minetest/minetest/issues/2060 -- Shaders dont work on Android 04:38 est31 right now I'm bringing csrp-gmp in a better shape 04:38 est31 its getting tab idents and no if() \n{ 's anymore 04:39 Zeno` use whatsy 04:39 Zeno` AStlye 04:39 Zeno` style* 04:40 est31 and removing the const unsigned char* stuff 04:40 Zeno` lol, I forgot my android build is in a state of flux... dammit 04:40 est31 ?? 04:41 Zeno` I've been working on it and it doesn't work in other words :) Stashing changes 04:41 Zeno` I'm gonna hunt the shader issue down and then run away in fear 04:41 est31 lol 04:42 Zeno` oh, maybe you know. Is there a way to filter logcat? 04:42 Zeno` So I don't see messages from a million different sources? 04:43 est31 grep? 04:43 Zeno` yeah doesn't work very well for some reason 04:43 Zeno` atm I'm redirecting to a file and then using grep :/ 04:43 Zeno` and it's infuriating 04:45 Zeno` I think I know (maybe) why shaders are not working for me 04:45 est31 peope on the internet used grep --line-buffered 04:46 Zeno` ahh line buffered... that would be it 04:47 Zeno` E/Adreno-ES11(16024): : GL_INVALID_ENUM 04:47 Zeno` I wonder wth that means 04:48 Zeno` http://dpaste.com/2H8MTWQ 04:48 Zeno` gibberish 04:50 Zeno` and millions of: 04:50 Zeno` V/minetest(16024): Irrlicht log: GL_INVALID_ENUM 04:50 Zeno` V/minetest(16024): Irrlicht log: Could not bind Texture 04:50 Zeno` there we go. I hunted it down! 04:51 Zeno` that's interesting 04:51 Zeno` clean shutdown: http://dpaste.com/362NDE1 04:52 Zeno` doesn't look too "clean" 04:52 Zeno` (I hit exit to OS from the pause menu) 04:53 Zeno` http://dpaste.com/3KPG904 04:53 Zeno` hmm 04:57 Zeno` apparently it's caused by the exit(retval); in porting_android.cpp 04:57 Zeno` but if I remove that the application doesn't close at all. Weird 04:59 est31 I guess we aren't exiting how android designers think apps should exit 04:59 est31 perfectly fine, but in their eyes wrong 05:00 est31 so we have to "fix" and call their androidExit(); method 05:00 est31 (my theory) 05:00 Zeno` looking at example code, exiting from android_main() should be as simple as letting the function finish 05:01 Zeno` so I'm not sure why the exit() is needed (but it is otherwise it hangs... albeit you get the app died/improper shutdown) 05:02 Zeno` http://stackoverflow.com/questions/18365077/fragment-activity-app-died-no-saved-state 05:03 Zeno` Seems we shouldn't be using exit() at all 05:03 Zeno` hmm 05:03 Zeno` btw this is a real crash on 5.0.1 05:04 Zeno` (lollipop) 05:04 Zeno` I didn't realise it was also being logged as an issue on 4.whatever.whatever that I use for my test device 05:07 Zeno` I wonder what app_dummy(); is 05:28 * Zeno` types random code to see what happens 05:36 sfan5 Zeno`: it's for linking i think 05:40 Zeno` yeah glue apparently 05:41 Zeno` I think the real issue is we're not handling activity events and that's why the exit(retval) is required 05:41 Zeno` but that leaves activity events unprocessed leading to the unclean shutdown 05:43 Zeno` hopefully I can just process them all at the end heh 05:43 Zeno` otherwise I guess I'll have to add some code in all of the main loops :( 05:44 Zeno` sfan5, apparently some needed "glue" gets stripped if the app_dummy() isn't there 05:48 Zeno` well that was a waste of time 06:35 Zeno` progress: I/DEBUG (27075): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- 06:35 Zeno` lol 06:38 hmmmm probably a crapshoot but 06:38 hmmmm do you know of any ctags-like utility for C++ that will trace the origin of a symbol through each included file 06:41 * est31 solves this problem with okular's "find files containing string in the current directory" feature -- the more unique names are, the better 06:42 est31 works like a charm for minetest with unique names 06:42 est31 godot for example has tons of collisions 06:42 hmmmm no, what I'm looking for in particular would do this: 06:42 hmmmm say I'm in some file that has nothing included aside from gamedef.h 06:43 hmmmm and I want to see where the definition of u32 is coming from 06:43 hmmmm it'd print out gamedef.h -> irrlichttypes.h -> irrTypes.h 06:43 est31 ah 06:44 est31 don't know a tool that does that 06:44 est31 but I guess it can be achieved by abusing the compiler 06:44 est31 somehow 06:44 est31 triggering errors, they usually include header info 06:46 hmmmm there is evidently some case where on freebsd, util/numeric.h gets included by including some other files, whereas on other platforms this is not included 06:58 Zeno` ? 06:58 Zeno` what's the error? 07:01 est31 there is the -M flag 07:01 est31 but it only displays a list, no tree 07:02 Zeno` I can't even see what test_noderesolver.cpp is using from numeric.h hehe 07:02 est31 ok hmmmm I have found out now how to find where your file is included 07:03 hmmmm ?? 07:03 est31 1. step run make VERBOSE=1 07:03 est31 then get the actual /usr/bin/c++ command 07:03 est31 for the file you investigate 07:03 hmmmm then add #error "here it is" right before the definition 07:03 hmmmm right?? 07:03 est31 oh thats a way too 07:04 est31 you can also use the -H flag 07:04 est31 prints a nice tree 07:05 hmmmm what compiler is the -H flag for? 07:05 est31 gcc 07:05 hmmmm yea.. see, i can't use gcc 07:05 est31 only clang? 07:05 hmmmm pretty much 07:05 est31 clang has it too 07:06 est31 just tested it 07:06 hmmmm ah cool 07:18 kilbith enable/disable 3D clouds in the settings tab no longer works apparently 07:20 est31 kilbith, does it work when you restart? 07:21 kilbith it was applied instantly in the near past 07:21 est31 yes 07:21 est31 since https://github.com/minetest/minetest/commit/4b0f5fcbf5a52b234f0571ad521707998be320f7 its otherwie 07:21 est31 otherwise? 07:21 est31 * 07:22 kilbith yes, when i restart it works 07:23 est31 I guess either we revert that commit, or we add a mainmenu lua method to set that flag on the "life" clouds 07:23 est31 the latter is the more proper way of doing 07:25 est31 the most proper way would be to have a generic "event" based approach 07:26 est31 "register method A to be called when setting ABC changes" 07:31 Zeno` finally got rid of the exit(retval) 07:31 est31 and of the crash? 07:31 est31 nice 07:31 Zeno` yep 07:32 kilbith enable_clouds = false has no longer effect as well 07:32 kilbith :/ 07:32 Zeno` I should have just done it this way in the first place. As usual I went off on a wild tangent that had nothing to do with anything 07:32 est31 kilbith, it all will work at a restart 07:33 kilbith est31, i know but somehow doesn't work 07:33 kilbith i learned that tip to you btw 07:34 est31 it should work... 07:34 kilbith yes, enable_clouds = false is uneffective after a restart 07:35 kilbith and set when the client is closed 07:35 est31 perhaps that setting is defined twice? 07:35 kilbith no, i only have one 07:35 Zeno` #2677 07:35 ShadowBot https://github.com/minetest/minetest/issues/2677 -- Fix Android shutdown error by Zeno- 07:38 est31 Zeno`, I'll give it a closer look later, but right now I'm busy with other things 07:38 Zeno` no you must look NOW 07:38 Zeno` hehe j/k 07:39 kilbith and everything works fine without 4b0f5fcbf 07:40 est31 I just don't get how 3d clouds affect turning off clouds at all 07:40 est31 I mean all the other code is still there 07:43 kilbith another bug, when i enable enable_3d_clouds = true, then i close the client, delete that line, the 3d clouds are still in appliance 07:44 kilbith with nothing related in the .conf 07:45 est31 thats no bug kilbith 07:45 est31 its the default 07:46 kilbith oh yeah i forget 07:48 est31 you know that enable_clouds = false only affects in-game clouds? 07:48 est31 I can't reproduce the enable_clouds bug 07:48 est31 and I really don't know how it would be caused by my commit 07:50 kilbith you're right for enable_clouds, thought the mainmenu clouds were counterpart with the in-game clouds 07:52 kilbith anyways the bug with the 3D clouds setting is still valid 07:55 hmmmm it's not a bug 07:57 kilbith ? and do you explain it was instantaneous before and not now then ? 07:57 hmmmm do i? 07:57 kilbith +how 07:57 hmmmm because the behavior was changed 07:57 hmmmm a bug is unintended behavior 07:58 hmmmm changes you don't like != bug 07:59 kilbith uh, not really, users expects a direct visual appliance for that setting 07:59 kilbith otherwise it may bring confusion 07:59 hmmmm ... 07:59 hmmmm no, it's not a bug. 07:59 hmmmm the behavior is intentional. end of story. 08:00 hmmmm maybe users should get educated if that's what they expect 08:02 est31 its like the texture packets, they aren't applied instantaneously either 11:30 est31 so, is it only a github hickup, or will the outage continue? 11:30 est31 https://status.github.com/ 11:39 chchjesus oh shit 11:39 chchjesus I only just pulled from there 11:43 est31 "We're doing emergency maintenance to recover the site". 11:43 est31 in read. 11:46 chchjesus Ah 11:46 est31 whatever I'm off 14:38 est31 Zeno`, http://stackoverflow.com/a/4928805 14:39 est31 and here for a doc what you can do https://android.googlesource.com/platform/frameworks/native/+/master/include/android/native_activity.h 14:39 est31 (in native code) 14:39 est31 so idea would be to port that to native 14:41 est31 and about how to get the ANativeActivity* pointer... perhaps from the onStart callback 14:43 est31 just no idea how to register those callbacks 15:25 est31 ah simple 15:26 est31 the ANativeActivity* pointer can be retrieved from android_app struc 15:26 est31 struct* 15:26 est31 which is passed to android_main 15:26 est31 very fine 18:19 paramat i tested kilbith's 3D clouds issue and can't reproduce, i can switch 3D clouds on/off in menu without a game restart, it all seems okay 18:27 ShadowNinja I've added core.get_dir_list to my security pull. This allows player_textures to operate with security and fixes a bug in the mod at the same time. 18:31 * ShadowNinja revises last discussion looking for other issues. 18:45 ShadowNinja That seems to be all. 18:46 ShadowNinja I'll merge security in a few hours then. 19:03 est31 I still don't get how that solves the root issue. 19:03 est31 but better than nothing 19:03 est31 its perfectly sufficient for that mod 19:04 est31 and if people want rogue file access after load time, they will show up 19:20 ShadowNinja Pushing minor Redis error message improvement. 19:21 sfan5 uhh 19:21 ShadowNinja Followed by a fix for #2672, and maybe a KB/KiB/MB/MiB fix. 19:21 ShadowBot https://github.com/minetest/minetest/issues/2672 -- bad argument #-2 to get2d 19:21 sfan5 ShadowNinja: can you show us what you're actually pushing 19:21 ShadowNinja sfan5: Making the errors print reply->st. 19:21 ShadowNinja reply->str rather. 19:23 ShadowNinja sfan5: http://sprunge.us/OZVB 19:24 hmmmm ugh 19:24 hmmmm the MB/MiB thing again 19:24 hmmmm fine, if you're so dead set on doing that, go ahead and do it 19:24 sfan5 + ctx = NULL; 19:24 sfan5 why 19:25 sfan5 it's not like there is any code left that can do something with ctx after the contructor throws an exception 19:25 sfan5 constructor* 19:26 ShadowNinja Meh, yes, I guess that's pretty pointless. 19:27 ShadowNinja You *could* use it I think, but you'd have to be pretty stubid to do so. 19:29 ShadowNinja sfan5: This too: http://sprunge.us/fLLi?diff 19:30 ShadowNinja It fixes errors with messages like "invalid argument #-2 to function" (becomes something like "invalid position coordingate 'x' (extected number got nil)". 19:30 sfan5 136 + size_t len; 19:30 sfan5 137 + const char *s = lua_tolstring(L, -1, &len); 19:30 sfan5 why not keep using the old way? 19:31 ShadowNinja sfan5: Because the old way doesn't support NULs, and it's a generic function. 19:31 sfan5 oh right, it's a C api 19:33 ShadowNinja sfan5: Look good? 19:33 sfan5 yes 19:37 ShadowNinja sfan5: Is this fine too? http://sprunge.us/QKhH?diff 19:37 sfan5 yes 19:37 sfan5 ShadowNinja: wait 19:37 sfan5 ShadowNinja: while you're at it also remove the space from the wgettext'd string 19:38 ShadowNinja Alright. 19:39 ShadowNinja It should probably be something like @1 MiB/s actually, to account for word-order differences, but I don't think the engine has that functionality yet. 20:08 sfan5 2015-05-06 22:08:00: ERROR[main]: ServerError: caught (...) 20:08 sfan5 wow 20:08 sfan5 how helpful 20:20 ShadowNinja sfan5: It seems like LuaJIT passes errors around in a way that catch (...) catches. I removed that in one of my PRs. Remove the block or use Lua. 20:34 est31 why did you add the rebase needed tag sfan5? 20:34 est31 (note: perhaps that PR should be closed and one for the security-2 branch be opened) 20:43 sfan5 est31: github said it needed a rebase 21:03 ShadowNinja sfan5, est31: Does #2039 look good to you? 21:03 ShadowBot https://github.com/minetest/minetest/issues/2039 -- Add non-global mod namespaces by ShadowNinja 21:13 est31 no 21:14 est31 I'm with sapier on this 21:17 ShadowNinja est31: What's wrong with it then? 21:17 ShadowNinja est31: All he said was based on misunderstanding what the code does. 21:19 est31 I'm against because it makes mods longer to write 21:20 est31 more bloat when using other mods 21:20 est31 and complexity that hasn't that much benefits 21:23 ShadowNinja est31: It doesn't. His examples were absurd, and they weren't even valid Lua. You just have to use something like `local foo = minetest.mods.foo` to the top of your file, and it's faster anyways because there's one less lookup (global tabel lookup). 21:24 * ShadowNinja edits his comment to be valid and sane. 21:25 est31 That trick takes out one of your listed advantages: being faster because its no global lookup 21:26 est31 If its only accessed once, then there is only one lookup 21:27 ShadowNinja est31: Well of course. But you almost always use a function/value more than once. 21:27 est31 so? 21:29 est31 java classes aren't prefixed either 21:29 est31 I just can prefix it by the domain name and this is it 21:29 est31 no java.class. prefi 21:29 est31 x 21:31 est31 lua is about getting productive fast 21:31 ShadowNinja est31: I fixed his comment. 21:31 ShadowNinja est31: What's this about Java? 21:32 est31 for example when I write a library coollib, and my domain name is example.com, then I name my classes like com.example.coollib.classABC 21:32 ShadowNinja You don't need to specify "class not.minetest.minetest.MtNativeActivity {" because of the package declaration, is that what you're talking about? 21:32 est31 not java.libs.com.example.coollib.classABC 21:33 ShadowNinja Yes, because it's in an implicit namespace. You can't just use com.example.coollib.classABC without an import. 21:34 ShadowNinja The local x = minetest.mods.x line is like an import line. 21:34 est31 yes but still its "global" and not hidden inside java.lib. something 21:35 est31 so for testing, there is minetest.global_exists(name) 21:36 est31 which other benefits do you see? 21:36 ShadowNinja No, it's local. You have to localize it with the import line. If you don't use the import line you don't get it added anyways. 21:37 ShadowNinja Benefits: Speed (due to more localizations), less global conflicts, ability to check if a mod's loaded but not functional. 21:38 ShadowNinja Although, actually, the third thing could be done before. 21:39 ShadowNinja And having a list of external APIs that a file uses at the top is a perk IMO. 21:39 ShadowNinja (Although perhaps not in the detail that Java files have you do) 21:39 est31 so its "make it hard to access mods so that people localize so that speed improves"? 21:40 ShadowNinja Sort of. 21:42 ShadowNinja BBL. est31: Check if #2655 is O.K. while I'm gone. 21:42 ShadowBot https://github.com/minetest/minetest/issues/2655 -- Clean up mod profiler by ShadowNinja 22:02 est31 ShadowNinja, doesnt work 22:02 est31 also, doesnt it depend on your logging cleanup patch? 22:03 est31 when I do /dump_mod_profile nothing happens 22:04 ShadowNinja est31: Eh, yes. Change the minetest.log calls to minetest.debug. 22:04 ShadowNinja (or use the logging cleanup patch) 22:05 est31 so you want to get it merged before that patch or after? 22:06 ShadowNinja est31: Either order's fine. 22:06 est31 if before, then it should work without the patch :) 22:07 est31 if after, then perhaps its a better idea to test it after the logging patch got merged, not? 22:07 ShadowNinja est31: If I just change it to core.debug it will work with doth versions. 22:08 est31 thats great 22:08 est31 but won't core.debug change the loglevel? 22:11 ShadowNinja est31: Nope. 22:12 ShadowNinja It'll just get its prefix after my rework. 22:12 est31 I think I'm too tired for this 22:12 est31 sorry :(