Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Application closes immediately after launched on Linux #589

Closed
sum-elier opened this issue Oct 30, 2020 · 21 comments
Closed

Application closes immediately after launched on Linux #589

sum-elier opened this issue Oct 30, 2020 · 21 comments
Labels
help wanted Extra attention is needed question Further information is requested rendering wgpu
Milestone

Comments

@sum-elier
Copy link
Contributor

I am trying to run my application compiled in Ubuntu and I can't get it working. If launched by double clicking the application it just says mentions something like:

there's no application installed for "shared library" files

Event though the file already has execution permission with chmod +x app. If I run it through the console, it appears to work but closes immediately. No GUI interface is shown at all.

I installed a panic hook but there's no panic going on, it closes without explanation.

When compiling and running on Windows it works fine.

Is there any mechanism in Iced to debug this kind of error?

@twitchyliquid64
Copy link

If I run it through the console, it appears to work but closes immediately. No GUI interface is shown at all.

Is there any output? can you paste the error if so?

I installed a panic hook but there's no panic going on, it closes without explanation.

Can you try running the program with strace and see if it tells you anything interesting?

@sum-elier
Copy link
Contributor Author

sum-elier commented Oct 31, 2020

Is there any output? can you paste the error if so?

No output at all in the terminal either. Runs the application, another terminal pops up really fast, and nothing.

Can you try running the program with strace and see if it tells you anything interesting?

I ran it with strace but I am unsure how to interpret the results. Here's a summary, although I am not sure if it is useful:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 31.11    0.000517           3       154           lstat
 17.93    0.000298          37         8           futex
 13.60    0.000226           4        51           munmap
  7.58    0.000126           0       267       118 openat
  7.40    0.000123           0       153           close
  4.63    0.000077           0        86           writev
  3.25    0.000054           0       182           read
  3.25    0.000054           1        32           readlink
  2.29    0.000038          38         1           write
  2.17    0.000036           0       109        23 recvmsg
  1.74    0.000029           1        23        15 stat
  1.62    0.000027           0       151           fstat
  1.56    0.000026          26         1           shutdown
  1.44    0.000024           0       169           poll
  0.36    0.000006           0        50           getdents64
  0.06    0.000001           0         3           sigaltstack
  0.00    0.000000           0        18           lseek
  0.00    0.000000           0       292           mmap
  0.00    0.000000           0        96           mprotect
  0.00    0.000000           0        13           brk
  0.00    0.000000           0         7           rt_sigaction
  0.00    0.000000           0         3           rt_sigprocmask
  0.00    0.000000           0         8           pread64
  0.00    0.000000           0        55         1 access
  0.00    0.000000           0         2           getpid
  0.00    0.000000           0         2           socket
  0.00    0.000000           0         2           connect
  0.00    0.000000           0         6         1 recvfrom
  0.00    0.000000           0         2           getsockname
  0.00    0.000000           0         2           getpeername
  0.00    0.000000           0         2           clone
  0.00    0.000000           0         1           execve
  0.00    0.000000           0         3           uname
  0.00    0.000000           0         6           fcntl
  0.00    0.000000           0         1           getcwd
  0.00    0.000000           0        21           getuid
  0.00    0.000000           0        21           getgid
  0.00    0.000000           0        21           geteuid
  0.00    0.000000           0        21           getegid
  0.00    0.000000           0         2         1 arch_prctl
  0.00    0.000000           0         1           gettid
  0.00    0.000000           0         2           sched_getaffinity
  0.00    0.000000           0         1           set_tid_address
  0.00    0.000000           0         2           epoll_ctl
  0.00    0.000000           0         1           set_robust_list
  0.00    0.000000           0         1           epoll_create1
  0.00    0.000000           0         1           pipe2
  0.00    0.000000           0         2           prlimit64
  0.00    0.000000           0         5           getrandom
  0.00    0.000000           0         2         1 statx
------ ----------- ----------- --------- --------- ----------------
100.00    0.001662                  2065       160 total

What should I look for in the full output?

@sum-elier
Copy link
Contributor Author

@hecrj is there some kind of tracing/logging enabled across the library to allow debugging this issue? Any suggestions?

@hecrj hecrj added this to the 0.2.0 milestone Nov 3, 2020
@hecrj hecrj added help wanted Extra attention is needed question Further information is requested labels Nov 3, 2020
@hecrj
Copy link
Member

