Re: [Tuxpaint-devel] Hidden bug on Windows?
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: TOYAMA Shin-i. <sh...@wm...> - 2021-10-16 13:11:51
|
# Cc'ing to Vincent who kindly gave us crash reports. Hi, Pere Thank you for testing the FixOSK version. It still has crash bug here as follows; * Launch it, draw label, save and quit. * Launch it again. * Crash ;-< I have carefully reviewed mtw() in tuxpaint.c and made some changes (patch attached), which works fine here. Packages compiled as 0.9.26-5 are available in https://z1.plala.jp/tuxpaint/release/0.9.26-5/ (5!!) Could you give them final tests ? I pray that this will work out this time. Hi Vincent! Although you reported me that you could run official release 0.9.26 by removing user's directory and re-installing it, it surly has problems regarding onscreen keyboard and labels. Now I believe we are almost close to the final solution. Please wait a little more until next bugfix version released. Sorry for your inconvenience. Hi Bill, Please release 0.9.26-5 if Pere would give us a positive report and you don't see any problem in onscreen_keyboard.c and mtw() in tuxpaint.c. Then, I will commit the changes to the latest git repo. Thanks in advance! -- shin1 Pere Pujal i Carabantes wrote in <e5a...@gm...> >Hi Shin-ichi > >El ds. 16 de 10 de 2021 a les 16:57 +0900, en/na TOYAMA Shin-ichi va escriure: >> Hi, >> >> mbstowcs_s() seemed to improve the behavior of AltGr modifire, but >> the composer did not work correctly. >> >> So, I tried to use another Windows library function >> MultiByteToWideChar(), >> >> >https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar >> >> Then, I think the onscreen keyboard now works quickly, correctly, >> and does not crash! (A patch attached) > >I've tried to apply to current git master and it failed to apply, >then I checked out 527fc27a and it applied fine. >Compiled it whith make bdist-win32 and it runs fine, no crashes >at all, even opening a file with labels :) > >> >> Although it still crashes when opening a drawing that contains >> label(s), could you please confirm if the onscreen keyboard works >> perfectly in the mean time? >> >> https://z1.plala.jp/tuxpaint/testing/windows10/ > >Installed the tuxpaint-0.9.26-windows-x86_64-FixOSK-installer.exe >The onscreen keyboard looks fine :) >And more, it seems to not need the compatibility to W8 setted, >I have to reboot W10 to make sure but looks great :) > >Thanks >Pere > >> >> Step by step .... >> >> -- >> Shin-ichi >> >> TOYAMA Shin-ichi wrote in <616a170e.4969%sh...@wm...> >> > Thanks Pere! >> > >> > Then I should get all the mtw() staff back and dig into the >> > deep. >> > >> > I will focus on Onscreen Keyboard at first. >> > I am wondering if it might be worth trying to directly use >> > mbstowcs_s() on Windows to avoid using iconv(). >> > >> > >https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l?view=msvc-160 >> > >> > Hrm... >> > >> > Pere Pujal i Carabantes wrote in >> > <b7c...@gm...> >> > > Hi, >> > > >> > > El dv. 15 de 10 de 2021 a les 13:43 +0900, en/na TOYAMA Shin-ichi va >escriure: >> > > > Hi, >> > > > >> > > > I strongly hope this will be a final report. >> > > > >> > > > Here is a brief (long?) history; >> > > > >> > > > 1) OSK crash regarding libiconv reported in, >> > > > https://sourceforge.net/p/tuxpaint/bugs/235/ >> > > > 2) Win32 specific codes mtw() using iconv(), alternative to >> > > > mbstowcs(), were removed and once seemed to work fine. >> > > > 3) Found that it still crash only on Windows10 and later. >> > > > 4) Trial to sepalate mtw() to single lib failed. >> > > > 5) Found that it crash not when using OSK, but when loading >> > > > labels embedded in png drowings. >> > > > >> > > > At this point, I remember that Bill mentiond that iconv() is >> > > > also used in do_png_embed_data() in bugs/235 above. >> > > > >> > > > Then, I also removed "#ifdef WIN32" part in this function, and >> > > > it seems to work quite fine! >> > > > >> > > > Patch to 0.9.26 is attached and binary packages are available >> > > > from, >> > > > >> > > > https://z1.plala.jp/tuxpaint/release/0.9.26-4/ >> > > >> > > I am sorry to say it still doesn't work fine with labels, >> > > it seems to work fine if the drawing stays in Windows, but when you >> > > import/export a drawing between Linux and Windows then there are >> > > problems. >> > > >> > > I've made a drawing in Linux (800x600) with all the strings duplicated, >> > > once as text and again as labels, you could get it at >> > > >https://provant.freeddns.org/pere/public_html/developing/20211015/20211015205933.png >> > > >> > > See how only the first label string, made with the plain abcd row >> > > of the onscreen keyboard is displayed in 0.9.26-4, instead 0.9.26 >> > > displays and edits all labels correctly(both with compatibility >> > > mode activated in W10). >> > > >> > > >> > > >> > > > By the way, I am quite at a loss what for those WIN32 specific >> > > > code were needed, because patched code also compiled on the old >> > > > mingw/msys environment and works fine on Windows XP just by >> > > > defining lacking strtok_r() in onscreen_keyboard.c as follows. >> > > > >> > > > #define strtok_r(line, delim, pointer) strtok(line, delim) >> > > > >> > > > I am not sure but those code might have been tweaked when >> > > > compiling in older build environment. >> > > >> > > I really don't know, I remember struggling and testing tons of things >> > > until found something that seemed to make labels compatible >> > > between Linux and Windows, not sure if we are talking about the same code. >> > > >> > > >> > > Thanks >> > > Pere >> > > >> > > >> > > > Anyway, I think very carefull review and tests are required >> > > > before releasing them. >> > > > >> > > > Hope your help! >> > > > >> > > > Thanks. >> > > > >> > > > >> > > > TOYAMA Shin-ichi wrote in <6168e3c0.4965%sh...@wm...> >> > > > > Just a brief report. >> > > > > >> > > > > Deleting mtw() seems to be OK. >> > > > > >> > > > > I found crash when loading drowing with labels occur in other >> > > > > part. >> > > > > >> > > > > ------------------------------------------------------------ >> > > > > Thread 1 received signal SIGSEGV, Segmentation fault. >> > > > > 0x00007ffd86ab7f09 in msvcrt!memmove () from >C:\WINDOWS\System32\msvcrt.dll >> > > > > (gdb) backtrace >> > > > > #0 0x00007ffd86ab7f09 in msvcrt!memmove () >> > > > > from C:\WINDOWS\System32\msvcrt.dll >> > > > > #1 0x00007ff6e502743e in load_embedded_data () >> > > > > #2 0x00007ff6e50281f2 in load_current () >> > > > > #3 0x00007ff6e5036842 in SDL_main () >> > > > > #4 0x00007ff6e504461b in console_main () >> > > > > #5 0x00007ff6e50446f8 in WinMain () >> > > > > #6 0x00007ff6e50013b1 in __tmainCRTStartup () >> > > > > at >C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:321 >> > > > > #7 0x00007ff6e50014c6 in WinMainCRTStartup () >> > > > > at >C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:176 >> > > > > ------------------------------------------------------------ >> > > > > >> > > > > Thanks. >> > > > > >> > > > > TOYAMA Shin-ichi wrote in <61681fa6.4962%sh...@wm...> >> > > > > > I was wrong again ;-< >> > > > > > >> > > > > > It crash when re-opening drawing with labels..... >> > > > > > >> > > > > > Sorry for the mess. >> > > > > > >> > > > > > >> > > > > > TOYAMA Shin-ichi wrote in <61681264.4961%sh...@wm...> >> > > > > > > Hi, >> > > > > > > >> > > > > > > It is becoming clear. >> > > > > > > >> > > > > > > I suppose it was wrong to delete WIN32 specific code in >> > > > > > > load_info_about_label_surface() function for 0.9.26-2. >> > > > > > > >> > > > > > > Pere Pujal i Carabantes wrote in >> > > > > > > <693...@gm...> >> > > > > > > > Unfortunately msys mbstowcs() seems not work outside ascii :( >> > > > > > > >> > > > > > > Because I am not so sure about this, I removed mtw() from >> > > > > > > onscreen_keyboard.c and tuxpaint.c again and just replaced mtw() >> > > > > > > in the label function with mbstowcs() not deleting all the >> > > > > > > windows specific part. >> > > > > > > >> > > > > > > It seems to work fine for me. >> > > > > > > No crash, rapid osk layout change and no problem when using >labels >> > > > > > > and osk with Japanese characters! >> > > > > > > >> > > > > > > Could you please give a try to 0.9.26-3 packages in >> > > > > > > >> > > > > > > https://z1.plala.jp/tuxpaint/release/0.9.26-3/ >> > > > > > > >> > > > > > > If they are fine also for you, I will commit the changes to the >> > > > > > > git repo. >> > > > > > > >> > > > > > > Thanks! >> > > > >_______________________________________________ >Tuxpaint-devel mailing list >Tux...@li... >https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel -- TOYAMA Shin-ichi mailto:sh...@wm... |