Time Nick Message 12:24 rubenwardy https://github.com/minetest/minetest/blob/master/android/app/src/main/java/net/minetest/minetest/UnzipService.java#L125 12:25 rubenwardy this deletes the zipfile after extracting the first file? ? 12:26 sfan5 that's okay since it still has the file handle open 12:26 sfan5 but why 12:31 rubenwardy yeah, I imagine this would fail on windows 12:31 rubenwardy but Android uses handles like linux 12:31 MTDiscord Sounds dangerous. Things can crash during an unzip. You can run out of storage space, the process can be killed, etc. 12:32 rubenwardy this should use try finally 12:33 MTDiscord Ideally any kind of "destructive" unzipping process should queue up deletions and not process them until the full "transaction" is done, which might be more than just a single unzipping... 12:34 MTDiscord e.g. if you're doing like some kind of data migration, don't delete the originals until the full migration succeeds, in case you have to retry the migration from the start. 12:34 rubenwardy it largely ovewrites though 13:19 rubenwardy hm, looks like Android builds with fast-math 13:21 pgimeno you want -fno-reciprocal-math for a certain unit test to pass 13:21 sfan5 if you want to change it replace it with -fno-math-errno 13:22 sfan5 eventually android should just use cmake like all other platforms do 13:22 pgimeno https://github.com/minetest/minetest/commit/5cbe8437a8f7efc9c76baf23de700e96ad96b385 13:25 pgimeno I'm not too happy with -ffinite-math-only but well 13:26 sfan5 it breaks a thing in fact 13:29 rubenwardy #11466 is ready for review, APKs attached 13:29 ShadowBot https://github.com/minetest/minetest/issues/11466 -- Use scoped app storage on Android by rubenwardy 13:34 Krock testing on android 6 13:36 Krock "App was not installed" ... very helpful thanks. Android 6.0, armv7l, kernel 3.10.86 13:37 sfan5 small reminder: #11287 13:37 ShadowBot https://github.com/minetest/minetest/issues/11287 -- Take advantage of IrrlichtMt target by JosiahWI 13:37 rubenwardy I've heard of that before, from Warr1024 maybe? 13:37 rubenwardy I suspect it's something to do with Android security settings 13:37 rubenwardy @Warr1024 13:39 Krock currently running 5.1.0 (24) and no updates show up on the play store 13:39 MTDiscord "app not installed" is basically a super-catch-all error that can happen for a lot of reasons. 13:39 MTDiscord Could be you're installing for the wrong arch. Could be that you already had a previous install of MT built with a different key 13:40 MTDiscord also when I "assemblerelease" it tries to build a release APK but doesn't have a release key, so naively builds an unsigned APK but you can't install an unsigned APK 13:40 Krock tried armv7 first, then armv8, both failed with the same message 13:40 MTDiscord so you have to "assembledebug" to make a debug build and sign it with the debug key. 13:40 MTDiscord You have to uninstall any previous version of MT completely, then install a debug APK. 13:41 Krock "App was installed". oh neat. thanks. 13:41 rubenwardy weird 13:41 Krock crashes on startup tho, right after asking for SD-Card permissions (there's none installed, but I clicked yes anyway) 13:42 rubenwardy do you have ADB? 13:42 MTDiscord Yeah, Android assumes that you either (1) know what you're doing, or (2) have an ADB bridge attached and can view technical logs that way or something, so they don't make the error messages easy to diagnose from an end-user perspective. 13:42 Krock nope. trying logcat, maybe it helps 13:42 rubenwardy yeah, logcat is part of adb 13:43 MTDiscord My recent devices are not rooted/custom, and I don't really have android debugging tooling setup (I mostly just make PWAs rather than native apps) so I'm probably not the best person to give you details in failure scenarios :-) 13:43 rubenwardy ha, 5.4.1 resulted in a 40% increase in crashes on Android 13:43 rubenwardy great 13:44 rubenwardy We should probably look at using Sentry or something, and actually monitoring these things 13:44 Krock Android just has a shit way of debugging 13:45 rubenwardy #9107 should probably be fixed at some point 13:45 ShadowBot https://github.com/minetest/minetest/issues/9107 -- arm64-v8a. Packets time out in singleplayer. RE-SENDING timed-out 13:46 rubenwardy because it kills loading performance 13:58 Krock > [copy_match_files,864]: copy [/data/system/dropbox/data_app_crash@1626616521533.txt] to [/data/log/logcache/-1228830416/data_app_crash@1626616521533.txt] 13:58 Krock /system/bin/sh: cd: /data/system/dropbox: Permission denied 13:58 Krock well thanks 13:59 rubenwardy that'll be from something else 13:59 rubenwardy you'll want to filter for `net.minetest.minetest` 14:00 Krock I have no idea how to use logcat. I just ran it directly, with stdout to a file 14:00 rubenwardy Did you reproduce the crash in that time? 14:01 Krock I started the app, so yes. 14:01 rubenwardy do you get any toasts when it crashes? 14:01 rubenwardy messages that appear at the bottom 14:01 Krock crash without message. the only that's left is a status message about "Minetest is starting..." 14:02 Krock sorry. "Loading Minetest" "Less than 1 minute..." is the exact wording, no translation. 14:02 rubenwardy there's no error messages in the logs 14:03 rubenwardy I'll try an emulator 14:03 Krock adb logcat >file should be enough, no? 14:04 rubenwardy yeah 14:06 Krock re-tested. same lines in grep "net.minetest" 14:06 sfan5 better grep -i minetest 14:08 Krock same matches 14:20 rubenwardy emulator doesn't seem to want to boot 14:20 rubenwardy the x86 one boots, but not the arm64 one 14:24 rubenwardy downloading a new image 14:42 rubenwardy Krock: Enable developer settings and USB debugging (I assume you've already done this to get logcat?) 14:43 rubenwardy In one terminal, do adb set-debug-app net.minetest.minetest and adb shell am monitor 14:43 rubenwardy in another, do adb shell am start -D -n net.minetest.minetest/net.minetest.minetest.MainActivity 14:43 rubenwardy should give you GDB 14:43 rubenwardy hmm, maybe adb shell am monitor --gdb 14:44 rubenwardy in the first terminal, that is 14:45 rubenwardy hmmmm, there's also this article https://codeseekah.com/2012/02/16/command-line-android-development-debugging/ 14:48 rubenwardy There's a reason why studios have loads and loads of Android devices 14:55 Krock trying... 15:03 rubenwardy hmm, would be good to use release with debug symbols on Android production so we can get nice stack traces 15:03 rubenwardy this PR should fix all the Java crashes 15:03 rubenwardy but also add some new ones 15:10 Krock after starting I only get "** Activity starting: net.minetest.minetest", nothing else. using 1) adb shell && am set-debug-app net.minetest.minetest && am monitor, 2) am start -D -n <...> 15:14 rubenwardy I have no idea then 15:14 rubenwardy maybe try uninstalling and installing the APK again? 15:14 Krock also for gdb.. no clue on hoe to use that 15:14 Krock *how 15:15 rubenwardy ohhh 15:15 rubenwardy wait 15:15 rubenwardy The app version code will be the same as 5.4.1 15:15 rubenwardy so you need to clear the sharedPreferences before opening the app 15:16 Krock I never had 5.4.1 installed 15:16 rubenwardy in Recent Apps > Minetest App > Storage > Clear storage 15:16 rubenwardy oh nevermind 15:16 Krock last version was 5.1.0 15:16 Krock gonna check whether master works 15:19 rubenwardy #11417 15:19 ShadowBot https://github.com/minetest/minetest/issues/11417 -- Revoking permission at MainActivity crashes app 15:19 rubenwardy sure, you found a crash. But why would you do that? 15:19 Krock just don't do that 15:20 rubenwardy Minetest won't need that permission on the release after November 2021, so I'm tempted to not bother fixing it 15:21 Krock 5.4.1 works just fine 15:21 Krock same as 5.4.0 15:21 rubenwardy technically, there's no error 15:21 rubenwardy :D 15:22 rubenwardy How sure are you that it was 5.1.0? I do still suspect it's due to the app version check 15:22 Krock because TotalCommander told me so, and that one's accurate according to the tests I just did 15:23 Krock gonna do the cleaning steps nonethless. let's see. 15:23 rubenwardy The app should probably check that Minetest and other folders exist, even if it doesn't assert all the files 15:27 Krock I could not find the Storage option you mentioned, but I removed the Minetest directory from the storage and that should do the trick I hope 15:28 rubenwardy no no, the app storage 15:28 rubenwardy Recent apps, press and hold icon, app info, storage, clear storage 15:28 rubenwardy the Minetest directory should exist for testing 15:28 rubenwardy as part of the migration process 15:31 Krock I feel kinda stupid. Press&hold says that the app does not support dual-window mode. Anyway. found it in the system settings (after re-installing an older version to avoid version number conflicts) 15:31 Krock oh lol. click and hold the app screen.... anyway. til. 15:33 Krock hmm. showed a short "Loading" blue screen and crashed after a second after allowing sd card access 15:33 Krock basically the same as before 15:35 rubenwardy oh perhaps it's the C++ crashing 15:35 rubenwardy that might explain no error message 15:35 rubenwardy the NDK is terrible for debugging 16:05 Krock not even a debug.txt file 16:06 Krock sucks 18:11 Krock with some symlink trickery #11287 works well without an additional installation step. that's definitely not how it was indented but the workflow does not change 18:11 ShadowBot https://github.com/minetest/minetest/issues/11287 -- Take advantage of IrrlichtMt target by JosiahWI 18:12 sfan5 heh 18:12 sfan5 I was close to suggesting such a thing in my comment 18:12 Krock haha 18:14 Krock https://gist.github.com/SmallJoker/ddd4181f5d7b2cee4c5348fbf8bed411 fwiw 18:21 MTDiscord lol abuse FTW 18:33 MTDiscord i don't want to install another systemwide library for a single game 18:34 Krock @Jordach cmake . -DCMAKE_INSTALL_PREFIX=bin/ && make -j && make install installs it locally 18:34 sfan5 nah, easier 18:34 MTDiscord why can't i just use the standard .a over a complex and likely to break 18:34 sfan5 clone irrlicht to lib/irrlichtmt and it will work automatically 18:34 MTDiscord solution which is clear from an outside perspective is overkill 18:37 MTDiscord and then it's very silly to install it systemwide because now that we've forked irrlicht, any changes require the whole shebang to be updated again 18:37 MTDiscord whereas run in place makes it far less painful 18:44 MTDiscord The lib/irrlichtmt solution is really simple and quite robust, as sfan5 pointed out. 18:44 MTDiscord and that requires the potential of system specific scripts 18:45 MTDiscord might work on Linux derivatives but not BSD 18:45 MTDiscord ...? 18:45 MTDiscord > that's definitely not how it was indented but the workflow does not change 18:46 MTDiscord I think he was symlinking to the Irrlicht directory, although I didn't read his script. 18:48 MTDiscord I fail to see any difference between using library/header variables and using a path to an install location that would break things that wouldn't have broken before. 18:50 MTDiscord your PR makes it sound that's no longer an option 18:50 MTDiscord Using library/header variables would no longer be an option; instead you would give 1 path to where the library/headers were put. 18:51 MTDiscord also minetest has never required the cmake -S option 18:52 rubenwardy Related comment regarding settingtypes.txt and #11463: I think that settingtypes.txt should be deprecated, and removed from builtin/. Instead, comments in minetest.conf.example should be used to document the types and such, and C++ should read from that 18:52 ShadowBot https://github.com/minetest/minetest/issues/11463 -- Add many limits to settingtypes by Wuzzy2 18:52 MTDiscord -S isn't required. 18:52 sfan5 C++ parsing a file that is primarily meant to be human readable sounds like awful idea 18:52 rubenwardy hmmm 18:52 rubenwardy it sucks having two different files like we have now 18:53 rubenwardy could be a problem if the user modifies the example file 18:53 sfan5 that's one the reasons I was thinking yea 18:53 MTDiscord BTW Jordach, SDL is set up the same way Irrlicht is now, although I believe it supports using library/header variables (although there's really no reason to). 18:56 MTDiscord that said, for me to produce valid macOS and iOS binaries of Minetest i have a hard requirement of run in place building 18:56 MTDiscord especially the irrlicht library 18:56 sfan5 so do the windows builds 18:56 MTDiscord Irrlicht can be staticly linked, a .a 18:57 sfan5 and windows support is not going anywhere 18:57 MTDiscord This PR doesn't change static/dynamic linking requirements at all, really. 18:57 MTDiscord Except for transitive dependencies, now. 18:57 MTDiscord Just build Irrlicht as a static library; it will be staticly linked and should work exactly like it did before. 18:58 MTDiscord i should clarify i do not build shared libraries 18:58 MTDiscord cmake . -DBUILD_SHARED_LIBS=FALSE 18:58 MTDiscord So, what's the issue? 18:59 MTDiscord i just need 1) it to leave libIrrlichtMt.a inside /irrlicht/libs//libIrrlichtMt.a 2) not interfere with any existing build script 18:59 MTDiscord i don' 19:00 MTDiscord don't wish to be spending another 6 hours arguing with cmake again 19:00 sfan5 you will need to a adjust your build script 19:00 sfan5 however, it will only get simpler. guaranteed. 19:01 MTDiscord trust me when i say this i'm using some arcane as hell jank in cmake to get ancient OSX versions working 19:01 Krock rubenwardy: but then people might remove that file and wonder why the limits are no longer working. .example would have to be a requirement, even for servers 19:01 MTDiscord Let me help update your build script then; I'll bet it takes < 30 minutes. 19:03 rubenwardy could `#include ` 19:03 rubenwardy starts to get complex then 19:03 MTDiscord https://gist.github.com/Jordach/ee3e0b3cddb7957b86317f747817c9ec 19:04 MTDiscord Ok, you weren't kidding. Setting the PNG include dirs by hand? Well, guess what, Minetest no longer links to PNG IIRC, so those can just be deleted. 19:05 MTDiscord it's either use brew which doesn't support multiarch (M1 + x64 fat binaries) or go full gentoo 19:05 MTDiscord i chose the full gentoo route 19:07 MTDiscord Oh, it's actually Irrlicht you need to set PNG dirs for. 19:07 MTDiscord with some tweaking this script could theoretically build iOS with some minimal research 19:07 MTDiscord Is this on your fork so I can PR a change to it? 19:07 MTDiscord it's a local file i use to build 19:07 sfan5 you can fork on gist too but no PRs 19:10 MTDiscord fun fact, i can build minetestserver on iOS but not regular minetest since i can't currently find the location of the ES2 drivers 19:10 MTDiscord Hmm, this script actually doesn't use the Irrlicht CMake for the Universal build. 19:11 MTDiscord it does 19:11 MTDiscord running the file command on the resultant library would only display one arch 19:11 MTDiscord huh 19:13 MTDiscord once i figure out the required cmake args for iOS specifics i can add onto this script to manage iOS builds 19:15 MTDiscord https://gist.github.com/JosiahWI/39e7cb97fd49091c14fda3991f6457a1 19:16 MTDiscord Should be done, but hard to say without having a Mac to test on. Maybe I'll recruit one of my friends with a Mac to test it out... 19:21 MTDiscord curious line https://gist.github.com/JosiahWI/39e7cb97fd49091c14fda3991f6457a1#file-build_mt_version-sh-L25 19:21 MTDiscord The i was in there in your version, too. 19:22 MTDiscord That's why I was confused about whether you were using CMake. 19:22 MTDiscord that should be cmake . 19:22 MTDiscord I've been staring at that i for the past few minutes trying to figure out why it's there. 19:22 MTDiscord might have had it highlighted from a copy paste and hit a key 19:22 MTDiscord Well, fixed now. 19:23 MTDiscord also - macOS does not have directories like the usual install directories 19:23 MTDiscord /usr/ is a fake directory and isn't actually existant 19:24 MTDiscord This script won't use any "root" paths. 19:24 MTDiscord It just uses a bin/ directory inside your irrlicht clone. 19:25 MTDiscord Typo. It's supposed to be CMAKE_INSTALL_PREFIX. Let me fix.