Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Crash #110

Closed
SlaviusPrime opened this issue Jun 22, 2021 · 47 comments
Closed

Crash #110

SlaviusPrime opened this issue Jun 22, 2021 · 47 comments
Assignees
Labels
bug Something isn't working

Comments

@SlaviusPrime
Copy link

Program crashes sometimes.
No problem dependency found

@SlaviusPrime
Copy link
Author

Only prerelease 4 version

@kingToolbox
Copy link
Owner

Does it crash during startup or during operation? Also, does only prerelease 4 version mean that the crash started from the WindTerm_2.1.0_Prerelease_4? If so, please tell me the version number of the stable version you used before, so I can compare the code between versions. Thank you very much.

@SlaviusPrime
Copy link
Author

The last stable release was prerelease 2.
I skipped prerelease 3.

@kingToolbox kingToolbox self-assigned this Jun 23, 2021
@kingToolbox kingToolbox added the bug Something isn't working label Jun 23, 2021
@kingToolbox
Copy link
Owner

I also found a bug that caused a crash during the development process, but it has not been analyzed yet, and it is not certain that you encountered it. But I will fix it as soon as possible and analyze whether there are other possible crashes. I will update the progress here. Thank you.

@SlaviusPrime
Copy link
Author

Crashes when switch between tabs...

@kingToolbox
Copy link
Owner

Hello, I just released the new WindTerm_2.1.0_Prerelease_5, although the stability is not enhanced, it is still recommended that you download and use it

From now on, I will focus on fixing the bugs to make the version stable enough. If you experience a crash again, please let me know, thank you.

@Shellfishgene
Copy link

Shellfishgene commented Jun 28, 2021

Prerelease 5 crashes/closes when I open a second tab after reconnecting in the first tab:

  • Open WindTerm
  • Click ok on the ssh reconnecting username form
  • First ssh tab works
  • Add a second tab (no matter if ssh or cmd)
    -> crash

This works, but crashes on closing WindTerm:

  • Open WindTerm
  • reconnect to SSH
  • close SSH tab again -> no tabs
  • open as many tabs as I want
  • close WindTerm, the "Do you want to reconnect" dialog appears
    -> crashes right away, can't even press a button

If "reconnect at startup" is off this problem does not appear.

@Shellfishgene
Copy link

Shellfishgene commented Jun 28, 2021

Two more:

  • Open WindTerm, reconnect off
  • Open ssh connection, login dialog appears
  • Select "auto login next time"
  • Password box appears
    -> WinTerm exits immidiately

Also:

  • Open WindTerm, reconnect off
  • Open ssh connection, login dialog appears, do not click "continue" yet
  • Take focus from WindTerm by clicking on some other program in Windows
  • Activate WindTerm again
    -> crash

Actually don't need to take focus from WindTerm:

  • Open WindTerm, reconnect off
  • Open ssh connection, login dialog appears, do not click "continue" yet
  • Click on different area of WindTerm, for example "Sender"
    -> crash

Note that I use "X mouse" or "focus follows mouse" in Windows 10, not sure if that has anything to do with it.

@Shellfishgene
Copy link

One more: WindTerm crashes when I have a terminal tab open and then try to turn off the status bar via View->Bars. If no terminal tab is open it works as expected.

@kingToolbox kingToolbox pinned this issue Jun 28, 2021
@SlaviusPrime
Copy link
Author

I upgraded to 5 prerelease, and after "duplicate view" program is crashed

@kingToolbox
Copy link
Owner

@SlaviusPrime, what session are you copying, SSH session or shell session? Is there a split window? I just copied it more than a dozen times without any problem.

I am still following Shellfishgene‘s steps to reproduce the crash, but so far I have not encountered a crash. But the test is still in progress.

The development cycle of this version is too long and there are too many features added, so there are indeed many unstable factors. In the next few days, in addition to compiling the MacOS version of WindTerm, the most important thing is to fix the stability problem, which is why the post is pinned.

There is no crash report available now, which makes it difficult to locate the problem. If necessary, I will add the google/breakpad to get a detailed crash report soon.

@SlaviusPrime
Copy link
Author

Trouble in SSH session without split window.
This problem cannot be repeated on purpose. It is not permanent.
Could the problem be related to the large number of open sessions in tabs (~15 tabs)?

