Page 1 of 1

Taking screenshot (sometimes) crashes client [Linux client 4.7.2]

Posted: Tue Mar 10, 2020 3:40 pm
by jezek
Client: TomeNET 4.7.2 for Linux (amd64), complete (sound and music pack included) (147 MB)

Steps to reproduce:
0) Loged in, standing int town.
1) Take a screenshot (^T)

Expected behaviour:
Message about screenshot taken, game continues.

Current behaviour:
Client crashes with no message

Note: I tink I was able to take screenshot while in some menu, it always crashed in game.

Temporary solution: Don't take screenshots, put any other macro on ^T key to avoid accidental triggering.

Re: Taking screenshot (sometimes) crashes client [Linux client 4.7.2]

Posted: Sun Mar 15, 2020 5:24 pm
by jezek

Re: Taking screenshot (sometimes) crashes client [Linux client 4.7.2]

Posted: Tue Mar 24, 2020 12:05 pm
by mikaelh
I think you meant to link this commit: https://github.com/jezek/tomenet/commit ... 1bcdc1d2c0

Some of the changes are a bit unnecessary. color_table variable doesn't really need to be renamed. The actual bug seems to be the use of sizeof. You should use the N_ELEMENTS macro from common/defines.h instead of writing it out as sizeof(str_color_table)/sizeof(str_color_table[0]). I think only two lines need to be changed. You can add a comment somewhere if you like.

Re: Taking screenshot (sometimes) crashes client [Linux client 4.7.2]

Posted: Tue Mar 24, 2020 4:03 pm
by jezek
Yes, you are right, I misspasted the link... and you are also right about the variable name change + macro stuff (didn't know bout the macro)... there were really only two line changes with the macro usage...

sorry, all my fault due to noobiness ;) this commit will do it ;)
https://github.com/jezek/tomenet-src/co ... ff=unified

Re: Taking screenshot (sometimes) crashes client [Linux client 4.7.2]

Posted: Wed Mar 25, 2020 12:44 pm
by mikaelh
This one has now also been cherry-picked. Thanks for the fix.