View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0028930 | Lazarus | IDE | public | 2015-10-29 17:21 | 2015-11-12 06:03 |
Reporter | Cyrax | Assigned To | Ondrej Pokorny | ||
Priority | normal | Severity | minor | Reproducibility | random |
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | Server 2008 R2 | OS Version | 6.1.7601 (SP1) |
Product Version | 1.5 (SVN) | Product Build | r50198 | ||
Target Version | Fixed in Version | 1.5 (SVN) | |||
Summary | 0028930: "Access violation" error dialog pops up when trying to change source file encoding. | ||||
Description | See summary, Additional Information and attached GDB backtrace for more info. | ||||
Additional Information | Lazarus revision 50198 FPC revision 32185 FPC make commands: clean all install OPT=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -XX -CX -dTEST_WIN32_SEH COMPILER_OPTIONS=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -XX -CX -dTEST_WIN32_SEH INSTALL_PREFIX=F:\free_pascal_and_lazarus\fpc\i386\trunk\binary\fpc_trunk UPXPROG=echo IDE=1 REVSTR=32185 ALLOW_WARNINGS=1 NOWPOCYCLE=1 Lazarus make commands: clean all OPT=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -gh -O- -OoNO -Xs- -Si- -vb -XX -CX -dTEST_WIN32_SEH -dHEAPTRC_WINDOW -dDBG_WITH_DEBUGGER_DEBUG UPXPROG=echo USESVN2REVISIONINC=0 | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 50200 | ||||
LazTarget | - | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
has duplicate | 0028933 | closed | Bart Broersma | Changing of file codepage sometimes doesn't work |
related to | 0028918 | closed | Ondrej Pokorny | Access violation when close a project |
related to | 0028932 | closed | Juha Manninen | When recompiling a package sources via More->Recompile Clean, "Access violation" dialog pops up. |
|
gdb-log_1830916380.txt (3,079 bytes)
Starting program: F:\free_pascal_and_lazarus\lazarus\i386\trunk-fpc_trunk\binary\lazarus_trunk\lazarus.exe "--primary-config-path=F:\free_pascal_and_lazarus\lazarus\i386\trunk-fpc_trunk\config" "--debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO" "--debug-log=F:\free_pascal_and_lazarus\lazarus\i386\trunk-fpc_trunk\binary\log\995532243-lazarus-debug.log" [New Thread 1124.0xcd4] [New Thread 1124.0x79c] [Thread 1124.0x79c exited with code 0] [New Thread 1124.0xeb4] [New Thread 1124.0xa88] [Thread 1124.0xa88 exited with code 0] [New Thread 1124.0x790] [New Thread 1124.0xbb4] [New Thread 1124.0x7b8] Program received signal SIGSEGV, Segmentation fault. 0x007e73d8 in TSOURCENOTEBOOK__GETACTIVESE (this=0x13486be0) at sourceeditor.pp:7190 7190 if (FSourceEditorList=nil) or (FSourceEditorList.Count=0) or (PageIndex<0) then #0 0x007e73d8 in TSOURCENOTEBOOK__GETACTIVESE (this=0x13486be0) at sourceeditor.pp:7190 #1 0x007e451e in TSOURCENOTEBOOK__ENCODINGCLICKED (this=0x13486be0, SENDER=0x12790350) at sourceeditor.pp:6334 #2 0x006fe417 in TIDEMENUITEM__MENUITEMCLICK (this=0x12790350, SENDER=0x1275be88) at menuintf.pas:548 #3 0x00701068 in TIDEMENUCOMMAND__MENUITEMCLICK (this=0x12790350, SENDER=0x1275be88) at menuintf.pas:1603 #4 0x005b8674 in TMENUITEM__CLICK (this=0x1275be88) at include/menuitem.inc:84 #5 0x005b8c91 in TMENUITEM__DOCLICKED (this=0x1275be88, MSG=0) at include/menuitem.inc:282 #6 0x00410280 in TOBJECT__DISPATCH (this=0x1275be88, MESSAGE=0) at ../inc/objpas.inc:602 #7 0x00543185 in TWINDOWPROCHELPER__DOWINDOWPROC (this=0xfbe0ce8) at win32callback.inc:2030 #8 0x005445d4 in WINDOWPROC (WINDOW=27724048, MSG=273, WPARAM=454, LPARAM=0) at win32callback.inc:2608 #9 0x772762fa in gapfnScSendMessage () from C:\Windows\syswow64\user32.dll #10 0x01a70910 in ?? () #11 0x77276d3a in USER32!GetThreadDesktop () from C:\Windows\syswow64\user32.dll #12 0x00544570 in WIN32INT$_$TWINDOWPROCHELPER_$__$$_DOWINDOWPROC$$LONGINT () #13 0x772777c4 in USER32!CharPrevW () from C:\Windows\syswow64\user32.dll #14 0x7727788a in USER32!DispatchMessageW () from C:\Windows\syswow64\user32.dll #15 0x00545297 in TWIN32WIDGETSET__APPPROCESSMESSAGES (this=0x207288) at win32object.inc:367 #16 0x0043e0ad in TAPPLICATION__HANDLEMESSAGE (this=0x1b72f0) at include/application.inc:1260 #17 0x0043e519 in TAPPLICATION__RUNLOOP (this=0x1b72f0) at include/application.inc:1395 #18 0x0047e3b2 in TWIDGETSET__APPRUN (this=0x207288, ALOOP=...) at include/interfacebase.inc:54 #19 0x0043e4d5 in TAPPLICATION__RUN (this=0x1b72f0) at include/application.inc:1383 #20 0x00403226 in main () at lazarus.pp:135 Continuing. [Thread 1124.0x790 exited with code 0] [Thread 1124.0xeb4 exited with code 0] [New Thread 1124.0x8f0] [Thread 1124.0x8f0 exited with code 0] [New Thread 1124.0xb90] [Thread 1124.0xb90 exited with code 0] [Thread 1124.0x7b8 exited with code 0] [Inferior 1 (process 1124) exited normally] |
|
Yes, it happens for example when you change project and change encoding for the newly opened unit. I guess TSourceNotebook.EncodingClicked() should be re-assigned somehow. Now in TSourceNotebook.GetActiveSE() Self refers to an old closed unit. Its members, including FSourceEditorList, are trashed (because I used -gt). |
|
Caused by r50026, "IdeIntf, IDE: Refactor command system. Separate menu and toolbar commands, update them in right place etc. Issue 0028777, patch from Ondrej Pokorny." I am assigning to Ondrej. I hope it is OK. |
|
The problem was that default TNotifyEvent comparison with "=" doesn't take the Self/Data parameter into account but only Code. |
|
If you change the encoding of a project file it seems to work now, but looses that information, if the file is saved somewhere else. Simple test: Create a new project "Simple Program" and change its encoding. Save the project somewhere else (maybe C:\Test). Now the encoding information is lost. The same is with new units, if you save it in your project directory, the encoding information is lost. |
|
>> If you change the encoding of a project file it seems to work now, but looses that information, if the file is saved somewhere else. Is this a regression? Is this related to the issue from this report? Please create a separate bug report and comment on these 2 questions. |
|
You are right. I've tested Lazarus 1.4.4 r49931 FPC 2.6.4 i386-win32-win32/win64, there is the same behaviour. So this has nothing to do with the actual problem. I'll create a new bugreport on it. Thanks Here it is 0028936 |
|
Can't you use LCLProc.CompareMethods instead of the new CompareEvents? |
|
>> Can't you use LCLProc.CompareMethods instead of the new CompareEvents? Yes, with pleasure! I wasn't aware of it. But just for consistency: Why does CompareMethods return a boolean result? Compare* functions should return integer and Same* functions should return boolean. See e.g. AnsiCompareStr and AnsiSameStr. In this way you can use Compare* functions where sorting is needed. |
|
Thanks. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-10-29 17:21 | Cyrax | New Issue | |
2015-10-29 17:21 | Cyrax | File Added: gdb-log_1830916380.txt | |
2015-10-30 11:07 | Juha Manninen | LazTarget | => - |
2015-10-30 11:07 | Juha Manninen | Note Added: 0087008 | |
2015-10-30 11:07 | Juha Manninen | Status | new => confirmed |
2015-10-30 11:07 | Juha Manninen | Note Edited: 0087008 | View Revisions |
2015-10-30 11:30 | Juha Manninen | Relationship added | related to 0028933 |
2015-10-30 11:31 | Juha Manninen | Relationship replaced | has duplicate 0028933 |
2015-10-30 12:49 | Juha Manninen | Note Added: 0087019 | |
2015-10-30 12:49 | Juha Manninen | Assigned To | => Ondrej Pokorny |
2015-10-30 12:49 | Juha Manninen | Status | confirmed => assigned |
2015-10-30 13:41 | Ondrej Pokorny | Fixed in Revision | => 50200 |
2015-10-30 13:41 | Ondrej Pokorny | Note Added: 0087022 | |
2015-10-30 13:41 | Ondrej Pokorny | Status | assigned => resolved |
2015-10-30 13:41 | Ondrej Pokorny | Fixed in Version | => 1.5 (SVN) |
2015-10-30 13:41 | Ondrej Pokorny | Resolution | open => fixed |
2015-10-30 15:01 | Michl | Note Added: 0087033 | |
2015-10-30 15:30 | Ondrej Pokorny | Note Added: 0087034 | |
2015-10-30 16:05 | Ondrej Pokorny | Note Edited: 0087034 | View Revisions |
2015-10-30 18:19 | Michl | Note Added: 0087037 | |
2015-10-30 18:23 | Michl | Note Edited: 0087037 | View Revisions |
2015-10-30 18:23 | Michl | Note Edited: 0087037 | View Revisions |
2015-11-01 18:25 | Juha Manninen | Relationship added | related to 0028918 |
2015-11-02 08:28 | Vincent Snijders | Note Added: 0087058 | |
2015-11-02 08:51 | Ondrej Pokorny | Note Added: 0087059 | |
2015-11-02 19:11 | Juha Manninen | Relationship added | related to 0028932 |
2015-11-12 06:03 | Cyrax | Note Added: 0087255 | |
2015-11-12 06:03 | Cyrax | Status | resolved => closed |