My OS - Windows 10 Pro 19043.1055

@kingToolbox
Copy link
Owner

No, I'm pretty sure about this. When I test the number of tabs, I will open 300 to 500 tabs at the same time, and I will duplicate, close and reopen a large number of tabs. So 15 tabs should be no problem.

Although it seems that there are crashes everywhere now. But I estimate that only one or two pieces of code that caused the crash. I am reading the code, but the analysis process is a bit slow. I am also waiting for more crash issues to appear for analysis.

@SlaviusPrime
Copy link
Author

Today crashed when I try open new ssh session from Sessions tab.
But more often it crashes when switching tabs at the moment the preview appears. How can I turn them off?

@kingToolbox
Copy link
Owner

kingToolbox commented Jul 2, 2021

Do you mean the tooltip of the tab? Add "tabbar.thumbnailRatio": 0 to profiles\default.v10\user.config can no longer show the thumbnail. And you can close tooltips completely by modifing the theme. Assuming you are using the dige-black theme, then please open global/themes/dige-black/gui.theme and modify QToolTip as follows:

QToolTip {
	max-width: 0px;
	max-height: 0px;
}

I have test it and it works. In theory, the preview window will no longer be displayed and will not trigger the bug, but I don't know if it will work in practice. But you can try it.

And I am very sorry that this version is not stable yet, which has brought trouble to your use. Almost no crashes were reported in previous versions, I think the instability of this version is likely to be introduced by fixing issue #73 and #78. It's just that I can't reproduce this bug, so I haven't been able to fix it quickly.

In order to solve the problem faster, I have been integrating google/breakpad in the past two days. The new prerelease 6 will be released together with the MacOS version. I also have completed the compilation of the MacOS version and am writing some feature with native code. So the new prerelease 6 is expected to be released this weekend. If there is a crash again, I hope it can be quickly located and fixed through the crash report.

@gooker
Copy link

gooker commented Jul 3, 2021

20210702115003

open new session crash in left view ,Very often.

@lishuhuakai
Copy link

lishuhuakai commented Jul 3, 2021

I created a new shell session, every time I try to open the shell session, windterm crashed immediately !
OS: win7 x64 windterm 2.1.0 p5

问题签名:
问题事件名称: APPCRASH
应用程序名: WindTerm.exe
应用程序版本: 0.0.0.0
应用程序时间戳: 60d8d8c8
故障模块名称: Qt5Core.dll
故障模块版本: 5.12.4.0
故障模块时间戳: 5d01c3bf
异常代码: c0000005
异常偏移: 00001308
OS 版本: 6.1.7601.2.1.0.256.1
区域设置 ID: 2052
其他信息 1: 0a9e
其他信息 2: 0a9e372d3b4ad19135b953a78882e789
其他信息 3: 0a9e
其他信息 4: 0a9e372d3b4ad19135b953a78882e789

and I switched a user, and click the shell session, it works very well.

@kingToolbox
Copy link
Owner

@lishuhuakai, your crash may be due to a conflicting version of winpty. If you have installed git, then you can see if there is winpty in the directory git-install-path/usr/bin/ (for example, c:/Program Files/Git/usr/bin), you can temporarily rename them to winpty.exe.temp, winpty.dll.tmp, winpty-agent.exe.tmp, and then see if WindTerm doesn't crash anymore?

@kingToolbox
Copy link
Owner

@Shellfishgene, @SlaviusPrime, @gooker. Thank you very much for providing detailed steps to reproduce the crash. I tried each step carefully and repeatedly, including the setting of external conditions, such as "focus follows mouse" mentioned by @Shellfishgene. Unfortunately, the crash has not been reproduced yet.

Although I also review the code, as I mentioned above, I am integrating google/breakpad in advance. I believe that with detailed crash reports, we can solve this problem faster. I estimate that these crashes should only be caused by one or two wild pointers or subscript out-of-range. I hope to completely solve the crash problem soon.

If all goes well, the new WindTerm_Prerelease_6 will be released this weekend together with the MacOS version.

@Liuhongdan
Copy link

Also encountered crash few times. No pattern yet. It just disappeared suddenly. Then I had to start it again.

