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

Crash off of first install on 0.6.2 #82

Closed
Braxbro opened this issue Mar 26, 2024 · 12 comments · Fixed by #93
Closed

Crash off of first install on 0.6.2 #82

Braxbro opened this issue Mar 26, 2024 · 12 comments · Fixed by #93
Labels
bug Something isn't working

Comments

@Braxbro
Copy link

Braxbro commented Mar 26, 2024

When installing YAFC-CE from scratch (ver. 0.6.2) on a separate disk from my Factorio install (same PC) YAFC launches to a blank white screen then closes immediately.

I'm running on Windows 10 Pro.

Steps to reproduce:

  • Don't have YAFC-CE at all
  • Install YAFC-CE by downloading 0.6.2 & extracting it to a separate disk (with symlinks to the main disk, if that matters?)
  • Attempt to launch YAFC-CE
@Braxbro Braxbro added the bug Something isn't working label Mar 26, 2024
@nnguyen259
Copy link

I also get the crash from a fresh install with no symlink involved

@shpaass shpaass added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Mar 29, 2024
@shpaass
Copy link
Owner

shpaass commented Mar 30, 2024

Removing the tag help wanted from this ticket since we have a bigger fire to put out.

@AnakinShieh
Copy link

failed to start on both windows and mac(apple silicon)

@shihan42
Copy link
Collaborator

shihan42 commented Apr 3, 2024

How does this fail? Can you describe what happens?

And @nnguyen259: Which OS? Are Factorio and YAFC also on different drives?

The more information we have, the easier a fix would be.

@shpaass
Copy link
Owner

shpaass commented Apr 3, 2024

On a side note, I suggest to try the recent pre-release to see if anything changes.

jeady added a commit to jeady/yafc-ce that referenced this issue Apr 5, 2024
… selected.

This bug was introduced in shpaass@8f1e04e by changing `struct RecentProject` to `class ProjectDefinition`. By making this type a reference, the default value is now null, instead of an object with all fields set to default, which leads to crashes when it is dereferenced.

This fix makes the SetProject() function accept null as an arugment and then configures all variables as they would have been before. This continues to run the intialization code. Alternatively, we could skip the call to SetProject() entirely -- with my limited understanding of the code base, I don't know if that's safe or not.
shihan42 added a commit that referenced this issue Apr 6, 2024
Fixes #82 

This bug was introduced in
8f1e04e
by changing `struct RecentProject` to `class ProjectDefinition`. By
making this type a reference, the default value is now null, instead of
an object with all fields set to default, which leads to crashes when it
is dereferenced.

This fix makes the SetProject() function accept null as an arugment and
then configures all variables as they would have been before. This
continues to run the intialization code. Alternatively, we could skip
the call to SetProject() entirely -- with my limited understanding of
the code base, I don't know if that's safe or not. I don't feel strongly
about the approach, happy to do either.

#89 also fixes this by
skipping the call to SetProject() if project is null, but I think it
makes sense to decouple this quick bug fix from the rest of the feature
work there.
@shihan42 shihan42 reopened this Apr 6, 2024
@shihan42
Copy link
Collaborator

shihan42 commented Apr 6, 2024

I'm reopening this since I'd like to have some validation if it really fixed the crash.

@shadghost
Copy link

I tried both the RC and the 0.6.2 and it just starts a white window and then crashes in Windows. Are there logs anywhere that I can post here?

@shpaass
Copy link
Owner

shpaass commented Apr 11, 2024

@shadghost please try versions prevoius to 0.6.2 and let us know the results. That will help to understand the issue better.

@shadghost
Copy link

Workaround: Download / start 0.6.1, it will error out on flib, after you get to the flib error download and start 0.6.3-RC1 and it will start and everything works.

@shpaass
Copy link
Owner

shpaass commented Apr 12, 2024

I've made a release yesterday that should include the fix to that problem. Feel free to try it out. (Thank you @jeady!)

@shihan42
Copy link
Collaborator

Any news on this?

@shpaass
Copy link
Owner

shpaass commented May 10, 2024

I think we close this one and make a new issue if more crashes get reported.

@shpaass shpaass closed this as completed May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants