View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0035071||Lazarus||IDE||public||2019-02-13 09:34||2019-06-16 11:45|
|Reporter||David||Assigned To||Martin Friebe|
|Product Version||2.0||Product Build|
|Target Version||Fixed in Version|
|Summary||0035071: Console/Terminal crashes an app if closed before the app itself is closed.|
|Description||Linux users can open a Terminal/Console while an app is running within the IDE. If that app has written to the console and the console is closed before the app is, some sort of crash happens.|
|Steps To Reproduce||Drop a button a form, call debugln('hello'); in its onclick event. Add lazlogger to uses clause.|
Run the app (in the IDE), open the console (View->DebugWindows->ConsoleIn/Output)
Click the button on the minimal project, note the 'hello' in Console Window, close the console window and it apparently triggers a crash in the minimal project.
|Additional Information||The crash is followed up by two dialogs -|
Project project1 raised exception class 'External: SIGCONT'.
In file '../sysdeps/unix/sysv/linux/poll.c' at line 29
The file "/build/glibc-OTsEL5/glibc-2.27/sysdeps/unix/sysv/linux/poll.c" was not found.
Do you want to locate it yourself?
Current Fixes_2_0 also seems to do same thing.
|Tags||No tags attached.|
|Fixed in Revision|
I tried with trunk, on Fedora 28. I encountered no issues.
If I close the "console output" window, any output the app writes gets buffered. If I open the window again, the cached output is shown.
I am also not sure how the "console output" window should have such an effect.
Well it does send the its size to the tty (so the app can read the size of the pseudo terminal).
Maybe on your system it sends a size that your libc does not like.
Please run the IDE to produce a logfile http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session
But with the following param
And also with the following modifications to the IDE source:
Open file debugger\pseudoterminaldlg.pp
Find function TPseudoConsoleDlg.consoleSizeChanged;
Uncomment the "//DebugLn(DBG_VERBOSE"
Or make sure, that on each call, it will be logged what size the console window is set to.
You can then see, what the last size was, and if that size looks suspicious.
You can also see if the tty handle was closed, and if that may have caused the problem
OK Martin, an incomplete report, sorry, I'm away from home.
I suspect it is about an altered console window size. I had, previously and unintentionally, changed the window size. When the attached log was taken it was 74x24.
So, I had a play, I could trigger a (?) crash just by resizing. And not stupid sizes, just on screen stuff. And, before a restart, it was telling me it was 2784x1088 - pretty good eh ?
A restart of lazarus and we have my 74x24 back, hmm, and now I cannot trigger a crash. More research is indicated .....
Attached is a log taken while a crash did occur
I'll do the edit to source, recompile and rerun later today if possible or, more likely, tomorrow.
LOG_FILE.gz (11,314 bytes)
OK Martin, I have now done the run with the edit to src as requested, produced a 500K file this time ! I have zipped it up this time rather than gzip noting the directions of your slashes in your example - sorry !
(I needed to also uncomment declaration and initialisation of DBG_VERBOSE, pretty sure thats what you wanted)
Attached crash log LOG_FILE_DBGV.zip
LOG_FILE_DBGV.zip (61,363 bytes)
||Please try with the changes from https://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&root=lazarus&revision=60469|
Yep, that seems to to have got it !
I have applied the patch to my fixes_2_0 source tree and I cannot reproduce that problem. Tried several different combos. Tried my ~13K lines project. All good !
Well done, thanks Martin !
||Thanks, all good.|
|2019-02-13 09:34||David||New Issue|
|2019-02-13 09:43||Martin Friebe||Assigned To||=> Martin Friebe|
|2019-02-13 09:43||Martin Friebe||Status||new => assigned|
|2019-02-16 21:28||Martin Friebe||LazTarget||=> -|
|2019-02-16 21:28||Martin Friebe||Note Added: 0114197|
|2019-02-16 21:28||Martin Friebe||Status||assigned => feedback|
|2019-02-16 21:29||Martin Friebe||Relationship added||related to 0033935|
|2019-02-17 03:06||David||Note Added: 0114207|
|2019-02-17 03:06||David||Status||feedback => assigned|
|2019-02-17 03:07||David||File Added: LOG_FILE.gz|
|2019-02-19 00:50||David||Note Added: 0114253|
|2019-02-19 00:51||David||File Added: LOG_FILE_DBGV.zip|
|2019-02-20 16:49||Martin Friebe||Note Added: 0114301|
|2019-02-21 02:22||Martin Friebe||Status||assigned => feedback|
|2019-02-21 11:36||David||Note Added: 0114327|
|2019-02-21 11:36||David||Status||feedback => assigned|
|2019-02-21 14:03||Martin Friebe||Status||assigned => resolved|
|2019-02-21 14:03||Martin Friebe||Resolution||open => fixed|
|2019-06-16 11:45||David||Status||resolved => closed|
|2019-06-16 11:45||David||Note Added: 0116748|