-
-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to make workaround for xrGame CTD.
Also enabled autosave.
- Loading branch information
1 parent
f517280
commit 7309acb
Showing
2 changed files
with
37 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this commit along with the next one. Here's why:
What's the problem with autosave you think you've fixed? It just works in vanilla release. Even if there's a problem, you should fix it in the separate commit.
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another thing: have you found exact reason of the crash? What is the fix here?
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: since @awdavies have assigned #11 to himself, you should ask him first if he don't mind if you take his task.
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nitrocaster Please, explain, which conventions I broke. For example, variable naming - should conform.
I also don't think that's a good fix.
And autosave: as you can see, autosave every N minutes of gaming is disabled. I've enabled it.
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nitrocaster Okay, opening brackets. Will fix that.
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you know that? It worked before and crashed occasionally. The code you wrapped doesn't throw exceptions you're trying to catch.
In that case, work on your own tasks, awdavies assigned himself on this. If you don't know the reason of crash - you can't really fix it.
For conventions: tabs and indentation. Open and close brackets of a section should be on the same level (though there's no exact rule for try..catch.. blocks, it's still a 'section').
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also once thing I haven't yet mentioned in conventions. You should prefer cross-platform types over platform-specific ones
BOOL lDestroy = TRUE;
Since we use C++ with its nice bool type, we can simply write:
bool destroy = true;
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so.
BOOL
is declared asint
there. AndTRUE
is1
.In my opinion, it is not considered redundant. TODO says, that it should me enabled in Release version.
CTD was permanent on Release configuration, so it always crashed, and not occasionally. So, if I see, that I can play with that workaround for about 5 minutes(then, I simply left the game), then, I think, I can be sure, that it works.
I'm really sorry for interruption of work, but I've fixed it, because I couldn't test my changes, and it works. Maybe, @awdavies will find out better way to fix that issue(and revert that commit), but for now it works.
7309acb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said, you should not use windows-specific types when you can use cross-platform ones. BOOL is windows-specific (in addition, it breaks conventions).
Well, at least one should be able to disable it. Better - discuss it with other collaborators.
I asked you if you have found the reason of crash. Have you?
This is what are branches for.
Let it be as it is, but next time consider following: