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

Crashes on startup (windows) #485

Open
MaybeHawk1 opened this issue Dec 24, 2024 · 17 comments
Open

Crashes on startup (windows) #485

MaybeHawk1 opened this issue Dec 24, 2024 · 17 comments

Comments

@MaybeHawk1
Copy link

Bug:
Focus.exe crashes on startup.
I have tried to run as adminstrator, that did not work either.
I have tried to run the exe from powershell by running ./focus.exe, that did not work either.

Steps to reproduce the behavior:

  1. Download focus from the github releases page.
  2. Open focus.exe by clickling on it or by running .\focus.exe in powershell

Expected behavior:
The app should open and work as expected

  • OS: Windows
  • Focus Version: 0.3.7

Additional context:
The app does not give any error code or anything like that, it just crashes

@MaybeHawk1
Copy link
Author

Update:
While opening this issue, i did not notice the log_error.txt file, it contains one line and it says this

24 December 2024, 13:44:55: CPU doesn't support AES instructions. A slower hash function will be used.

That is the whole log_error.txt file

@anuragtyagi-dev
Copy link

CPU doesn't support AES instructions. A slower hash function will be used.

What's your Hardware ? Which CPU ?

@MaybeHawk1
Copy link
Author

CPU doesn't support AES instructions. A slower hash function will be used.

What's your Hardware ? Which CPU ?

I have a Ryzen 5 2600

@focus-editor
Copy link
Owner

@MaybeHawk1 please can you run this debug build in the terminal and tell us what it prints
focus.zip

@MaybeHawk1
Copy link
Author

Yes, of course, I will once i have access to my PC again.

@MaybeHawk1
Copy link
Author

@focus-editor I'm gonna make an educated guess and just say that this is happening because of meow hash. But why would it crash since my CPU Does infact support AES Instructions?
I can not read the stacktrace since the app crashes immediately.

@focus-editor
Copy link
Owner

focus-editor commented Dec 30, 2024 via email

@MaybeHawk1
Copy link
Author

MaybeHawk1 commented Dec 30, 2024

@focus-editor I opened the debug build, it just prints the same error message. I may have a theory on how to fix it.

What if instead of meow_hash we used get_hash(bytes) i do know that it is worse but for now it's gonna make the app at least run i think. as of right now i don't have access to the jai binary so if somebody could compile this and send me the exe it would be appreciated.

// NOTE: calculates only 64 bits
calculate_meow_hash :: (bytes: [] u8) -> u64 {
    // #asm { hash: vec; }

    // MeowHash(MeowDefaultSeed, xx bytes.count, bytes.data, hash);

    // return MeowU64From(hash, 0);
    
    return get_hash(bytes);
}

fallback_hash :: (bytes: [] u8) -> u64 {
    return Hash.get_hash(bytes);
}

#scope_file

#import "meow_hash";

Edit

Forgot to say please also add

#import "Hash"

Into main.jai

@focus-editor
Copy link
Owner

I don't think it's that one, because if the message about a slower hash function is printed then we should already be using the fallback hash.

But just to be sure here's a build which disables meow hash focus.zip

@focus-editor
Copy link
Owner

If that fails I suggest that you reinstall your graphics driver, this has caused similar crashes in the past

@MaybeHawk1
Copy link
Author

I don't think it's that one, because if the message about a slower hash function is printed then we should already be using the fallback hash.

But just to be sure here's a build which disables meow hash focus.zip

I tried the build without meow hash and it still just crashes on startup

the whole log_error.txt

30 December 2024, 13:44:37: CPU doesn't support AES instructions. A slower hash function will be used.

If that fails I suggest that you reinstall your graphics driver, this has caused similar crashes in the past

Gonna try this one now

@MaybeHawk1
Copy link
Author

Unfortunately, reinstalling my GPU drivers didn't do anything.

@focus-editor
Copy link
Owner

focus-editor commented Dec 30, 2024 via email

@MaybeHawk1
Copy link
Author

@focus-editor Hello, Sorry for the late response i've been a bit busy, I ran focus.exe directly from CMD so the stacktrace printed there, here is an screenshot.

focus_crash

@MaybeHawk1
Copy link
Author

@focus-editor Hello, Sorry for the late response i've been a bit busy, I ran focus.exe directly from CMD so the stacktrace printed there, here is an screenshot.

focus_crash

Question: Do i need jai installed to use this? The app is already compiled so i didn't think i would need jai.

@focus-editor
Copy link
Owner

OK this is an internal Jai problem, it's trying to execute an instruction popcnt.q, which your processor doesn't seem to support.
We're going to report a bug, but before that we need you to run 3 diagnostic programs from CMD and tell us what they print.

cpu_info_exes.zip

It's expected that the get_cpu_count ones will both fail, but they are compiled with 2 different compiler versions, so we need to check if a later version has fixed it.

Please also give the full name of your CPU. Thanks.

@MaybeHawk1
Copy link
Author

OK this is an internal Jai problem, it's trying to execute an instruction popcnt.q, which your processor doesn't seem to support.
We're going to report a bug, but before that we need you to run 3 diagnostic programs from CMD and tell us what they print.

cpu_info_exes.zip

It's expected that the get_cpu_count ones will both fail, but they are compiled with 2 different compiler versions, so we need to check if a later version has fixed it.

Please also give the full name of your CPU. Thanks.

Hello, Sorry i am on vacation, and i don't have access to my pc right now. i will run it as soon as i have access to my pc again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants