View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0036365 | FPC | Textmode IDE | public | 2019-11-27 01:31 | 2020-01-24 08:42 |
Reporter | Marģers | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Platform | x86_64 | OS | linux | ||
Summary | 0036365: sigseg error no resize screen | ||||
Description | exiting from full screen mode when in user output mode make sigseg error in IDE | ||||
Steps To Reproduce | 1. use xterm in full screen mode 2. run any console program 3. on message "Press any key to return to IDE" press Alt-Enter 4. press any key. Enjoy SIGSEG error. Close terminal window. | ||||
Tags | patch | ||||
Fixed in Revision | |||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
|
|
|
ideresize.patch (1,362 bytes)
Index: packages/ide/fpide.pas =================================================================== --- packages/ide/fpide.pas (revision 44007) +++ packages/ide/fpide.pas (working copy) @@ -1451,6 +1451,7 @@ procedure TIDEApp.ShowIDEScreen; +var oldH,oldW : byte; begin if Assigned(UserScreen) then UserScreen^.SaveConsoleScreen; @@ -1460,6 +1461,8 @@ InitMouse else ButtonCount:=0; + oldH:=ScreenHeight; + oldW:=ScreenWidth; {$ifndef go32v2} initvideo; {$endif ndef go32v2} @@ -1474,7 +1477,13 @@ InitSysError; CurDirChanged; {$ifndef Windows} - Message(Application,evBroadcast,cmUpdate,nil); + if (oldH<>ScreenHeight) or (oldW<>ScreenWidth) then + begin + { acknowledge new screen dimensions } + { prevents to draw out of boundaries of new video buffer } + ResizeApplication(ScreenWidth, ScreenHeight); + end else + Message(Application,evBroadcast,cmUpdate,nil); {$endif Windows} {$ifdef Windows} // WindowsShowMouse; @@ -1481,7 +1490,8 @@ {$endif Windows} if Assigned(UserScreen) then - UserScreen^.SwitchBackToIDEScreen; + if (oldH = ScreenHeight) and (oldW = ScreenWidth) then + UserScreen^.SwitchBackToIDEScreen; {$ifdef Windows} { This message was sent when the VideoBuffer was smaller than was the IdeApp thought => writes to random memory and random crashes... PM } |
|
Updated patch. Make sure, changes does not affect other than unix like targets. ideresize_v2.patch (1,388 bytes)
Index: packages/ide/fpide.pas =================================================================== --- packages/ide/fpide.pas (revision 44007) +++ packages/ide/fpide.pas (working copy) @@ -1451,6 +1451,7 @@ procedure TIDEApp.ShowIDEScreen; +var oldH,oldW : byte; begin if Assigned(UserScreen) then UserScreen^.SaveConsoleScreen; @@ -1460,6 +1461,8 @@ InitMouse else ButtonCount:=0; + oldH:=ScreenHeight; + oldW:=ScreenWidth; {$ifndef go32v2} initvideo; {$endif ndef go32v2} @@ -1474,7 +1477,13 @@ InitSysError; CurDirChanged; {$ifndef Windows} - Message(Application,evBroadcast,cmUpdate,nil); + if (oldH<>ScreenHeight) or (oldW<>ScreenWidth) then + begin + { acknowledge new screen dimensions } + { prevents to draw out of boundaries of new video buffer } + ResizeApplication(ScreenWidth,ScreenHeight); + end else + Message(Application,evBroadcast,cmUpdate,nil); {$endif Windows} {$ifdef Windows} // WindowsShowMouse; @@ -1481,7 +1490,10 @@ {$endif Windows} if Assigned(UserScreen) then - UserScreen^.SwitchBackToIDEScreen; +{$ifdef unix} + if (oldH=ScreenHeight) and (oldW=ScreenWidth) then +{$endif unix} + UserScreen^.SwitchBackToIDEScreen; {$ifdef Windows} { This message was sent when the VideoBuffer was smaller than was the IdeApp thought => writes to random memory and random crashes... PM } |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-11-27 01:31 | Marģers | New Issue | |
2019-11-27 01:31 | Marģers | File Added: Screenshot_2019-11-27_02-10-12.png | |
2020-01-21 01:58 | Marģers | File Added: ideresize.patch | |
2020-01-24 08:41 | Marģers | File Added: ideresize_v2.patch | |
2020-01-24 08:41 | Marģers | Note Added: 0120697 | |
2020-01-24 08:42 | Marģers | Tag Attached: patch |