opencodewin / MediaEditor

A non-linear editing software that helps you to make nice video.
GNU Lesser General Public License v3.0
427 stars 30 forks source link

[Linux ] application does not close on ctrl+c #27

Closed feliwir closed 4 months ago

feliwir commented 1 year ago

Probably SIGINT is not handled correctly

DickyQi commented 1 year ago

On Linux OS, we are using AppImage framework to start Our app, and I don't know if it is can close app with ctrl-c. need test later.

WyvernZhao commented 1 year ago

"ctrl+c" is normally used as a termination command in a terminal, but not for a GUI program. For example, "ctrl+c/ctrl+v" stands for "Copy/Paste" when you use it in Chrome browser.

feliwir commented 1 year ago

Any program than can be started from the commandline should close on "ctrl+c". SIGINT is also emitted from the task manager for example, so this causes other issues aswell

WyvernZhao commented 1 year ago

Any program than can be started from the commandline should close on "ctrl+c". SIGINT is also emitted from the task manager for example, so this causes other issues aswell

I agree with you that a program started from the terminal should be able to exit on "ctrl+c". Although I usually run an AppImage program by double clicking the icon, it can also be started from the command line by simply execute it. So I tested the case you metioned under my ubuntu 22.04, but I got the different result, the program exited normally when I pressed "ctrl+c". I cannot reproduce this issue with my computer. quit-with-ctrl-c

feliwir commented 1 year ago

I didn't generate an AppImage - i just ran the compiled binary like this:

[stephan@fedora build]$ ./mec
^C^C

Nothing happens at all

WyvernZhao commented 1 year ago

Ok, I tested running the executable "mec" from build directory as you described. But still I can quit it by "ctrl+c". I think it probably has something to do with the OS environment. Could you share your OS information? Seems you are using a fedora.

feliwir commented 1 year ago
             .',;::::;,'.                stephan@fedora 
         .';:cccccccccccc:;,.            -------------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 38 (Workstation Editi 
    .:cccccccccccccccccccccccccc:.       Kernel: 6.2.11-300.fc38.x86_64 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Uptime: 1 day, 20 hours, 47 mins 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Packages: 2614 (rpm), 48 (flatpak) 
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Shell: bash 5.2.15 
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Resolution: 1920x1080, 1920x1080 
:cccccccccccccc;MMM.;cccccccccccccccc:   DE: GNOME 44.0 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   WM: Mutter 
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   WM Theme: Adwaita 
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   Theme: Adwaita [GTK2/3] 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Icons: Adwaita [GTK2/3] 
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     Terminal: gnome-terminal 
cccccc;dNMWXXXWM0::cccccccccccccc:,      CPU: AMD Ryzen 5 3600 (12) @ 3.600GHz 
cccccccc;.:odl:.;cccccccccccccc:,.       GPU: NVIDIA GeForce GTX 1660 SUPER 
:cccccccccccccccccccccccccccc:'.         Memory: 18577MiB / 32002MiB 
.:cccccccccccccccccccccc:;,..
  '::cccccccccccccc::;,.                                                                                                       
WyvernZhao commented 1 year ago

Thanks @feliwir for your kindly share. We will try to reproduce this issue after we setup a similar env. But that may take some days or even longer because we've got many other stuffs to deal with and Fedora is kind of new to me.