collinalexbell / HackMatrix

A 3d Linux desktop environment (and game engine)
MIT License
457 stars 13 forks source link

pressing v or delete or focusing window crashes #57

Open SwirlyStone5877 opened 6 months ago

SwirlyStone5877 commented 6 months ago

I am using Linux Mint 21.3 (Virginia) if that helps. The logs below are what happens when I launch it using ./matrix and through lightDM. (new people scroll down like 3 messages)

loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
loading material textures
loading texture 0
loading material textures
textureUnit: 20
textureUnit: 21
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  2 (X_ChangeWindowAttributes)
  Serial number of failed request:  75
  Current serial number in output stream:  77
collinalexbell commented 6 months ago

HackMatrix is a window manager and only 1 window manager can be running at a time on any screen, so launching it from lightDM won't work. You will need to launch X from a shell. A good option is to go to tty2 via fn2 (I think, may need to look that up) as the .xinitrc configuration from the readme to ~/.xinitrc (create the file if it doesn't exist), then run startx from the tty2 shell.

SwirlyStone5877 commented 6 months ago

oh ok

SwirlyStone5877 commented 6 months ago

it crashes when trying to use dmenu. everything works fine until i press v. (i used startx /home/swirly/HackMatrix/matrix while in the directory)

Rafi1018 commented 6 months ago

it crashes when trying to use dmenu. everything works fine until i press v. (i used startx /home/swirly/HackMatrix/matrix while in the directory)

I guess try using default dmenu from suckless & see if that works

collinalexbell commented 6 months ago

Is there any type of error text when it crashes? It will have debug output for materials that I unfortunately forgot to delete, but it may also have error information. If you aren't seeing anything in output in crash you may need to try the developer mode with 'trampoline' (see readme)

SwirlyStone5877 commented 6 months ago

trampoline just gives a blank screen, with del or esc not working. startx logs are unreadable with matrix, most of it being enabling and disabling devices with no errors and not any serious warnings (font not found stuff). with trampoline it's the same.

collinalexbell commented 6 months ago

Hmmm. It is difficult to say what is happening. I should probably create a logging PR that improves startup logging so I can help diagnose issues like this. Is the color of the screen grey? That would indicate glfw is booting properly, but nothing is being loaded. If it is black or some other color, that indicates a crash. If you start without trampoline and replicate the error by pressing v, there may be logs in HackMatrix/logs/matrix.log that can help diagnose the problem.

SwirlyStone5877 commented 6 months ago

the trampoline screen is grey. i ran it in a terminal to see what would happen, and...

sh: 1: xdotool: not found
sh: 1: /home/collin/matrix/matrix: not found
Error executing terminator

(over and over again btw)

as for the logs, it's just a bunch of hello worlds and pixmap related stuff that repeat, no serious errors or anything.

collinalexbell commented 6 months ago

sudo apt install xdotool

Try that. I think I need to add another dependency to the readme. Sorry about that.

SwirlyStone5877 commented 6 months ago

well now it's just sh: 1: /home/collin/matrix/matrix: not found over and over again.

collinalexbell commented 6 months ago

Oh. That's not great. It's a hardcoded path in the 'trampoline'. The regular version might work now. I'll get a PR out for that trampoline today.

SwirlyStone5877 commented 6 months ago

so pressing v does this weird thing where it opens dmenu but crashes but with trampoline it just kinda stays open so when i type firefox it opens firefox but also when i focus it it crashes and im not able to interact with it again

SwirlyStone5877 commented 6 months ago

and delete crashes too

collinalexbell commented 6 months ago

Would you try opening and focusing a simpler program, like a terminal? Firefox was difficult to get working, so I want to see if all programs crash or just Firefox.

Also, it's weird that dmenu works under trampoline but not standalone matrix, since trampoline is just a runner for the same executable as the standalone.

SwirlyStone5877 commented 6 months ago

correction: dmenu stays open in the background (not visible) but is still interactable as long as i do not click

as for programs that aren't firefox, i can't test that right now. i will later.

collinalexbell commented 6 months ago

Ok. Can you run it in trampoline. Press <del> to escape to the terminal. Manually run ./matrix in the terminal and then reproduce the crash. There may be useful GL error info that gets printed.

SwirlyStone5877 commented 6 months ago

it happens to all programs, even ones that aren't firefox. and <del> crashes everything, making the steps you listed impossible. not even the terminal opens.

collinalexbell commented 6 months ago

Just had a thought... are you using more than 1 monitor? Right now the code only works with the primary monitor I think.

SwirlyStone5877 commented 6 months ago

no, i'm only using one monitor.

laowumdzz commented 15 hours ago

I’m having the same error, and there is no specific error message in the log either. log.zip