Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
2114aaa9
Commit
2114aaa9
authored
Feb 24, 2009
by
Geoffroy Couprie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: send crash reports to
ftp://crash.videolan.org/crashs/
parent
5dca2e33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
10 deletions
+63
-10
bin/Makefile.am
bin/Makefile.am
+1
-1
bin/winvlc.c
bin/winvlc.c
+62
-9
No files found.
bin/Makefile.am
View file @
2114aaa9
...
@@ -35,7 +35,7 @@ vlc_static_LDADD = $(vlc_LDADD)
...
@@ -35,7 +35,7 @@ vlc_static_LDADD = $(vlc_LDADD)
vlc_static_LDFLAGS
=
$(vlc_LDFLAGS)
-no-install
-static
vlc_static_LDFLAGS
=
$(vlc_LDFLAGS)
-no-install
-static
if
HAVE_WIN32
if
HAVE_WIN32
vlc_LDADD
+=
vlc_win32_rc.
$(OBJEXT)
vlc_LDADD
+=
-lwininet
vlc_win32_rc.
$(OBJEXT)
vlc_DEPENDENCIES
+=
vlc_win32_rc.
$(OBJEXT)
vlc_DEPENDENCIES
+=
vlc_win32_rc.
$(OBJEXT)
endif
endif
...
...
bin/winvlc.c
View file @
2114aaa9
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
# define _WIN32_IE 0x500
# define _WIN32_IE 0x500
# include <shlobj.h>
# include <shlobj.h>
# include <tlhelp32.h>
# include <tlhelp32.h>
# include <wininet.h>
static
void
check_crashdump
();
LONG
WINAPI
vlc_exception_filter
(
struct
_EXCEPTION_POINTERS
*
lpExceptionInfo
);
LONG
WINAPI
vlc_exception_filter
(
struct
_EXCEPTION_POINTERS
*
lpExceptionInfo
);
#endif
#endif
...
@@ -136,6 +138,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
...
@@ -136,6 +138,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
libvlc_exception_init
(
&
dummy
);
libvlc_exception_init
(
&
dummy
);
#if !defined( UNDER_CE ) && defined ( NDEBUG )
#if !defined( UNDER_CE ) && defined ( NDEBUG )
check_crashdump
();
SetUnhandledExceptionFilter
(
vlc_exception_filter
);
SetUnhandledExceptionFilter
(
vlc_exception_filter
);
#endif
#endif
...
@@ -162,26 +165,76 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
...
@@ -162,26 +165,76 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
}
}
#if !defined( UNDER_CE ) && defined ( NDEBUG )
#if !defined( UNDER_CE ) && defined ( NDEBUG )
static
void
get_crashdump_path
(
wchar_t
*
wdir
)
{
if
(
S_OK
!=
SHGetFolderPathW
(
NULL
,
CSIDL_APPDATA
|
CSIDL_FLAG_CREATE
,
NULL
,
SHGFP_TYPE_CURRENT
,
wdir
)
)
fprintf
(
stderr
,
"Can't open the vlc conf PATH
\n
"
);
swprintf
(
wdir
+
wcslen
(
wdir
),
L"%s"
,
L"
\\
vlc
\\
crashdump"
);
}
static
void
check_crashdump
()
{
wchar_t
*
wdir
=
(
wchar_t
*
)
malloc
(
sizeof
(
wchar_t
)
*
MAX_PATH
);
get_crashdump_path
(
wdir
);
FILE
*
fd
=
_wfopen
(
wdir
,
L"r, ccs=UTF-8"
);
if
(
fd
)
{
fclose
(
fd
);
int
answer
=
MessageBox
(
NULL
,
L"VLC media player just crashed."
\
" Do you want to send a bug report to the developers team?"
,
L"VLC crash reporting"
,
MB_YESNO
);
if
(
answer
==
IDYES
)
{
HINTERNET
Hint
=
InternetOpen
(
L"VLC Crash Reporter"
,
INTERNET_OPEN_TYPE_PRECONFIG
,
NULL
,
NULL
,
0
);
if
(
Hint
)
{
HINTERNET
ftp
=
InternetConnect
(
Hint
,
L"crash.videolan.org"
,
INTERNET_DEFAULT_FTP_PORT
,
NULL
,
NULL
,
INTERNET_SERVICE_FTP
,
0
,
0
);
if
(
ftp
)
{
SYSTEMTIME
now
;
GetSystemTime
(
&
now
);
wchar_t
remote_file
[
MAX_PATH
];
swprintf
(
remote_file
,
L"/crashs/%04d%02d%02d%02d%02d%02d"
,
now
.
wYear
,
now
.
wMonth
,
now
.
wDay
,
now
.
wHour
,
now
.
wMinute
,
now
.
wSecond
);
FtpPutFile
(
ftp
,
wdir
,
remote_file
,
FTP_TRANSFER_TYPE_BINARY
,
0
);
InternetCloseHandle
(
ftp
);
}
else
fprintf
(
stderr
,
"Can't connect to FTP server%d
\n
"
,
GetLastError
());
InternetCloseHandle
(
Hint
);
}
}
_wremove
(
wdir
);
}
free
((
void
*
)
wdir
);
}
/*****************************************************************************
/*****************************************************************************
* vlc_exception_filter: handles unhandled exceptions, like segfaults
* vlc_exception_filter: handles unhandled exceptions, like segfaults
*****************************************************************************/
*****************************************************************************/
LONG
WINAPI
vlc_exception_filter
(
struct
_EXCEPTION_POINTERS
*
lpExceptionInfo
)
LONG
WINAPI
vlc_exception_filter
(
struct
_EXCEPTION_POINTERS
*
lpExceptionInfo
)
{
{
wchar_t
wdir
[
MAX_PATH
];
fprintf
(
stderr
,
"unhandled vlc exception
\n
"
);
fprintf
(
stderr
,
"unhandled vlc exception
\n
"
);
if
(
S_OK
!=
SHGetFolderPathW
(
NULL
,
wchar_t
*
wdir
=
(
wchar_t
*
)
malloc
(
sizeof
(
wchar_t
)
*
MAX_PATH
);
CSIDL_APPDATA
|
CSIDL_FLAG_CREATE
,
get_crashdump_path
(
wdir
);
NULL
,
SHGFP_TYPE_CURRENT
,
wdir
)
)
fprintf
(
stderr
,
"Can't open the vlc conf PATH
\n
"
);
swprintf
(
wdir
+
wcslen
(
wdir
),
L"%s"
,
L"
\\
vlc
\\
crashdump"
);
FILE
*
fd
=
_wfopen
(
wdir
,
L"w, ccs=UTF-8"
);
FILE
*
fd
=
_wfopen
(
wdir
,
L"w, ccs=UTF-8"
);
free
((
void
*
)
wdir
);
if
(
!
fd
)
if
(
!
fd
)
{
fprintf
(
stderr
,
"
\n
error while opening file"
);
fprintf
(
stderr
,
"
\n
error while opening file"
);
exit
(
1
);
}
OSVERSIONINFO
osvi
;
OSVERSIONINFO
osvi
;
ZeroMemory
(
&
osvi
,
sizeof
(
OSVERSIONINFO
)
);
ZeroMemory
(
&
osvi
,
sizeof
(
OSVERSIONINFO
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment