Time |
Nick |
Message |
00:33 |
sofar |
I'll take a look at the PR |
00:43 |
erle |
sofar at which one? the one from fleckenstein or from luatic? |
01:13 |
|
YuGiOhJCJ joined #minetest-dev |
01:31 |
|
fluxionary joined #minetest-dev |
04:00 |
|
MTDiscord joined #minetest-dev |
05:43 |
|
cranezhou joined #minetest-dev |
06:07 |
|
celeron55 joined #minetest-dev |
06:07 |
|
Calinou joined #minetest-dev |
06:07 |
|
ShadowNinja joined #minetest-dev |
06:08 |
|
luk3yx joined #minetest-dev |
06:13 |
|
calcul0n joined #minetest-dev |
06:19 |
|
ivanbu joined #minetest-dev |
08:04 |
|
behalebabo joined #minetest-dev |
09:51 |
rubenwardy |
yay |
09:51 |
rubenwardy |
I can confirm that Google Play is giving nice tracebacks now |
09:52 |
rubenwardy |
first crash is a main menu issue - "no future without main menu" |
09:52 |
rubenwardy |
we don't have access to debug.txt so there's no way to know the Lua error |
09:54 |
|
Fixer joined #minetest-dev |
10:03 |
|
HuguesRoss joined #minetest-dev |
10:32 |
celeron55 |
wait where does that error text come from |
10:33 |
MTDiscord |
<paradust> oh, I remember encountering a main menu problem. Forgot to look into it. But if you create a world without specifying which game, a big Lua error popped up |
10:33 |
celeron55 |
why can't the lua error end up in the same place |
10:34 |
rubenwardy |
that the error message comes from reading the source code |
10:34 |
rubenwardy |
it calls `abort();` so Google Play just has a SIGABT with a line |
10:35 |
rubenwardy |
(GUIEngine::GUIEngine()) (SourceCode: /home/ruben/dev/minetest_android_release/android/native/jni/../../../src/gui/guiEngine.cpp:202) |
10:35 |
rubenwardy |
specifically |
10:43 |
celeron55 |
would be nice to be able to include an error message somehow |
11:38 |
erle |
celeron55, i do not know too much about C++, but can you just catch SIGABRT? |
11:38 |
erle |
void die(int s) { std::cout << "[last lines of debug.txt here]\n"; exit(s); } |
11:38 |
erle |
int main () { signal(SIGABRT, die); while(1) {}; return 0; } |
11:38 |
erle |
i tried this just now, but maybe it does not work on android for some reason? |
11:40 |
erle |
ok i checked, this also works if the abort() call comes from inside the house |
11:43 |
|
cranezhou joined #minetest-dev |
11:44 |
sfan5 |
...catch the abort to print an useful error message that we could just have printed directly? |
11:45 |
sfan5 |
the issue is that google play crash reporting only has a backtrace but no way to include an error message or log lines (afaik) |
11:46 |
erle |
the thing is, i bet abort() is used more often than once. also i do not know if you need special handling for android error messages. |
11:50 |
sfan5 |
the backtrace can already tell us where abort() was called |
11:56 |
celeron55 |
well, can we catch abort and then somehow cause a backtrace with more information? 8) |
11:57 |
celeron55 |
make function for each alphabet that can be called using an array of letters and which will recursively create a stack with the given letters and then actually abort |
11:58 |
celeron55 |
if it works, it's not stupid |
11:59 |
MTDiscord |
<savilli> make sure it won't be inlined |
12:01 |
MTDiscord |
<savilli> but src/gui/guiEngine.cpp:202 doesn't have a error message, what do you want to print here? |
12:26 |
celeron55 |
i guess it gets kind of complicated as the actual problem has probably occurred some time earlier |
12:29 |
MTDiscord |
<savilli> you can try to print the whole debug.txt that way, but it looks quite ambitious |
12:38 |
celeron55 |
if we absolutely need a crash report sending function and a server for receiving them, it's not impossible to do it, but for more than a decade we've managed without |
12:47 |
rubenwardy |
"Managed without" depends on your tolerance for bugs |
12:47 |
MTDiscord |
<savilli> well, for more than a decade minetest has a poor android support |
12:47 |
rubenwardy |
yeah |
12:48 |
rubenwardy |
better support for error reporting on Android would be nice as a start, wouldn't be against extending it to other platforms but Android+GooglePlay is the ideal situation for it |
12:49 |
rubenwardy |
as 1) it's currently obscure to debug on android (you can't just ask users to grab a debug.txt) |
12:51 |
rubenwardy |
2) was going to be privacy, but that's not actually as a huge difference as you'd still want a method to opt out |
12:53 |
MTDiscord |
<savilli> why can't you ask users to grab their debug.txt? |
12:53 |
MTDiscord |
<savilli> I feel that automatic crash reporting should be out-in, reports can contain a lot of private data |
12:54 |
rubenwardy |
it's complicated |
12:55 |
rubenwardy |
currently, you often need to install a new file browser to access it |
12:55 |
rubenwardy |
we could add an option to share the file with a share intent, but that would only work if the app isn't crashing |
12:55 |
rubenwardy |
actually, I'll do that now |
12:56 |
rubenwardy |
I do opt-out automatic crash reporting in my apps, I'm very careful to never log any private data. But it's easier when you do this from the start and don't have modding support |
12:56 |
|
proller joined #minetest-dev |
12:57 |
celeron55 |
i guess there could be an android launcher that handles any crashes |
12:58 |
rubenwardy |
the Java is effectively already an Android launcher |
12:58 |
rubenwardy |
you could add some UI there to handle it crashing |
12:59 |
celeron55 |
displaying the last lines from debug.txt in a copyable element would make sense |
13:21 |
|
proller joined #minetest-dev |
13:25 |
paradust |
A pattern I've seen (and like) is having a BaseException class that stores a full stack trace at the time it is created (using the backtrace API), and stores it along with the message |
13:25 |
paradust |
And a top-level handler that catches all exceptions and logs them regardless of the logging levels |
13:29 |
rubenwardy |
#12370 |
13:29 |
ShadowBot |
https://github.com/minetest/minetest/issues/12370 -- Add support for sharing debug.txt on Android by rubenwardy |
13:33 |
MTDiscord |
<MisterE> That is... very useful. You could eg text it to yourself. |
13:37 |
|
Taoki joined #minetest-dev |
15:35 |
|
Alias joined #minetest-dev |
17:45 |
rubenwardy |
another android crash https://gist.github.com/rubenwardy/8d3383974edc959f21fa14e31706fc36 |
17:46 |
rubenwardy |
https://github.com/minetest/minetest/blob/master/src/debug.cpp#L74 |
17:47 |
rubenwardy |
https://github.com/minetest/minetest/blob/stable-5/src/script/cpp_api/s_async.cpp#L209 |
17:47 |
rubenwardy |
Seems to be related, another mainmenu issue |
17:48 |
MTDiscord |
<savilli> another lua error without context ? |
17:48 |
rubenwardy |
yeah, it's the same phone model |
17:48 |
MTDiscord |
<savilli> how much RAM does it have? |
17:48 |
rubenwardy |
Redmi 9T |
17:48 |
rubenwardy |
3.8GB |
17:48 |
MTDiscord |
<savilli> should be enough |
17:49 |
MTDiscord |
<savilli> maybe they're trying to run a huge modpack |
17:49 |
MTDiscord |
<savilli> I wonder how OOM would look for android |
17:50 |
rubenwardy |
it's in the main menu |
17:50 |
rubenwardy |
both errors are in the main menu |
17:51 |
MTDiscord |
<savilli> ah, indeed |
17:54 |
MTDiscord |
<savilli> it can be literally anything |
17:54 |
MTDiscord |
<savilli> buggy CPU, corrupted flash storage, bit flip during the installation |
17:55 |
rubenwardy |
I suspect it can't read the mainmenu builtin files |
17:55 |
rubenwardy |
either a permissions issue or something wrong with the installation process |
17:55 |
rubenwardy |
perhaps they're low on storage, and it didn't install correctly |
17:55 |
rubenwardy |
I don't think we handle the low storage case at all |
17:56 |
MTDiscord |
<savilli> does it unpack itself during the installation or smth? |
17:56 |
rubenwardy |
yeah |
17:58 |
MTDiscord |
<savilli> https://github.com/minetest/minetest/blob/master/android/app/src/main/java/net/minetest/minetest/UnzipService.java there? |
17:59 |
rubenwardy |
yeah |
18:00 |
MTDiscord |
<ROllerozxa> the fact minetest android even needs to extract game data like that into the user's data directory is kinda dirty. like, it probably should be like a RUN_IN_PLACE=0 build where builtin, fonts, minetest_game and other stuff like that is kept inside the app's assets folder instead of spilling over |
18:01 |
MTDiscord |
<savilli> I guess you can't save your world to the app's assets folder |
18:01 |
rubenwardy |
the share folder can be separate to user data folder |
18:01 |
rubenwardy |
which is the case when MT is installed to /usr |
18:01 |
rubenwardy |
share is /usr/share/minetest (builtin, games/minetest_game) and user data is ~/.minetest |
18:02 |
rubenwardy |
but yeah, ideally it wouldn't have both a .zip in the app and an extracted version on disk |
18:04 |
MTDiscord |
<ROllerozxa> yeah so stuff like worlds and user-installed games and mods would still be in the data folder |
18:05 |
MTDiscord |
<savilli> looks like it's handled https://github.com/minetest/minetest/blob/51cfb57b4da8e71e39380bf5bf3e19414c779e12/android/app/src/main/java/net/minetest/minetest/MainActivity.java#L72 |
18:18 |
MTDiscord |
<savilli> oh lel, I've found the problem |
18:18 |
MTDiscord |
<savilli> it won't start the unpack next time on this condition https://github.com/minetest/minetest/blob/6901c5fae54eafb05494823b60d4e26c14b342f1/android/app/src/main/java/net/minetest/minetest/Utils.java#L31 |
18:19 |
MTDiscord |
<savilli> ofc even if the directories exist, it doesn't guarantee that all the files were unpacked |
18:22 |
rubenwardy |
it's based on both version code and that function |
18:22 |
rubenwardy |
https://github.com/minetest/minetest/blob/master/android/app/src/main/java/net/minetest/minetest/MainActivity.java#L155 |
18:22 |
|
definitelya joined #minetest-dev |
18:22 |
rubenwardy |
version code is updated with any release |
18:22 |
definitelya |
Could a core-dev open an issue on GitHub for this, please? (Wuzzy asked me to propose this there) https://forum.minetest.net/viewtopic.php?f=5&p=410567#p410567 |
18:23 |
MTDiscord |
<savilli> what's sharedPreferences? maybe they uninstalled it and installed again? |
18:25 |
rubenwardy |
shared preferences is an Android API a bit like get_mod_storage |
18:25 |
rubenwardy |
if they reinstalled then shared preferences will be reset |
18:29 |
MTDiscord |
<savilli> no idea then |
18:33 |
MTDiscord |
<savilli> is external storage smth like sd card? |
18:41 |
rubenwardy |
No |
18:41 |
rubenwardy |
It used to be, but it's just another storage location internal to the device |
18:41 |
rubenwardy |
Welcome to the Android sdk |
18:41 |
rubenwardy |
Full of random legacy stuff like that |
18:45 |
|
Miner_48er joined #minetest-dev |
18:52 |
|
proller joined #minetest-dev |
18:58 |
sfan5 |
ROllerozxa app assets are not a folder or we would have surely done that |
18:59 |
sfan5 |
they stay inside the apk on disk and you can read them using some java apis, no use for Minetest |
19:08 |
MTDiscord |
<ROllerozxa> so I assume the android asset reader inside of irrlicht doesn't work then? |
19:10 |
sfan5 |
it probably does, but how many places have you seen inside Minetest that access the file system through irrlicht? |
19:10 |
rubenwardy |
yeah, we don't want to use more Irrlicht stuff |
19:10 |
rubenwardy |
ideally, the Android app wrapper would just provide a File URI to the C++ to access as a normal filesystem |
19:11 |
rubenwardy |
this probably could just work already, but it's still a .zip file |
19:13 |
MTDiscord |
<ROllerozxa> oh my bad, I thought minetest made use of irrlicht's file IO code |
19:14 |
MTDiscord |
<ROllerozxa> ...wait, minetest doesn't use any of irrlicht's file IO code? |
19:16 |
rubenwardy |
there's probably some exceptions |
19:16 |
MTDiscord |
<ROllerozxa> yeah only thing it uses is for extracting zip files |
19:43 |
|
definitelya left #minetest-dev |
20:35 |
sfan5 |
merging #12343, #12329, #12325, #12321, #12368 in 10m |
20:36 |
ShadowBot |
https://github.com/minetest/minetest/issues/12343 -- Docs: clarify spawn_by by Zughy |
20:36 |
ShadowBot |
https://github.com/minetest/minetest/issues/12329 -- Fix no_texture.png being shown (instead of unknown_node.png) for unknown nodes w/ content ID < 125 by Wuzzy2 |
20:36 |
ShadowBot |
https://github.com/minetest/minetest/issues/12325 -- Add missing concurrency protection in logger by paradust7 |
20:36 |
ShadowBot |
https://github.com/minetest/minetest/issues/12321 -- unordered_map instead of map for MapSectors by RichardTry |
20:36 |
ShadowBot |
https://github.com/minetest/minetest/issues/12368 -- [no squash] Fix hash implementation for SerializedBlockCache by sfan5 |
21:09 |
MTDiscord |
<x2048> Pushing #12357 in 5m |
21:09 |
ShadowBot |
https://github.com/minetest/minetest/issues/12357 -- Quantize light frustum calculations by x2048 |
22:34 |
|
panwolfram joined #minetest-dev |