@kingToolbox
Copy link
Owner

A new version with google/breadpad integrated has just been released. Please download and use WindTerm_2.1.0_Prerelease_6_Windows_Portable.

If you encounter a crash again, you can submit the generated crash report in the current working directory, such as 8f9a5ae5-4ea2-170e-55e9b70e-05c9ab40.dmp, as an attachment in the issue. I will analyze it and fix the problem. Thank you.

I have experienced the pain of an application crashing at any time, so I hope to fix the crash and release a stable official version as soon as possible.

@Shellfishgene
Copy link

Shellfishgene commented Jul 7, 2021

Hi,
I tried prerelease 6, some of the crashes I can't reproduce anymore.
Turn off and on status bar does not crash anymore.
Opening second tab does sometimes crash, but is not always reproduceable anymore every time, I can't really give exact steps.
I saved the debug dumps, but don't really want to upload them here, as I don't know what they contain. I can send them to you via email or something if you let me know how.

05ace889-5e17-4add-bbbd-3a8a4a1211c3.dmp Login screen, click elsewhere, click login screen again, crash (every time)
cc061d0d-77ae-4947-ad53-48bf4e69fd7b.dmp Login screen, activate "auto login next time" box, crash (every time)
32656c8c-9cfd-4669-b98b-e3bc8bdcaf88.dmp Open one ssh tab, enter focus mode, open second ssh tab, crash (not reproduceable exactly)
f0681506-b420-4d5d-83b4-fd622e5e26f1.dmp Open one cmd tab, click focus mode button, focus mode menu appears, crash (every time, see video)
e4358327-6f27-4568-adb9-5b2440c0bf5f.dmp Open ssh tab, 3 dots menu, zoom, crash (every time, also if zooming via the menu)

windterm.mp4

What actually keeps me from using WindTerm at the moment is also a good menu to set the font and font size ;)

Hope it helps!

@SlaviusPrime
Copy link
Author

SlaviusPrime commented Jul 7, 2021

A new version with google/breadpad integrated has just been released. Please download and use WindTerm_2.1.0_Prerelease_6_Windows_Portable.

If you encounter a crash again, you can submit the generated crash report in the current working directory, such as 8f9a5ae5-4ea2-170e-55e9b70e-05c9ab40.dmp, as an attachment in the issue. I will analyze it and fix the problem. Thank you.

I have experienced the pain of an application crashing at any time, so I hope to fix the crash and release a stable official version as soon as possible.

Than you very much!
How can I know about the compatibility of a file "global\wind.keymaps" when upgrading?
This file is customized for me :)

@lishuhuakai
Copy link

@kingToolbox what you said cannot solve my problem, here is the dump file.
dummy.zip

@kingToolbox
Copy link
Owner

@Shellfishgene First of all, thank you for the detailed test. To be honest, although I cannot reproduce any crash myself, I am still surprised that such a simple operation will cause a crash, as if the entire program is riddled with holes. But fortunately, most users used it well, so your crash reports are very important for me to fix it.

I understand your concerns. Because minidump is a standard Windows crash report format generated by google/breakpad, I didn't pay special attention to the content of the report when I was developing it. I just tested that the use of the report can indeed quickly locate the fault. After seeing your worries, I immediately inquired about relevant information. The following are all from msdn documents:

https://docs.microsoft.com/en-us/windows/win32/debug/minidump-files

Minidump Files

Applications can produce user-mode minidump files, which contain a useful subset of the information contained in a crash dump file. Applications can create minidump files very quickly and efficiently. Because minidump files are small, they can be easily sent over the internet to technical support for the application.

A minidump file does not contain as much information as a full crash dump file, but it contains enough information to perform basic debugging operations. To read a minidump file, you must have the binaries and symbol files available for the debugger.

Current versions of Microsoft Office and Microsoft Windows create minidump files for the purpose of analyzing failures on customers' computers.

This article Crash Dump Analysis also describes how to use windbg to view and analyze minidump file content. If you have installed windbg, you can easily check the content of the captured file. In the future, with time and technical support, I will also develop a crash report dialog and display the content of the file in it. Recently, I am too eager to solve the crashes as soon as possible, so this development task is not included. Please understand.

