View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033772 | Lazarus | Packages | public | 2018-05-22 13:58 | 2021-02-26 21:56 |
Reporter | Martin Friebe | Assigned To | Michl | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Platform | 64bit Intel | OS | win 10 | ||
Product Version | 1.9 (SVN) | ||||
Summary | 0033772: crash with sparta form editor | ||||
Description | Docked IDE (SourceEdit, MenuBar, Messages all docked together) Switching to the form editor (and working on the form) results in access violations. | ||||
Steps To Reproduce | Open a new project/application and then just switch to the form editor (click the button or use F12). This always give an access violation. | ||||
Additional Information | The IDE is compiled with fpc 3.0.4 for 64 bit IDE build opts: -gh -g -gl -gw -godwarfsets -CX -XX -Xs -gt -O2 -WC -Ct -Co -Ci -Cr -gh may be essential to get the issue. At the line, follow the properties "Left","Top",... they accesses DesignedForm, and f.FDesignedForm = DEADBEAF The attached xml file can be imported into the "debug history" window (open project ide/lazarus). It contains the stacktrace, and some watch values for the top 3 frames. (select/double click the entry in the history window after import, open stack and watch window) #0 ?? at :0 0000001 ONDESIGNREFRESHPROPERTYVALUES(0x68231b0) at source\sparta_edtu_main.pas:239 0000002 SETROOT(0x68231b0, 0x0) at source\sparta_edtu_main.pas:158 0000003 SETDESIGNEDFORM(0x68231b0, 0x1647d5b0) at source\sparta_resizer.pas:65 0000004 ?? at :0 0000005 RTTI_$SPARTA_DESIGNEDFORM_$$_IDESIGNEDFORMIDE at :0 0000006 ?? at :0 0000007 ?? at :0 0000008 SETDESIGNFORMDATA(0x68231b0, 0x1647d5b0) at source\sparta_mainide.pas:633 0000009 SETACTIVEDESIGNFORMDATA(0x68231b0, 0x1647d5b0) at source\sparta_mainide.pas:701 0000010 TABCHANGE(0x1013ac910, 0x73d6ed0) at source\sparta_mainide.pas:1437 0000011 DOCHANGE(0x0) at include\customnotebook.inc:335 0000012 CHANGE(0x68231b0) at include\customnotebook.inc:1046 0000013 ?? at :0 0000014 ?? at :0 0000015 CNNOTIFY(0x68231b0, {MSG = 373801520, UNUSEDMSG = 0, IDCTRL = 0, NMHDR = 0x100e84718, RESULT = 0}) at include\customnotebook.inc:1109 0000016 COMCTRLS$_$TCUSTOMTABCONTROL_$__$$_INTERNALSETPAGEINDEX$LONGINT at :0 0000017 ?? at :0 0000018 ?? at :0 Installed packages (from conf staticpackages.inc) anchordockpkg, filefindlaz, pascalscript, sparta_mdi, anchordockingdsgn, customdrawn, dbflaz, editormacroscript, exploreidemenu, externhelp, fpcunitide, idefilebrowser, ideinspector, jcfidelazarus, jumptoimplementation, lazc, lazcustforms, lazsvnpkg, leakview, sparta_dockedformeditor, sparta_toolsapi, sqldblaz, allsyneditdsgn, sparta_smartformeditor, | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
LazTarget | - | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
|
|
|
Since when does the "smart" form editor package work at all in the first place? |
|
Martin has also sparta_smartformeditor installed. Apparently sparta_smartformeditor depends on sparta_dockedformeditor. What is their difference anyway? The related issue has only sparta_dockedformeditor installed. The backtrace is different but may be caused by the same memory management issue. |
|
"sparta_smartformeditor" has an old problem. After installation sparta_smartformeditor Lazarus simply stops starting (Windows 7/10). An error appears in the log file: TApplication.HandleException: EObjectCheck Object reference is Nil Stack trace: $010C405B SPARTA_FAKEFORMBACKGROUND_$$_init$, line 430 of source/sparta_fakeformbackground.pas $00411CA4 Presumably the reason for the uninitialized variable "OnUserInputHandler" in smartformeditor/source/sparta_fakeformbackground.pas is enough to add to the beginning of the initialization section: OnUserInputHandler : = TOnUserInputHandler.Create; and at the end of the finalization section is: OnUserInputHandler.Free; Lazarus starts normally, but the form editor does not work properly. When switching to the form editor, an error occurs: TApplication.HandleException: EAccessViolation Access violation Stack trace: $10BA2C9A $010C4784 SETROOT, line 158 of source/sparta_edtu_main.pas $00FC00BA SETDESIGNEDFORM, line 65 of source/sparta_resizer.pas $00FCECC3 SETDESIGNFORMDATA, line 504 of source/sparta_mainide.pas $00FCEF1A SETACTIVEDESIGNFORMDATA, line 567 of source/sparta_mainide.pas $00FD11BD TABCHANGE, line 1155 of source/sparta_mainide.pas ... Change the contents of lines 235-239 (procedure TedtuMain.OnDesignRefreshPropertyValues) of "sparta_edtu_main.pas": f := TFakeForm(FRoot); //pInfo. ...... .... f.Height]); to pInfo.Caption := Format('%s (X: %d Y: %d W: %d H: %d)', [TForm(FRoot).Name, TForm(FRoot).Left, TForm(FRoot).Top, TForm(FRoot).Width, TForm(FRoot).Height]); At the same time, we delete the variable "f: TFakeForm" from this procedure, it is no longer needed. Corrected files are in the archive "sparta_sfe_source.zip". But unfortunately in the latest version of Lazarus "smartformeditor" and "dockedformeditor" do not work correctly. If you resize the form, then it breaks. To simplify the search for errors, it is convenient to use the Lazarus log file, for this you need to run it with the key --debug-log = laz_dbg_log.txt. In this case, also compile Lazarus in debug mode, then the log file will be human-readable. |
|
Don't use Sparta_SmartFormEditor. It's not maintained anymore and will be removed from Lazarus source in next major release. |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-05-22 13:58 | Martin Friebe | New Issue | |
2018-05-22 13:58 | Martin Friebe | File Added: spartacrash.xml | |
2018-05-22 14:02 | Martin Friebe | Additional Information Updated | View Revisions |
2018-05-24 23:08 | Akira1364 | Note Added: 0108518 | |
2019-10-08 19:26 | Juha Manninen | Relationship added | related to 0036151 |
2019-10-08 19:30 | Juha Manninen | Note Added: 0118427 | |
2019-10-08 21:16 | Juha Manninen | Note Edited: 0118427 | View Revisions |
2019-11-29 13:36 | Juha Manninen | Relationship added | related to 0036375 |
2020-01-16 19:37 | K155LA3 | Note Added: 0120485 | |
2020-01-16 19:38 | K155LA3 | Note Edited: 0120485 | View Revisions |
2021-02-26 21:56 | Michl | Assigned To | => Michl |
2021-02-26 21:56 | Michl | Status | new => resolved |
2021-02-26 21:56 | Michl | Resolution | open => won't fix |
2021-02-26 21:56 | Michl | Widgetset | Win32/Win64 => Win32/Win64 |
2021-02-26 21:56 | Michl | Note Added: 0129180 |