[Bug 38400] New: Files fail to save and open in BDCraft Cubik Lite/Pro
https://bugs.winehq.org/show_bug.cgi?id=38400 Bug ID: 38400 Summary: Files fail to save and open in BDCraft Cubik Lite/Pro Product: Wine Version: 1.7.40 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: alexjvanderpotwebdesign(a)gmail.com Distribution: --- Created attachment 51253 --> https://bugs.winehq.org/attachment.cgi?id=51253 Backtrace from "export json" attempt File saving and opening fails in BDCraft Cubik in both the Pro and Lite versions. This makes the program effectively useless in Wine as you can not import/export models. A backtrace from a save attempt is attached. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 ajvpot <alexjvanderpotwebdesign(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Debian -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 michael.becht(a)web.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michael.becht(a)web.de --- Comment #1 from michael.becht(a)web.de --- Same issue seen on 1.7.28. Also import and export fail. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man(a)post.com --- Comment #2 from super_man(a)post.com --- Attach console output while you are trying to use save. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 Pilvinen <pilvinen(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pilvinen(a)gmail.com --- Comment #3 from Pilvinen <pilvinen(a)gmail.com> --- Created attachment 54054 --> https://bugs.winehq.org/attachment.cgi?id=54054 backtrace from import crash This is an error log from import. The file operations have been broken in all versions of Wine, afaik. BDcraft Cubik works 100% except for all the file operations, ie Import/export/save/load are broken and result in a crash. Otherwise the program runs flawlessly so I'm guessing this would be trivial to fix. If someone from Wine project is willing to look into this I'm willing to help in any way I can - financially/error logs. It would be super cool if some one could look into this. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #4 from Pilvinen <pilvinen(a)gmail.com> --- Created attachment 54056 --> https://bugs.winehq.org/attachment.cgi?id=54056 Backtrace log from save crash Getting this on save: wine: Unhandled page fault on read access to 0x38003838 at address 0x38003838 (thread 0034), starting debugger... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #5 from Pilvinen <pilvinen(a)gmail.com> --- Created attachment 54295 --> https://bugs.winehq.org/attachment.cgi?id=54295 Log from import with some extra debug flags enabled Log from import crash with some extra debug flags enabled. The crash also affects the free version of the software. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #6 from Pilvinen <pilvinen(a)gmail.com> --- Created attachment 54296 --> https://bugs.winehq.org/attachment.cgi?id=54296 Log from save crash with some extra debug flags enabled Log from save crash with some extra debug flags enabled. This also affects the free demo version of the software. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 Andrew Eikum <aeikum(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum(a)codeweavers.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #7 from Andrew Eikum <aeikum(a)codeweavers.com> --- Can you provide a link to the free/demo version? Thanks. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #8 from Pilvinen <pilvinen(a)gmail.com> --- Here you go, one link to the free version: http://adf.ly/564553/bdc-cubik-lite -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #9 from Pilvinen <pilvinen(a)gmail.com> --- And in case that doesn't work here is the download page itself for the lite version: http://bdcraft.net/cubik-lite -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 Dmitry Timoshkov <dmitry(a)baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #10 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- It's a bug in the application, it works by a pure luck under Windows. The app passes a not initialized ofn->lpstrFileTitle to GetSaveFileNameW(). Basically ofn->lpstrFileTitle points to the stack approximately 428 bytes above the current stack pointer, and since Wine's GetSaveFileNameW() uses more than 4096 bytes one of internal stack frames is guaranteed to be trashed after copying file name to ofn->lpstrFileTitle. I managed to reduce stack utilization of GetSaveFileNameW() to about 2048 bytes by allocating most of temporary variables on the heap instead of stack but that doesn't help, simple dialog creation in Wine already takes more than 1024 bytes of stack. I'd say invalid or won't fix. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 Andrew Eikum <aeikum(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |http://bdcraft.net/cubik-li | |te Keywords| |download -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #11 from Bruno Jesus <00cpxxx(a)gmail.com> --- (In reply to Dmitry Timoshkov from comment #10)
It's a bug in the application, it works by a pure luck under Windows.
The app passes a not initialized ofn->lpstrFileTitle to GetSaveFileNameW(). Basically ofn->lpstrFileTitle points to the stack approximately 428 bytes above the current stack pointer, and since Wine's GetSaveFileNameW() uses more than 4096 bytes one of internal stack frames is guaranteed to be trashed after copying file name to ofn->lpstrFileTitle.
Same as bug 35200 then, at least I remember seeing a similar issue there and I attempted to create a patch [1] in order to mitigate the situation by checking how close the pointer is to the struct. But my tests on Windows led to crashes proving it would also overwrite the bad memory pointer, as you say it works by pure luck. [1] https://bugs.winehq.org/attachment.cgi?id=52622&action=diff -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #12 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Bruno Jesus from comment #11)
It's a bug in the application, it works by a pure luck under Windows.
The app passes a not initialized ofn->lpstrFileTitle to GetSaveFileNameW(). Basically ofn->lpstrFileTitle points to the stack approximately 428 bytes above the current stack pointer, and since Wine's GetSaveFileNameW() uses more than 4096 bytes one of internal stack frames is guaranteed to be trashed after copying file name to ofn->lpstrFileTitle.
Same as bug 35200 then, at least I remember seeing a similar issue there and I attempted to create a patch [1] in order to mitigate the situation by checking how close the pointer is to the struct. But my tests on Windows led to crashes proving it would also overwrite the bad memory pointer, as you say it works by pure luck.
Sounds pretty similar.
[1] https://bugs.winehq.org/attachment.cgi?id=52622&action=diff
I think that I've found a better (and easier) workaround. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #13 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Dmitry Timoshkov from comment #12)
(In reply to Bruno Jesus from comment #11)
It's a bug in the application, it works by a pure luck under Windows.
The app passes a not initialized ofn->lpstrFileTitle to GetSaveFileNameW(). Basically ofn->lpstrFileTitle points to the stack approximately 428 bytes above the current stack pointer, and since Wine's GetSaveFileNameW() uses more than 4096 bytes one of internal stack frames is guaranteed to be trashed after copying file name to ofn->lpstrFileTitle.
Same as bug 35200 then, at least I remember seeing a similar issue there and I attempted to create a patch [1] in order to mitigate the situation by checking how close the pointer is to the struct. But my tests on Windows led to crashes proving it would also overwrite the bad memory pointer, as you say it works by pure luck.
Sounds pretty similar.
The difference between these bugs is that the app in the bug 35200 calls GetSaveFileNameA while BDCraft Cubik calls GetSaveFileNameW. However both applications set ofn->lpstrFileTitle in a similar wrong way leading to stack trashing.
[1] https://bugs.winehq.org/attachment.cgi?id=52622&action=diff
I think that I've found a better (and easier) workaround.
A test shows that my workaround works also for the bug 35200 (and doesn't need any fancy checks). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry(a)baikal.ru, | |erich.e.hoover(a)wine-staging | |.com, michael(a)fds-team.de, | |sebastian(a)fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/comdlg32-lpstr | |FileTitle Status|NEW |STAGED -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69(a)gmail.com --- Comment #14 from Bruno Jesus <00cpxxx(a)gmail.com> --- *** Bug 35200 has been marked as a duplicate of this bug. *** -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 --- Comment #15 from Bruno Jesus <00cpxxx(a)gmail.com> --- Nice job, I hope to see it committed to vanilla soon. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/comdlg32-lpstr |er/patches/comdlg32-lpstrFi |FileTitle |leTitle CC| |nerv(a)dawncrow.de -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |comctl32 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38400 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|comctl32 |comdlg32 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org