I hope my explanation can eliminate some of your worries. If you can email the dumped files to me, please send them to WindServices@yandex.com, thank you very much!

@kingToolbox
Copy link
Owner

@SlaviusPrime I don't know what you have modified, but I think you can compare and merge yours wind.keymaps and the new .global\wind.keymaps to ensure compatibility. At present, the external interfaces and shortcut keys are almost unchanged, so compatibility should be guaranteed.

@kingToolbox
Copy link
Owner

@lishuhuakai Thank you very much. I will analyze the minidump files as soon as possible and give the result here. 😃

@SlaviusPrime
Copy link
Author

2.1.0 Prerelease 6 also crashed.

@kingToolbox
Copy link
Owner

Yes, the WindTerm_2.1.0_Prerelease_6 version does not fix the crash problem, but adds the feature of collecting crash reports, so that once there is a crash, you can find the crash report in the current working folder, upload it here or email to WindServices@yandex.com, which can help analyze and locate the problem. This is necessary to solve the problem as quickly as possible.

@SlaviusPrime
Copy link
Author

Sended dump to email.

@SlaviusPrime
Copy link
Author

Crashed with typically scenario.

@SlaviusPrime
Copy link
Author

And 1 more dump to e-mail.

@kingToolbox
Copy link
Owner

@Shellfishgene @SlaviusPrime @xzhuiz
Thank you everyone for your help. The minidump files you shared provide decisive help in locating the crash problem. I have analyzed all the dumped files, and the good news is that all the crashes point to the same source. A pointer to a text style was accidentally reseted to nullptr, leading to a series of illegal memory accesses and crashes. The bad news is that I haven't figured out why the pointer is empty. This bug was mostly introduced by fixing #72 ("The text is not displayed properly when the screen resolution is changed") in WindTerm_2.1.0_Prerelease_3.

I will continue to analyze the code and fix it as soon as possible. I will update here once there is progress. If all goes well, the 2.1.0 version should be released soon. 😄

@kingToolbox
Copy link
Owner

@lishuhuakai
I have analyzed your minidump files too. The error is the same as I guessed that something went wrong when WindTerm starting internal winpty.exe. This is usually caused by environment variable conflicts. In addition to the git I mentioned before, I found that the environment variable about VSCode may also cause a crash. Please follow the steps below to see if it works:

  • Start cmd.exe.
  • Execute set Path to display the environment variable Path.
  • Execute set Path= to clear Path. Don't worry, this is only temporary.
  • Execute set Path again to confirm that Path is cleared.
  • Execute cd WindTerm_install_path,
  • Execute WindTerm.exe to start WindTerm.exe.
  • Open a new cmd or powershell in WindTerm to see if it can be opened successfully.

Regardless of success or failure, please let me know so that we can solve the problem further, thank you very much.

@lishuhuakai
Copy link

@kingToolbox I remove C:\Users\anyone\AppData\Local\Programs\Microsoft VS Code\bin; from path environment, problem solved !!

@kingToolbox
Copy link
Owner

@lishuhuakai
Congratulations! I also found out yesterday that VSCode will affect the cmd startup. But I haven't checked why it will affect. After the crash is fixed, I will work to solve this problem. Thank you very much for your feedback.

@SlaviusPrime
Copy link
Author

I removed C:\Users\anyone\AppData\Local\Programs\Microsoft VS Code\bin;
from PATH, but windterm is crashed

@kingToolbox
Copy link
Owner

kingToolbox commented Jul 14, 2021

@SlaviusPrime @lishuhuakai
I reviewed the code and found that there is a fatal bug in the handling of environment variables that can cause a crash.

Deleting variables actually does not really solve this problem, but it reduces the probability of crashes. It has been fixed now, and there is no need to delete any environment variables. please download WindTerm_2.1.0_Prerelease_7, thank you all.

@kingToolbox
Copy link
Owner

@Shellfishgene @SlaviusPrime @xzhuiz
Hello, I think I should have finally fixed this error. 😄 Hope WindTerm will be as stable as before. Please download WindTerm_2.1.0_Prerelease_7 and check it. If all goes well, the new 2.1.0 version will be released soon.

@Shellfishgene
Copy link