hecrj commented Nov 3, 2020

@sum-elier The tour uses env_logger.

@ibaryshnikov
Copy link
Contributor

Same here, adding features = ["glow"] helped

@sum-elier
Copy link
Contributor Author

@hecrj after adding a logging crate looks like the problem is related to wgpu-rs or the Linux version I am using (Ubuntu 20.04/20.10). The error reads: "Could not enumerate physical devices! Initialization of a object has failed"

@twitchyliquid64
Copy link

What graphics stack are you using?

@sum-elier
Copy link
Contributor Author

sum-elier commented Nov 5, 2020

@twitchyliquid64 Not sure, how do I find out? I am under Ubuntu using X11, is that what you need?

@twitchyliquid64
Copy link

Tell us about your window manager, setup, graphics card, paste the output of glxinfo etc

@sum-elier
Copy link
Contributor Author

Window manager: Gnome 3.38.1
Setup: Ubuntu 20.10 (normal boot and also as guest in VMware)
Graphics card (+driver):

ubuntu@ubuntu:~$ sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       product: GM204 [GeForce GTX 970]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nouveau latency=0
       resources: irq:144 memory:ee000000-eeffffff memory:d0000000-dfffffff memory:e0000000-e1ffffff ioport:e000(size=128) memory:c0000-dffff

glxinfo output (only for VMware case, should be the same for normal boot): gist

@sum-elier
Copy link
Contributor Author

@twitchyliquid64 Do you need more information? I've been unable to debug the cause of the problem yet.

@twitchyliquid64
Copy link

Does this happen when both booting linux in VMWare and on native hardware?

Can you run it with strace normally and post the output (ie: in a gist). It should be insanely long, but thats good.

Im surprised theres no 'error' of any kind. Usually something will be printed to the console. Or in the case of a graphics driver bug you can hit wierd behavior or lockups.

@sum-elier
Copy link
Contributor Author

Does this happen when both booting linux in VMWare and on native hardware?

Can you run it with strace normally and post the output (ie: in a gist). It should be insanely long, but thats good.

Im surprised theres no 'error' of any kind. Usually something will be printed to the console. Or in the case of a graphics driver bug you can hit wierd behavior or lockups.

Yes, it happens in both. Strace of native hardware execution here and for vm execution here

Could this be related to parasyte/pixels#36?

@twitchyliquid64
Copy link

I don't think your terminal is working properly, as we can see that the program is trying to print a gfx error to STDERR (fd 3):

0.000101 write(3, "[2020-11-13 20:45:57][ERROR][gfx"..., 125) = 125

Next steps would be to fix your terminal / however you are running it, so you can see what that error message is.

@sum-elier
Copy link
Contributor Author

I'm pretty sure that it is the previous error:
[2020-11-13 20:45:57][ERROR][gfx_backend_vulkan] Could not enumerate physical devices! Initialization of a object has failed
But, should that be printed to console? I've been dumping that to a file #589 (comment), but only prints that and nothing else

@twitchyliquid64
Copy link

Hold up, im mistaken, stderr is fd 2 ... where is that error going?

No idea why its going to fd 3 ...

@twitchyliquid64
Copy link

And do you have vulkan drivers installed?

@sum-elier
Copy link
Contributor Author

And do you have vulkan drivers installed?

Yes I think. I installed vulkan-tools and vulkan-utils. Is that?

@twitchyliquid64
Copy link

A quick google suggests nouveau does not support vulkan.

@sum-elier
Copy link
Contributor Author

Uh looks like that might be the cause. I'll try to compile it in another system with vulkan support

@hecrj hecrj modified the milestones: 0.2.0, 0.3.0 Nov 26, 2020
@hecrj hecrj modified the milestones: 0.3.0, 0.4.0 Mar 31, 2021
@let4be
Copy link

let4be commented Nov 6, 2021

Is it possible to run on Linux inside VMWare(with 3d acceleration on)?

sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       product: SVGA II Adapter
       vendor: VMware
       physical id: f
       bus info: pci@0000:00:0f.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list rom
       configuration: driver=vmwgfx latency=64
       resources: irq:16 ioport:1070(size=16) memory:e8000000-efffffff memory:fe000000-fe7fffff memory:c0000-dfff

@hecrj hecrj closed this as completed Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested rendering wgpu
Projects
None yet
Development

No branches or pull requests

5 participants