View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016747 | MMW v4 | Framework: Scripts/Extensions | public | 2020-06-23 11:15 | 2020-06-23 11:15 |
Reporter | zvezdan | Assigned To | |||
Priority | none | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0016747: Skinned program with two modal forms crash and other problems related to hibernation |switching user/color depth | ||||
Description | There are several problems that I have discovered recently with the skinned version of the program on Vista and Win7 (both tested), and probably on newer versions of Windows as well, after (resuming from hibernation | switching system user | switching the system color depth) if dialog boxes are left opened before the mentioned condition. (The latest mentioned condition with the color switch is easiest to use for test, e.g toggle from 32-bit to 16-bit display and back.) It seems nothing of this is happening on Win XP. 1. The fist problem manifests as a crash of the program when you leave opened second modal form (even a simple SDB.MessageBox) that is previously opened from the first modal form; the test code included. 2. The second problem that is manifesting after the mentioned conditions (hibernation or anything else) causes the modal form to become modeless. It is happening even with your own dialog boxes, e.g. Properties from the Edit menu is modal, but after hibernation it will become modeless. You could even change its size and you will get the overlapped/truncated controls, although this dialog is not initially resizable. If you close it and open it again, it will be modal with fixed size as it should. 3. Sometimes, without any regularity, after the mentioned conditions such dialog box could be displayed behind the main program window, which is a known problem that is happening with the program since its beginning unrelated to this problem. This should not happen ever, but your application is the only Windows program with such problem that I know. This was a serious problem that you never considered to resolve. 4. The last problem with the mentioned conditions, if you leave the form created by a script with web ActiveX control, like your own Stat script, that control will become blank and in some scripts it could even cause the error if user choose a command that affects the content of that ActiveX control. For example, you could try Magic Nodes with the opened Manage Masks dialog box; after hibernation you will see a blank table of masks and if you click on the File radio button you will get the error. Or, you could try SQL Viewer; leave it open and after hibernation you will get the blank table, and if you type e.g. "SELECT 1" into the edit box and press "Run Select Query" you will get the error. It seems this last problem depends on the number of opened instances of the program, i.e. it is more likely to happen if you have just one instance opened, but on another side, if you have several instances opened it will take ages to get restored display of their windows after the mentioned conditions. Well, I don't know why I mentioning all of this when you gave up from MM4 long time ago. | ||||
Steps To Reproduce | Option Explicit Sub OnStartUp() Dim oMenuItem Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_File, 0, 0) With oMenuItem .Caption = "Test switching user" .OnClickFunc = "Test" .UseScript = Script.ScriptPath End With End Sub Sub Test(oMenuItem) Dim oForm Dim lblTest Dim btnClose Dim btnDialog Dim btnMessage Set oForm = SDB.UI.NewForm With oForm .Common.SetRect 100, 100, 350, 140 .BorderStyle = 3 .FormPosition = 4 .Caption = oMenuItem.Caption End With Set lblTest = SDB.UI.NewLabel(oForm) With lblTest .Common.SetRect 10, 10, 300, 17 .Caption = "First dialog" End With Set btnMessage = SDB.UI.NewButton(oForm) With btnMessage .Caption = SDB.Localize("&Message box") .Common.SetRect 20, 70, 90, 25 End With Script.RegisterEvent btnMessage, "OnClick", "Message" Set btnDialog = SDB.UI.NewButton(oForm) With btnDialog .Caption = SDB.Localize("&New dialog box") .Common.SetRect 120, 70, 90, 25 End With Script.RegisterEvent btnDialog, "OnClick", "NewDialog" Set btnClose = SDB.UI.NewButton(oForm) With btnClose .Caption = SDB.Localize("&Close") .Common.SetRect 220, 70, 90, 25 .Cancel = True .ModalResult = 2 End With oForm.showModal End Sub Sub NewDialog() Dim oForm Dim lblTest Dim btnClose Set oForm = SDB.UI.NewForm With oForm .Common.SetRect 100, 50, 350, 140 .BorderStyle = 3 '.FormPosition = 4 .Caption = "Second dialog" End With Set lblTest = SDB.UI.NewLabel(oForm) With lblTest .Common.SetRect 10, 10, 300, 17 .Caption = "Go to hibernate or switch user" End With Set btnClose = SDB.UI.NewButton(oForm) With btnClose .Caption = SDB.Localize("&Close") .Common.SetRect 220, 70, 90, 25 .Cancel = True .ModalResult = 2 End With oForm.showModal End Sub Sub Message() SDB.MessageBox "Go to hibernate or switch user", mtInformation, Array(mbOk) End Sub | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||