Hi,
I don't have so much time now for testing, but these crashes are still there in pre 7, however I found out how to avoid them:

  • Open one cmd tab, click focus mode button, focus mode menu appears, crash
  • Open ssh tab, 3 dots menu, zoom, crash (every time, also if zooming via the menu)
  • Login screen, click elsewhere, click login screen again, crash (every time)

These only happen when I move WindTerm to my second screen right after I start it! I'm kinda used to have terminal stuff on the right screen so I always move the window right after it appears. So:
Start WindTerm, appears on left screen, move to right screen, start ssh tab, all 3 crashes above happen.
But: Start WindTerm, appears on left screen, open ssh tab, then move to right screen, no crashes on zooming or focus mode.
Also, WindTerm seems to remember to start on the right screen the next time, if it automatically starts on the right screen the crashes also don't seem to happen. They are only triggerd by manually dragging the window before starting a terminal tab.

This one seems to be fixed, no matter the screen:

  • Login screen, activate "auto login next time" box, crash

@kingToolbox
Copy link
Owner

kingToolbox commented Jul 15, 2021

@Shellfishgene
I sincerely thank you for taking the time to help me solve the problem.

When I analyzed the crash reports, I found that this was caused by the screen change event, but I have never understood why the screen change occurred. I used to think it was caused by changing the resolution of the monitor, but usually no one would modify it when using a software. From your description, I realized that I actually ignored dual monitors. Because I only have one monitor, I think this is why I cannot reproduce the crash you mentioned.

So I think the remaining thing is that I need to set up a dual-monitor environment for further testing, because it is difficult to solve the problem further from the code review. I will continue to solve this problem. I hope that you can use WindTerm to make your work easier instead of testing WindTerm. Thank you again.

@kingToolbox
Copy link
Owner

kingToolbox commented Jul 17, 2021

I'm really happy that I should finally fix this issue and the stable WindTerm_2.1.0 has been released too, please download and check it, thank you.

I managed to set up a dual-monitor environment, and when I saw the crash, I knew that I could solve the problem. I have also done a lot of tests, including opening more than ten of windows in the second monitor and disconnecting it to see if all windows can be correctly returned to the main monitor, and so on.

Thanks to everyone who has helped. Without you, it would be very difficult for me to even find this problem because I only have one monitor during my daily development.

I always hope you only need to use WindTerm instead of testing WindTerm, and make your work easier and more efficient. Now WindTerm can finally move forward, and I'll keep on trying.

BTW:
The next WindTerm_2.2.0 will complete SSH ControlMaster, Agent Forwarding, Global Settings Dialog Box and Multilingual User Interface.

@kingToolbox kingToolbox unpinned this issue Jul 19, 2021
@Shellfishgene
Copy link

2.1.0 does not crash for me anymore!
Btw, is there a setting to disable syntax highlighing for all new connections?

@kingToolbox
Copy link
Owner

Thank you for the good news. I am very happy to finally let you use WindTerm normally. It looks like this issue should have been fixed.

To disable syntax highlighting for all new connections, you need open WindTerm-install-path/terminal/configs/session.config and change the line "session.system": "linux" to "session.system": "none", after restarting, all new connections will diable syntax highlighting by default. You can always set session.system in the combobox Session Property Dialog - Session - System again.

I'm a little curious, why do you want to disable it? Does this feature hinder anything?

@Shellfishgene
Copy link

I'm a little curious, why do you want to disable it? Does this feature hinder anything?

Not really, but I have colors in my terminal already, for example I use a version of ls that colors the output, so I don't need WindTerm to recolor things to something I'm not used to.
Sorry I'm always asking to turn off all the nice features of WindTerm, but I'm mostly using it as a Putty replacement with tabs (I also like Terminus, but that uses way to much RAM).
Thanks!

@kingToolbox
Copy link
Owner

@Shellfishgene
Don't mind, I just want to see if there is anything I need to improve. You can use the tool any way you like, regardless of the developer's feelings. 😄

In addition, if the syntax highlighting is disabled, features such as folding, outling will also be disabled at the same time, but the advantage is that the overall performance will be a little faster.

@kingToolbox
Copy link
Owner

The issue should have been fixed in the new WindTerm_2.1.0. Welcome to continue submitting new issues and feature requests, thank you.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants