Ticket #519 (closed bug: fixed)
Crash dump handler output, isn't working correctly on windows
| Reported by: | Buginator | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | unspecified |
| Component: | other | Version: | unspecified |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: | ||
| Operating System: | All/Non-Specific |
Description
Currently, we are getting dumps like so:
------------------- Error occured on Wednesday, May 20, 2009 at 18:27:05. Warzone 2100 version: Version 2.2 branch r7471 (modified locally) - Built May 20 2009 Program: A:\2.2wz\data\warzone2100.exeA:\2.2wz\data\warzone2100.exe caused an Access Violation at location 77c47631 in module C:\WINNT4\system32\msvcrt.dll Writing to location 00000000.
On linux, we get dumps like so:
Program: ./src/warzone2100(warzone2100) Command line: "./src/warzone2100" Version: Version 2.2 branch r7471 (modified locally) - Built May 20 2009 - DEBUG Distributor: UNKNOWN Compiled on: May 20 2009 22:36:11 Compiled by: GCC 4.3.2 Executed on: Wed May 20 21:36:51 2009 Operating system: Linux Node name: xxxxx Release: 2.6.26-2-486 Version: #1 Thu Mar 26 00:13:41 UTC 2009 Machine: i686 Pointers: 32bit Compiled against PhysicsFS version: 1.1.1 Running with PhysicsFS version: 1.1.1 Dump caused by signal: SIGSEGV: Invalid memory reference: Address not mapped to object
And now, after the fix, on windows, we gets dumps like so:
------------------- Error occured on Wednesday, May 20, 2009 at 19:53:25. Program: A:\2.2wz\data\warzone2100.exe(warzone2100) Command line: "warzone2100.exe" Version: Version 2.2 branch r7471 (modified locally) - Built May 20 2009 Distributor: UNKNOWN Compiled on: May 20 2009 19:50:54 Compiled by: GCC 4.2.1-sjlj (mingw32-2) Executed on: Wed May 20 19:53:24 2009 Pointers: 32bit Compiled against PhysicsFS version: 1.0.1 Running with PhysicsFS version: 1.0.1 A:\2.2wz\data\warzone2100.exe caused an Access Violation at location 77c47631 in module C:\WINNT4\system32\msvcrt.dll Writing to location 00000000.
Issue was that after this:
std::string programPath(buf.begin(), buf.end());
programPath would have a ton of \0's after it (up to buf.size()), and this resulted in chopped off information. (In other words, the other information was tacked onto the *end* of programPath. "Program: blah blah blah \0\0\0\0\0\0\0\0\0\0\0...\0Command line: blah blah blah", so we never saw it.)
(doing a ticket, since I didn't want to write a huge comment in the svn log about this issue)
Attachments
Change History
comment:2 Changed 3 years ago by Buginator
- Status changed from new to closed
- Resolution set to fixed
comment:1 Changed 3 years ago by Buginator
Note, what controls MAC dumps?
I can't seem to find the routine?
comment:3 Changed 3 years ago by Buginator
(In [7476]) Fix windows crash dump report, by returning back a c_str() instead of a string.
Fixes ticket:519
comment:4 Changed 3 years ago by Buginator
(In [7480]) Backport r7476-r7479
Using ASSERT_OR_RETURN macro to prevent GIGO (Garbage in, Garbage out). -- Fix strlcpy() & strlcat() to use ASSERT_OR_RETURN -- apply a bug fix patch from travisellett which fixed a minimap / radar issue.
Closes ticket:333
Thanks for the patch! -- Fix windows crash dump report, by returning back a c_str() instead of a string.
Fixes ticket:519

(In [7473]) Pass back a c_str() instead of the string for the getProgramPath() function.
Fixes ticket:519