[Bug 38924] New: Crash on copy/paste running Tapps2
https://bugs.winehq.org/show_bug.cgi?id=38924 Bug ID: 38924 Summary: Crash on copy/paste running Tapps2 Product: Wine Version: 1.7.47 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: thomas(a)fehige.de Distribution: --- Created attachment 51858 --> https://bugs.winehq.org/attachment.cgi?id=51858 Wine crash report I'm trying to run Tapps 2 on wine version 1.7.44. My OS is Xubuntu 15.04, 64-bit. It is a graphic programming tool for a series of controllers for heating, solar heat, warm water and similar that are made by the Austrian company "Technische Alternative". The programme can be downloaded from their website at http://www.ta.co.at/de/download/software/tapps-2.html . I'm using the German language version. The programme seems to run fine, apart from the one point: Whenever I try to copy/paste an Object, wine crashes as soon as I select "paste" from the menu or type Ctrl-V on the keybord. The problem persists in wine 1.7.47; cf. discussion on https://forum.winehq.org/viewtopic.php?f=8&t=24953&sid=cea1d4583ec853e13e850... . Attached is wine's crash report. Thank You -- Thomas -- 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=38924 Rosanne DiMesio <dimesio(a)earthlink.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW URL| |http://ta.co.at/en/assets/D | |ownloads/Software/TAPPS2/Ta | |pps2_1.04_Setup.zip Ever confirmed|0 |1 --- Comment #1 from Rosanne DiMesio <dimesio(a)earthlink.net> --- Confirming. The English version also exhibits the problem. I tested in a 32 bit wineprefix, and it crashes the same way. -- 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=38924 --- Comment #2 from Thomas Fehige <thomas(a)fehige.de> --- Re 32-bit: I failed to *install* the programme in a 32 bit wineprefix (win 98). The installer gave an error message saying it needed a different Windows version. Now I installed it in an XP wineprefix and then ran it in a win 89 wineprefix, and indeed, the crash at copy--paste is the same. FWIW I run it on a Win 7 machine without problems. Only I'd like to turn that into an Xubuntu machine too, sooner rather than later, and this is one programme I can't do without. Cheers -- Thomas -- 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=38924 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man(a)post.com --- Comment #3 from super_man(a)post.com --- I downloaded the english version and it has the same issue mentioned here. No visible console output. Need to attach some debug channel. wine 1.7.53 -- 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=38924 --- Comment #4 from super_man(a)post.com --- Still valid 1.9.8-git -- 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=38924 Stephan Graf <stephan.graf(a)ta.co.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stephan.graf(a)ta.co.at --- Comment #5 from Stephan Graf <stephan.graf(a)ta.co.at> --- I'm a developer of the Tapps team at Technische Alternative. Tried to find the reason for the crash, but can't fix it in Tapps. Tapps is based on wxWidgets and we use the built-in copy & paste functionality. I was able to narrow it down to the custom data format. Pasting plain text into Tapps works, but no custom formats. This is not a Tapps specific issue, I reproduced it in wxWidgets sample "dnd". Same behaviour there, standard format works (text, bitmap), but not the custom format (shape). I'd say, custom copy & paste won't work in any wxWidgets based software in wine. Latest Tapps download link: https://www.ta.co.at/fileadmin/Downloads/Software/TAPPS2/Tapps2_1.10_Setup.z... -- 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=38924 --- Comment #6 from Stephan Graf <stephan.graf(a)ta.co.at> --- Tapps2 is now available as native Linux app: https://www.ta.co.at/en/downloads/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=38924 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL|http://ta.co.at/en/assets/D |http://web.archive.org/web/ |ownloads/Software/TAPPS2/Ta |20170722101542/https://www. |pps2_1.04_Setup.zip |ta.co.at/fileadmin/Download | |s/Software/TAPPS2/Tapps2_1. | |10_Setup.zip CC| |damjan.jov(a)gmail.com --- Comment #7 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- Still happens in recent Git when I paste text into it, then copy the text, and try paste it again. In a WINEDEBUG="+clipboard" log, the last function called is CloseClipboard(). Either it crashes later in that function, or after return. -- 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=38924 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source --- Comment #8 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- (In reply to Stephan Graf from comment #5)
This is not a Tapps specific issue, I reproduced it in wxWidgets sample "dnd". Same behaviour there, standard format works (text, bitmap), but not the custom format (shape). I'd say, custom copy & paste won't work in any wxWidgets based software in wine.
That is disturbing to hear! I'll have to check this "dnd" sample code in wxWidgets when I have some time. At least it makes it a dogfood bug. Adding "source" keyword. -- 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=38924 --- Comment #9 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- (In reply to Damjan Jovanovic from comment #8)
(In reply to Stephan Graf from comment #5)
This is not a Tapps specific issue, I reproduced it in wxWidgets sample "dnd". Same behaviour there, standard format works (text, bitmap), but not the custom format (shape). I'd say, custom copy & paste won't work in any wxWidgets based software in wine.
That is disturbing to hear!
I'll have to check this "dnd" sample code in wxWidgets when I have some time. At least it makes it a dogfood bug. Adding "source" keyword.
To reproduce with wxWidgets sample code: Install the mingw-w64 build environment: 1.1 Download win-builds from http://win-builds.org/ 1.2 wine cmd 1.3 set DISPLAY= (if DISPLAY is set, win-builds tries to use X11 and fails) 1.4 Install make, g++, gcc, etc. under C:\mingw-w64. It will give an error at the end about DeviceIoControl() failing to create reparse points. Ignore it and Alt+F4. Get and build wxWidgets: 2.1 git clone https://github.com/wxWidgets/wxWidgets.git 2.2 git checkout v3.1.0 2.3 cd build/msw 2.4 wine cmd 2.5 set PATH=C:\mingw-w64\bin;%PATH% 2.6 mingw32-make -f makefile.gcc (long wait) Build the DND sample code: 3.1 Go to the samples/dnd subdirectory of where you cloned the wxwidgets git 3.2 Edit makefile.gcc and add "-loleacc" at the end of the command that builds $(OBJS)\dnd.exe. 3.3 mingw32-make -f makefile.gcc Run the DND sample: 4.1 Go to the gcc_mswud/ subdirectory of samples/dnd. 4.2 Run dnd.exe 4.3 A screen will open with various clipboard and drag-and-drop tests. They all work. The problem is on the custom drag and drag test that's in a separate screen, which you get to by choosing "File" -> "New Frame". 4.4 "Shape" -> "New default shape" to generate an ellipse. 4.5 Try to drag and drop the ellipse. 4.6 When you drop it -> CRASH. -- 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=38924 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |ntdll --- Comment #10 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- The chain of events looks something like this: 1.0 DnDShapeDropTarget::OnData() [application] 2.0 wxDropTarget::GetData() 3.0 wxIDataObject::GetData() 4.0 wxIDataObject::GetDataHere() 5.0 DnDShapeDataObject::GetDataHere() [application] 6.0 DnDShape::GetDataHere() [application] 3.1 wxIDataObject::SetData() 7.0 pBuf = GetSizeFromBuffer(pBuf, size, format) 8.0 wxDataObject::GetSizeFromBuffer(pbuf, size, format) 9.0 ::HeapSize(::GetProcessHeap(), 0, pBuf); 7.1 DnDShapeDataObject::SetData(pBuf) [application] In step 9.0 wxWidgets tries to determine the size of a memory area using HeapSize(). HeapSize() fails with GetLastError()=87 (ERROR_INVALID_PARAMETER). Step 8.0 wxDataObject::GetSizeFromBuffer() thus returns NULL, setting pBuf to NULL. The application's DnDShapeDataObject::SetData() in 7.1 thus receives a NULL pointer. The application tries to access the NULL pointer -> crash. Why does HeapSize() fail? It's called on pBuf. What does pBuf point to? const void *pBuf = GlobalLock(pmedium->hGlobal); So pBuf actually points to global memory, not GetProcessHeap() heap memory. Using HeapSize() on memory returned from GlobalLock() apparently works on Windows, but fails on Wine and causes the crash. If I patch wxWidgets to call GlobalSize() instead of HeapSize(), the drag and drop no longer crashes. However wxWidgets dates back to 1992, we can't patch 27 years worth of wxWidgets applications out in the field, especially those that have linked to wxWidgets statically. Wine should support calling HeapSize() on pointers returned from GlobalLock(), like Windows does. -- 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=38924 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Crash on copy/paste running |HeapSize(GetProcessHeap(), |Tapps2 |0, GlobalLock(hGlobal)) | |must succeed [wxWidgets | |samples, Tapps2] -- 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=38924 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frakswe(a)gmail.com --- Comment #11 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- *** Bug 44832 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=38924 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major --- Comment #12 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- Affects an entire framework - wxWidgets. Affects sample code in wxWidgets. Affects at least 2 apps we know about: Tapps 2 and DirMaster. Will affect every wxWidgets app that uses custom data formats in drag and drop. Crasher. Raising severity to MAJOR. -- 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=38924 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|HeapSize(GetProcessHeap(), |HeapSize(GetProcessHeap(), |0, GlobalLock(hGlobal)) |0, GlobalLock(hGlobal)) |must succeed [wxWidgets |must succeed [wxWidgets |samples, Tapps2] |samples, Tapps2, DirMaster] -- 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=38924 --- Comment #13 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- Created attachment 65866 --> https://bugs.winehq.org/attachment.cgi?id=65866 [PATCH] kernel32: implement Windows NT style GMEM_MOVEABLE/LMEM_MOVEABLE memory This was my patch sent to wine-devel(a). While it works, it was rejected. IRC discussion: Nov 20 19:37:46 <dacha> can i please have some feedback on why https://source.winehq.org/patches/data/173892 was rejected? am i not allowed to add wine-specific exports to kernelbase.dll? Nov 20 19:40:59 <nsivov> dacha, there should be a good reason to add a new one Nov 20 20:00:19 <nsivov> dacha, if I was doing it, I'd rather move all related functions to kernelbase Nov 20 20:00:34 <nsivov> this patch seems to do more that one thing though Nov 20 20:01:18 <dacha> nsivov: thank you Nov 20 20:01:41 <zf> I think that everything that belongs in kernelbase is already there Nov 20 20:01:49 <zf> kernelbase only has exports for some global/local functions Nov 20 20:02:21 <dacha> so then move everything back to kernel32 and redirect from kernelbase? Nov 20 20:02:27 <dacha> ;) Nov 20 20:02:27 <nsivov> no Nov 20 20:03:15 <nsivov> ideal solution is to fix it without additional exports and without moving more that should be Nov 20 20:03:37 <cdavis5x> Windows somehow makes this work, so it should be possible (we couldn't understand/agree on how Windows did it) -- 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=38924 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair(a)hotmail.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=38924 --- Comment #14 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- Hi Alistair, please can you add this patch to wine-staging? It was already submitted and rejected, see earlier comments. It requires understanding how Windows implements global/local memory, something that is undocumented and likely to take a while. Another developer was found on #winehackers who was also investigating this bug without knowing it, so please put it into wine-staging so it doesn't get lost and work doesn't get duplicated... -- 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=38924 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch -- 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=38924 --- Comment #15 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Damjan Jovanovic from comment #14)
Hi Alistair, please can you add this patch to wine-staging?
This patch is a dirty hack and doesn't match even mitigated wine-staging code quality requirements IMO. Please don't make wine-staging a playground for such hackish solutions. -- 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=38924 --- Comment #16 from Stephan Graf <stephan.graf(a)ta.co.at> --- Issue was fixes in wxWidgets: https://trac.wxwidgets.org/ticket/18887 I've tested with Tapps, problem is solved there. Bugfix should be included in upcoming 3.1.5 release of wxWidgets. This of course will not help older applications but newly compiled versions will be fine. Thanks to Damjan Jovanovic for investigating and Vadim Zeitlin for fixing. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=38924 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |660332326e474b16fb2cb09605e | |ed6cdd212ecdd CC| |z.figura12(a)gmail.com Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #17 from Zeb Figura <z.figura12(a)gmail.com> --- In theory this should be fixed after 660332326e474b16fb2cb09605eed6cdd212ecdd (part of Wine 7.11), and I can confirm that copy/pasting objects works in Tapps. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=38924 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #18 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 11.0-rc1. -- 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 (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla