Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Albert Gräf
Gem
Commits
78ba32d6
Commit
78ba32d6
authored
Feb 04, 2019
by
IOhannes m zmölnig
Browse files
Revert "liberal spread of GEMMARK() to nail down a problem with uncaught exceptions on W32"
This reverts commit
fa34f20c
.
parent
fa34f20c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Gem/Dylib.cpp
View file @
78ba32d6
...
...
@@ -120,19 +120,15 @@ public:
sys_bashfilename
(
filename
.
c_str
(),
buf
);
UINT
errorboxflags
=
SetErrorMode
(
SEM_FAILCRITICALERRORS
);
SetLastError
(
0
);
GEMMARK
();
handle
->
w32handle
=
LoadLibraryEx
(
buf
,
NULL
,
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
);
DWORD
errorNumber
=
GetLastError
();
GEMMARK
();
errorboxflags
=
SetErrorMode
(
errorboxflags
);
if
(
handle
->
w32handle
)
{
handle
->
fullname
=
filename
;
GEMMARK
();
return
handle
;
}
#endif
GEMMARK
();
delete
handle
;
handle
=
NULL
;
...
...
@@ -147,7 +143,6 @@ GEMMARK();
#endif
#ifdef _WIN32
LPVOID
lpErrorMessage
=
NULL
;
GEMMARK
();
if
(
errorNumber
)
{
FormatMessage
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
...
...
@@ -171,18 +166,13 @@ GEMMARK();
errbuf
[
10
-
1
]
=
0
;
error
+=
errbuf
;
error
+=
")"
;
GEMMARK
();
if
(
lpErrorMessage
)
{
GEMMARK
();
error
+=
(
const
char
*
)
lpErrorMessage
;
}
std
::
cerr
<<
"GemDylib throwing: "
<<
error
<<
std
::
endl
;
GEMMARK
();
throw
(
GemException
(
std
::
string
(
error
)));
GEMMARK
();
#endif
GEMMARK
();
return
NULL
;
}
...
...
src/plugins/PluginFactory.cpp
View file @
78ba32d6
...
...
@@ -64,18 +64,16 @@ int gem::BasePluginFactory::doLoadPlugins(const std::string&basename,
}
std
::
cerr
<<
"load plugins '"
<<
basename
<<
"' in '"
<<
path
<<
"'"
<<
std
::
endl
;
GEMMARK
();
std
::
string
pattern
=
path
+
std
::
string
(
"gem_"
)
+
basename
+
std
::
string
(
"*"
)
+
GemDylib
::
getDefaultExtension
();
std
::
cerr
<<
"pattern : "
<<
pattern
<<
std
::
endl
;
GEMMARK
();
unsigned
int
count
=
0
;
std
::
vector
<
std
::
string
>
files
=
gem
::
files
::
getFilenameListing
(
pattern
);
unsigned
int
i
=
0
;
GEMMARK
();
for
(
i
=
0
;
i
<
files
.
size
();
i
++
)
{
GemDylib
*
dll
=
NULL
;
const
std
::
string
f
=
files
[
i
];
...
...
@@ -83,9 +81,7 @@ GEMMARK();
// LATER make checks more sophisticated (like checking file-handles)
bool
alreadyloaded
=
false
;
unsigned
int
j
;
GEMMARK
();
for
(
j
=
0
;
j
<
m_pimpl
->
p_loaded
.
size
();
j
++
)
verbose
(
2
,
"%s:%d[%s]: loaded[%d]?"
,
j
);
if
(
f
==
m_pimpl
->
p_loaded
[
j
])
{
alreadyloaded
=
true
;
std
::
cerr
<<
"not reloading '"
<<
f
<<
"'"
<<
std
::
endl
;
...
...
@@ -95,26 +91,19 @@ GEMMARK();
continue
;
}
GEMMARK
();
std
::
cerr
<<
"dylib loading file '"
<<
f
<<
"'!"
<<
std
::
endl
;
dll
=
NULL
;
try
{
GEMMARK
();
dll
=
new
GemDylib
(
f
,
""
);
GEMMARK
();
}
catch
(
GemException
&
x
)
{
GEMMARK
();
// oops, on w32 this might simply be because getFilenameListing() stripped the path
// so let's try again, with Path added...
if
(
f
.
find
(
path
)
==
f
.
npos
)
{
try
{
std
::
string
f1
=
path
;
f1
+=
f
;
GEMMARK
();
dll
=
new
GemDylib
(
f1
,
""
);
GEMMARK
();
}
catch
(
GemException
&
x1
)
{
GEMMARK
();
// giving up
std
::
cerr
<<
"library loading returned: "
<<
x1
.
what
()
<<
std
::
endl
;
dll
=
NULL
;
...
...
@@ -126,19 +115,15 @@ GEMMARK();
}
if
(
dll
)
{
// loading succeeded
try
{
GEMMARK
();
m_pimpl
->
p_loaded
.
push_back
(
f
);
count
++
;
}
catch
(
GemException
&
x
)
{
GEMMARK
();
std
::
cerr
<<
"plugin loading returned: "
<<
x
.
what
()
<<
std
::
endl
;
}
GEMMARK
();
}
}
GEMMARK
();
return
count
;
}
...
...
src/plugins/film.cpp
View file @
78ba32d6
...
...
@@ -175,16 +175,13 @@ public:
m_handle
(
NULL
),
m_canThread
(
true
)
{
GEMMARK
();
gem
::
PluginFactory
<
gem
::
plugins
::
film
>::
loadPlugins
(
"film"
);
GEMMARK
();
std
::
vector
<
std
::
string
>
ids
=
gem
::
PluginFactory
<
gem
::
plugins
::
film
>::
getIDs
();
if
(
!
addPlugin
(
ids
,
"DirectShow"
))
{
addPlugin
(
ids
,
"AVI"
);
}
GEMMARK
();
addPlugin
(
ids
,
"gmerlin"
);
addPlugin
(
ids
,
"QuickTime"
);
...
...
@@ -192,9 +189,7 @@ GEMMARK();
addPlugin
(
ids
,
"MPEG3"
);
addPlugin
(
ids
,
"aviplay"
);
addPlugin
(
ids
,
"MPEG1"
);
GEMMARK
();
addPlugin
(
ids
);
GEMMARK
();
unsigned
int
i
;
for
(
i
=
0
;
i
<
m_handles
.
size
();
i
++
)
{
...
...
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