-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Do not add extra new line if there is one exist #8538
Conversation
@@ -333,7 +333,7 @@ namespace dmCrash | |||
if (lineend && lineend < end) | |||
*lineend = 0; | |||
|
|||
dmLogError("%s\n", p); |
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.
What was the problem?
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.
Crash creates an extra new line symbol on each likne even if we know there is a new line symbol in the end of line.
that's how crash looks before
INFO:CRASH: Successfully wrote Crashdump to file: /Users/agulev/Library/Application Support/Defold/_crash
ERROR:CRASH: CALL STACK:
ERROR:CRASH: 0 dmengine 0x000000010113b304 _ZN7dmCrash7OnCrashEi + 104
ERROR:CRASH: 1 libsystem_platform.dylib 0x0000000181209a24 _sigtramp + 56
ERROR:CRASH: 2 dmengine 0x0000000100f3b954 _ZN12dmGameSystem16AcquireResourcesEPNS_14PhysicsContextEPN10dmResource16SResourceFactoryEPKvjPNS_23CollisionObjectResourceEPKc + 1780
ERROR:CRASH: 3 dmengine 0x0000000100f3c2ec _ZN12dmGameSystem24ResCollisionObjectCreateERKN10dmResource20ResourceCreateParamsE + 116
ERROR:CRASH: 4 dmengine 0x0000000100ed4d60 _ZN10dmResourceL16DoCreateResourceEPNS_16SResourceFactoryEPNS_13SResourceTypeEPKcS5_yPvjPS6_ + 184
ERROR:CRASH: 5 dmengine 0x0000000100ed52d0 _ZN10dmResource3GetEPNS_16SResourceFactoryEPKcPPv + 800
ERROR:CRASH: 6 dmengine 0x0000000100ecb378 _ZN12dmGameObjectL16AcquireResourcesEPN10dmResource16SResourceFactoryEPNS_8RegisterEPN15dmGameObjectDDF13PrototypeDescEPNS_9PrototypeEPKc + 272
ERROR:CRASH: 7 dmengine 0x0000000100ecb000 _ZN12dmGameObjectL19ResGameObjectCreateERKN10dmResource20ResourceCreateParamsE + 96
ERROR:CRASH: 8 dmengine 0x0000000100ed4d60 _ZN10dmResourceL16DoCreateResourceEPNS_16SResourceFactoryEPNS_13SResourceTypeEPKcS5_yPvjPS6_ + 184
ERROR:CRASH: 9 dmengine 0x0000000100ed52d0 _ZN10dmResource3GetEPNS_16SResourceFactoryEPKcPPv + 800
ERROR:CRASH: 10 dmengine 0x0000000100eca750 _ZN12dmGameObjectL16AcquireResourcesEPKcPN10dmResource16SResourceFactoryEPNS_8RegisterEPN15dmGameObjectDDF14CollectionDescES1_PPNS_16CollectionHandleE + 396
ERROR:CRASH: 11 dmengine 0x0000000100eca2ec _ZN12dmGameObjectL19ResCollectionCreateERKN10dmResource20ResourceCreateParamsE + 52
ERROR:CRASH: 12 dmengine 0x0000000100ed4d60 _ZN10dmResourceL16DoCreateResourceEPNS_16SResourceFactoryEPNS_13SResourceTypeEPKcS5_yPvjPS6_ + 184
ERROR:CRASH: 13 dmengine 0x0000000100ed52d0 _ZN10dmResource3GetEPNS_16SResourceFactoryEPKcPPv + 800
ERROR:CRASH: 14 dmengine 0x0000000100ea1140 _ZN8dmEngine4InitEPNS_6EngineEiPPc + 10640
ERROR:CRASH: 15 dmengine 0x0000000100ea339c _Z14dmEngineCreateiPPc + 104
ERROR:CRASH: 16 dmengine 0x0000000100ea5b98 _ZN8dmEngine7RunLoopEPKNS_13RunLoopParamsE + 168
ERROR:CRASH: 17 dmengine 0x0000000100ea597c _ZL10EngineMainiPPc + 120
ERROR:CRASH: 18 dmengine 0x0000000100ea58f8 _Z11engine_mainiPPc + 32
ERROR:CRASH: 19 dmengine 0x0000000100e9d734 main + 36
ERROR:CRASH: 20 dyld 0x0000000180e590e0 start + 2360
ERROR:CRASH:
[1] 62848 segmentation fault ./tmp/dynamo_home/bin/arm64-macos/dmengine
and here is how it looks with the fix
ERROR:CRASH: CALL STACK:
ERROR:CRASH: 0 dmengine 0x0000000101127240 _ZN7dmCrash7OnCrashEi + 144
ERROR:CRASH: 1 dmengine 0x00000001011274f0 _ZN7dmCrashL7HandlerEiP9__siginfoPv + 60
ERROR:CRASH: 2 libsystem_platform.dylib 0x0000000181209a24 _sigtramp + 56
ERROR:CRASH: 3 dmengine 0x0000000100f27014 _ZN12dmGameSystem16AcquireResourcesEPNS_14PhysicsContextEPN10dmResource16SResourceFactoryEPKvjPNS_23CollisionObjectResourceEPKc + 1780
ERROR:CRASH: 4 dmengine 0x0000000100f279ac _ZN12dmGameSystem24ResCollisionObjectCreateERKN10dmResource20ResourceCreateParamsE + 116
ERROR:CRASH: 5 dmengine 0x0000000100ec0430 _ZN10dmResourceL16DoCreateResourceEPNS_16SResourceFactoryEPNS_13SResourceTypeEPKcS5_yPvjPS6_ + 184
ERROR:CRASH: 6 dmengine 0x0000000100ec09a0 _ZN10dmResource3GetEPNS_16SResourceFactoryEPKcPPv + 800
ERROR:CRASH: 7 dmengine 0x0000000100eb6a48 _ZN12dmGameObjectL16AcquireResourcesEPN10dmResource16SResourceFactoryEPNS_8RegisterEPN15dmGameObjectDDF13PrototypeDescEPNS_9PrototypeEPKc + 272
ERROR:CRASH: 8 dmengine 0x0000000100eb66d0 _ZN12dmGameObjectL19ResGameObjectCreateERKN10dmResource20ResourceCreateParamsE + 96
ERROR:CRASH: 9 dmengine 0x0000000100ec0430 _ZN10dmResourceL16DoCreateResourceEPNS_16SResourceFactoryEPNS_13SResourceTypeEPKcS5_yPvjPS6_ + 184
ERROR:CRASH: 10 dmengine 0x0000000100ec09a0 _ZN10dmResource3GetEPNS_16SResourceFactoryEPKcPPv + 800
ERROR:CRASH: 11 dmengine 0x0000000100eb5e20 _ZN12dmGameObjectL16AcquireResourcesEPKcPN10dmResource16SResourceFactoryEPNS_8RegisterEPN15dmGameObjectDDF14CollectionDescES1_PPNS_16CollectionHandleE + 396
ERROR:CRASH: 12 dmengine 0x0000000100eb59bc _ZN12dmGameObjectL19ResCollectionCreateERKN10dmResource20ResourceCreateParamsE + 52
ERROR:CRASH: 13 dmengine 0x0000000100ec0430 _ZN10dmResourceL16DoCreateResourceEPNS_16SResourceFactoryEPNS_13SResourceTypeEPKcS5_yPvjPS6_ + 184
ERROR:CRASH: 14 dmengine 0x0000000100ec09a0 _ZN10dmResource3GetEPNS_16SResourceFactoryEPKcPPv + 800
ERROR:CRASH: 15 dmengine 0x0000000100e8c810 _ZN8dmEngine4InitEPNS_6EngineEiPPc + 10640
ERROR:CRASH: 16 dmengine 0x0000000100e8ea6c _Z14dmEngineCreateiPPc + 104
ERROR:CRASH: 17 dmengine 0x0000000100e91268 _ZN8dmEngine7RunLoopEPKNS_13RunLoopParamsE + 168
ERROR:CRASH: 18 dmengine 0x0000000100e9104c _ZL10EngineMainiPPc + 120
ERROR:CRASH: 19 dmengine 0x0000000100e90fc8 _Z11engine_mainiPPc + 32
ERROR:CRASH: 20 dmengine 0x0000000100e88e04 main + 36
ERROR:CRASH: 21 dyld 0x0000000180e590e0 start + 2360
ERROR:CRASH:
[1] 63869 segmentation fault ./tmp/dynamo_home/bin/arm64-macos/dmengine
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.
Then dmLogError("%s", p);
should suffice imho.
The lineend
is for terminating the p
string, and also exitin the loop.
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.
looks good, small change needed
@@ -333,7 +333,7 @@ namespace dmCrash | |||
if (lineend && lineend < end) | |||
*lineend = 0; | |||
|
|||
dmLogError("%s\n", p); |
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.
Then dmLogError("%s", p);
should suffice imho.
The lineend
is for terminating the p
string, and also exitin the loop.
PR checklist
Example of a well written PR description:
### Technical changes
Technical changes:
Technical notes: