[Bug 60507] New: ST Visual Develop 4.3.12 crashes opening Project Settings
http://bugs.winehq.org/show_bug.cgi?id=60507 Bug ID: 60507 Summary: ST Visual Develop 4.3.12 crashes opening Project Settings Product: Wine Version: 11.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Keywords: testcase Severity: normal Priority: P2 Component: comctl32 Assignee: wine-bugs@list.winehq.org Reporter: mpm1107.dev@gmail.com Target Milestone: --- Distribution: Ubuntu Created attachment 82364 --> http://bugs.winehq.org/attachment.cgi?id=82364 Testcase program ST Visual Develop (STVD), STMicroelectronics' free IDE for ST7/STM8 microcontrollers, crashes as soon as Project -> Settings is opened, with any project loaded, including the examples that ship with it. Bug 36999 looks like it might be the same crash (closed as abandoned in 2014). Setup: wine-11.19 built from the release tag, Ubuntu 24.04 x86_64, clean prefix. STVD's installer says "Failed installing MFC redistributables" and STVD then can't start (MFC80.DLL missing), so I also ran Microsoft's VC++ 2005 SP1 redistributable (vcredist_x86.EXE). Nothing else was installed, no DLL overrides. Ubuntu's wine 9.0 crashes the same way. STVD is free from STMicroelectronics (STVD-ST7); sadly not directly accessible, the download link is e-mailed after providing an email: stvd-st7.zip sha1 f4c1b44dcee856295e1676e27fa66181079a28d0 sttoolset_pack42.exe sha1 bb6a9427bdac09c5307f14b4eb2b2730b59adfb9 Steps to reproduce: 1. Install STVD (sttoolset_pack42.exe, default options) and the VC++ 2005 redistributable. 2. Run C:\Program Files (x86)\STMicroelectronics\st_toolset\stvd\stvdebug.exe 3. File -> Open Workspace -> ...\st_toolset\stvd\Example\adc\ADC.stw 4. Project -> Settings Actual result: STVD crashes. Terminal output and the crash report are attached. Expected result: the Project Settings dialog opens, like on Windows. I looked into it a bit. The settings dialog is a property sheet. STVD removes its only page and then adds the real pages with PSM_ADDPAGE. Wine activates the first page as soon as it is added to the empty sheet, before STVD has set it up, and STVD crashes in that page's PSN_SETACTIVE handler. (With wine 9.0 it crashes right there; on 11.19 that exception is ignored and STVD dies a bit later in mfc80.dll.) The activation comes from these lines at the end of PROPSHEET_InsertPage in dlls/comctl32/propsheet.c: /* If it is the only page - show it */ if (psInfo->nPages == 1) PROPSHEET_SetCurSel(hwndDlg, 0, 1, 0); Removing that if statement fixed STVD completely for me, and the comctl32 propsheet tests still pass. I'm sure it's there for a reason, though, so I didn't want to go making a PR on my own, I have basically no experience with the wine codebase in general and what the correct fix is here. One thing I did notice with it removed: a sheet that removes its page and adds a new one in PSCB_INITIALIZED comes up blank, where Windows shows the new page. The attached (admittedly fully vibecoded, but I did my best to manually verify it makes at least some sense) test program checks this without STVD and shows the differing behavior between Windows and Wine. On Windows 11 the page added to the empty sheet isn't activated until PSM_SETCURSEL. Results from Windows 11 and Wine (with and without the lines) are included. -- 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)
-
WineHQ Bugzilla