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

Initial pass on some logging that would be helpful for debugging crashes/problems #1457

Merged

Conversation

garrettjoecox
Copy link
Contributor

@garrettjoecox garrettjoecox commented Sep 10, 2022

This is not meant to be an exhaustive amount of logging but just a simple starting point to provide more information for crashes and debugging.

Example log of creating & loading a save, walking over to Mido's house, opening the chests, saving and quitting.

[info] Resource Manager LoadFileThread started
[info] Resource Manager LoadResourceThread started
[error] Failed add SDL game controller mappings from "gamecontrollerdb.txt" (Invalid RWops)
[info] Scene Init - sceneNum: 0x51, entranceIndex:  0xcd
[info] Room Init - curRoom.num: 0
[info] Save File - fileNum: 0
[info] Load File - fileNum: 0
[info] Scene Init - sceneNum: 0x34, entranceIndex:  0xbb
[info] Room Init - curRoom.num: 0
[info] Scene Init - sceneNum: 0x55, entranceIndex:  0x211
[info] Room Init - curRoom.num: 0
[info] Scene Init - sceneNum: 0x28, entranceIndex:  0x433
[info] Room Init - curRoom.num: 0
[info] Treasure Flag Set - 0x2
[info] Display Text - textId: 0xcc
[info] Item Give - item: 0x85
[info] Treasure Flag Set - 0
[info] Display Text - textId: 0xcc
[info] Item Give - item: 0x85
[info] Treasure Flag Set - 0x3
[info] Display Text - textId: 0xf1
[info] Item Give - item: 0x87
[info] Treasure Flag Set - 0x1
[info] Display Text - textId: 0xcc
[info] Item Give - item: 0x85
[info] Save File - fileNum: 0

Build Artifacts

@briaguya-ai
Copy link
Contributor

seems this may be able to tie in with some of the stuff we talked about in #1440

@Kenix3
Copy link
Collaborator

Kenix3 commented Sep 20, 2022

This opens a broader question of what to do with the authentic game's printfs. They give a ton of information, in japanese. This information would also be helpful in a crash situation. We can also translate to english in the code.

Alternatively we can start with this PR using a new macro and only enable our prints and start a whole new log output.

@briaguya-ai @dcvz which direction would you two prefer to go?

@garrettjoecox
Copy link
Contributor Author

@briaguya-ai do we want this or should we just close it in favor of eventual #1523 ?

@briaguya-ai
Copy link
Contributor

it depends, i think the idea is to include all of the authentic logs in addition to any logs we feel might be useful. this PR seems good as long as any overlap is handled gracefully

@garrettjoecox garrettjoecox force-pushed the brief-logging-pass branch 3 times, most recently from 2a25d4c to d9584ae Compare October 19, 2022 14:30
@garrettjoecox garrettjoecox added the do not merge Not ready or not valid changes label Oct 24, 2022
@garrettjoecox garrettjoecox force-pushed the brief-logging-pass branch 6 times, most recently from 3f1d237 to 5c70458 Compare November 7, 2022 17:24
@garrettjoecox garrettjoecox force-pushed the brief-logging-pass branch 2 times, most recently from a310371 to a5de5d4 Compare November 14, 2022 16:04
@garrettjoecox garrettjoecox removed libultraship do not merge Not ready or not valid changes labels Nov 14, 2022
@garrettjoecox garrettjoecox force-pushed the brief-logging-pass branch 4 times, most recently from 8285f02 to 9578282 Compare November 22, 2022 17:24
@garrettjoecox garrettjoecox force-pushed the brief-logging-pass branch 3 times, most recently from ec48847 to b14bc9f Compare December 5, 2022 20:02
@garrettjoecox garrettjoecox force-pushed the brief-logging-pass branch 2 times, most recently from d44cdac to 7e5fdf9 Compare December 9, 2022 16:05
@garrettjoecox garrettjoecox force-pushed the brief-logging-pass branch 2 times, most recently from 1577412 to f7938c0 Compare December 29, 2022 16:39
@briaguya-ai briaguya-ai added the merge conflicts PR has conflicts that need to be resolved before it can be merged label Jan 19, 2023
@garrettjoecox garrettjoecox removed the merge conflicts PR has conflicts that need to be resolved before it can be merged label Jan 23, 2023
Copy link
Contributor

@briaguya-ai briaguya-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been open for a year, i say we merge it or close it (and i'm cool with merging it)

Copy link
Contributor

@aMannus aMannus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually looks really helpful, as especially when the crash is inside a draw call or something the information is often near useless on its own.

@garrettjoecox garrettjoecox merged commit 7dffd63 into HarbourMasters:develop Sep 15, 2023
8 checks passed
@garrettjoecox garrettjoecox deleted the brief-logging-pass branch September 15, 2023 02:31
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

Successfully merging this pull request may close these issues.

None yet

6 participants