Bug#497633: gnash: Filled up .xsession-errors with error messages

2009-12-17 Thread Petter Reinholdtsen
[Petter Reinholdtsen]
 Have not investigated this issue so far.

Was able to build on another machine, so I will ignore the segfault
and assume it is a local problem on that machine.

Here is an updated and tested patch.  It got rid of a lot of the
messages that used to fill up .xsession-errors.  The original patch
had a few typos which are fixed now.

Happy hacking,
-- 
Petter Reinholdtsen
--- gnash-0.8.4.orig/plugin/plugin.cpp
+++ gnash-0.8.4/plugin/plugin.cpp
@@ -47,6 +47,15 @@
   http://www.gnu.org/software/gnash/a. \
   Compatible Shockwave Flash FLASH_VERSION
 
+// Define the following to make the plugin verbose
+// WARNING: will write to .xsession_errors !
+// Values:
+//  1: fatal errors (errors preventing the plugin from working as it should)
+//  2: informational messages
+//
+#define GNASH_PLUGIN_DEBUG 1
+
+
 #include sys/param.h
 #include plugin.h //Fixes Warning on redef of MIN/MAX
 #include csignal
@@ -139,11 +148,15 @@
 {
if ( plugInitialized )
{
+#if GNASH_PLUGIN_DEBUG  1
cout  NS_PluginInitialize called, but ignored (we already 
initialized)  endl;
+#endif
return NPERR_NO_ERROR;
}
 
+#if GNASH_PLUGIN_DEBUG  1
cout  NS_PluginInitialize call 
---  endl;
+#endif
 
 #ifdef HAVE_XPCOM
if(!cookieManager) {
@@ -155,7 +168,9 @@
(reinterpret_castvoid 
**(serviceManager)));
 
if (err != NPERR_NO_ERROR || !serviceManager) {
+#if GNASH_PLUGIN_DEBUG  1
cout  Failed to get the service manager  endl;
+#endif
return NPERR_GENERIC_ERROR;
}
nsresult rv;
@@ -163,10 +178,14 @@
NS_GET_IID 
(nsICookieManager),

reinterpret_castvoid **(cookieManager));
if (NS_FAILED (rv) || !cookieManager) {
+#if GNASH_PLUGIN_DEBUG  1
cout  Failed to get CookieManager  endl;
+#endif
return NPERR_GENERIC_ERROR;
}
+#if GNASH_PLUGIN_DEBUG  1
cout  [XPCOM] - CookieManager retrieved.  endl;
+#endif
}
 #endif // HAVE_XPCOM
 
@@ -189,13 +208,17 @@
 
if (err != NPERR_NO_ERROR || !supportsXEmbed)
{
+#if GNASH_PLUGIN_DEBUG  1
cout  NPAPI ERROR: No xEmbed support in this browser!
 endl;
+#endif
return NPERR_INCOMPATIBLE_VERSION_ERROR;
}
else
{
+#if GNASH_PLUGIN_DEBUG  1
cout  xEmbed supported in this browser  endl;
+#endif
}
 
err = CallNPN_GetValueProc(NPNFuncs.getvalue, NULL,
@@ -208,14 +231,18 @@
*/
if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2)
{
+#if GNASH_PLUGIN_DEBUG  1
cout  NPAPI ERROR: No GTK2 support in this browser!
 Have version   (int)toolkit  endl;
+#endif
 
return NPERR_INCOMPATIBLE_VERSION_ERROR;
}
else
{
+#if GNASH_PLUGIN_DEBUG  1
cout  GTK2 supported in this browser  endl;
+#endif
}
 
/*
@@ -224,7 +251,9 @@
char* opts = std::getenv(GNASH_OPTIONS);
if (opts != NULL)
{
+#if GNASH_PLUGIN_DEBUG  1
cout  GNASH_OPTIONS :   opts  endl;
+#endif

// Should the plugin wait for gdb to be attached?
if ( strstr(opts, waitforgdb) )
@@ -266,7 +295,9 @@
{
cerr  WARNING: NPAPI plugin could not append to the 
GNASHRC env variable  endl;
}
+#if GNASH_PLUGIN_DEBUG  1
else cout  NOTE: NPAPI plugin set GNASHRC to   newGnashRc 
 endl;
+#endif
 
} while (0);
 
@@ -290,7 +321,9 @@
 #if 0
if (!plugInitialized)
{
+#if GNASH_PLUGIN_DEBUG  1
cout  Plugin already shut down  endl;
+#endif
return;
}
 
@@ -404,7 +437,9 @@
_name = val;
}
 
+#if GNASH_PLUGIN_DEBUG  1
cerr  PARAM:   name   =   val  endl;
+#endif
_params[name] = val;
}
 
@@ -413,10 +448,14 @@
 /// \brief Destructor
 nsPluginInstance::~nsPluginInstance()
 {
+#if GNASH_PLUGIN_DEBUG  1
cout  plugin instance destruction  endl;
+#endif
if ( _ichan )
{
+#if GNASH_PLUGIN_DEBUG  1
cout  shutting down input chan   _ichan  endl;
+#endif
GError *error = NULL;
g_io_channel_shutdown (_ichan, TRUE, error);
g_io_channel_unref (_ichan);
@@ -428,7 +467,9 @@
 
 // TODO: unlink the cookie jar
 if ( ! _cookieFile.empty() ) {
+#if GNASH_PLUGIN_DEBUG  1
cout   ~nsPluginInstance: file   _cookieFile   should be 
unlinked! 

Bug#497633: gnash: Filled up .xsession-errors with error messages

2009-12-17 Thread Petter Reinholdtsen

Any hope of having this fixed in Lenny?  We have been hit hard by this
in the version we use in Debian Edu, where a users home directory is
quickly filling up with gnash messages.

I asked upstream about this in
URL: http://www.mail-archive.com/gnash-...@gnu.org/msg06179.html ,
and according to Benjamin Wolsey there is no runtime flag to configure
this.  One need to change GNASH_PLUGIN_DEBUG used in plugin/plugin.cpp
and recompile to avoid these messages.

It is said to be fixed in version 0.8.5, but that do not help us Lenny
users. :)

Would you be willing to do an update of the package in Lenny to flip
the DEBUG flag and reduce the noise?

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#497633: gnash: Filled up .xsession-errors with error messages

2009-12-17 Thread Petter Reinholdtsen
tags 497633 + patch
thanks

[Petter Reinholdtsen]
 Would you be willing to do an update of the package in Lenny to flip
 the DEBUG flag and reduce the noise?

Apparently the DEBUG flag do not exist in version 0.8.4. :(

Anyway, here is an untested patch I hope should fix the issue.  It
wrapps all output to cout with #ifdef protection, to avoid printing
anything in the non-debugging case.

I am unable to test this, as building 0.8.4-2 in Lenny causes a
segfault when configure is running:

  checking if more special flags are required for pthreads... no
  checking for the Boost Version...
  checking for boost header... checking for Boost libraries...  
-lboost_thread-gcc42-mt-1_34_1 -lboost_date_time-gcc42-1_34_1
  configure: creating ./config.status
  Segmentation fault

Have not investigated this issue so far.

Happy hacking,
-- 
Petter Reinholdtsen
--- gnash-0.8.4.orig/plugin/plugin.cpp
+++ gnash-0.8.4/plugin/plugin.cpp
@@ -47,6 +47,15 @@
   http://www.gnu.org/software/gnash/a. \
   Compatible Shockwave Flash FLASH_VERSION
 
+// Define the following to make the plugin verbose
+// WARNING: will write to .xsession_errors !
+// Values:
+//  1: fatal errors (errors preventing the plugin from working as it should)
+//  2: informational messages
+//
+#define GNASH_PLUGIN_DEBUG 1
+
+
 #include sys/param.h
 #include plugin.h //Fixes Warning on redef of MIN/MAX
 #include csignal
@@ -139,11 +148,15 @@
 {
if ( plugInitialized )
{
+#if GNASH_PLUGIN_DEBUG  1
cout  NS_PluginInitialize called, but ignored (we already 
initialized)  endl;
+#endif
return NPERR_NO_ERROR;
}
 
+#if GNASH_PLUGIN_DEBUG  1
cout  NS_PluginInitialize call 
---  endl;
+#endif
 
 #ifdef HAVE_XPCOM
if(!cookieManager) {
@@ -155,7 +168,9 @@
(reinterpret_castvoid 
**(serviceManager)));
 
if (err != NPERR_NO_ERROR || !serviceManager) {
+#if GNASH_PLUGIN_DEBUG  1
cout  Failed to get the service manager  endl;
+#endif
return NPERR_GENERIC_ERROR;
}
nsresult rv;
@@ -163,10 +178,14 @@
NS_GET_IID 
(nsICookieManager),

reinterpret_castvoid **(cookieManager));
if (NS_FAILED (rv) || !cookieManager) {
+#if GNASH_PLUGIN_DEBUG  1
cout  Failed to get CookieManager  endl;
+#endif
return NPERR_GENERIC_ERROR;
}
+#if GNASH_PLUGIN_DEBUG  1
cout  [XPCOM] - CookieManager retrieved.  endl;
+#endif
}
 #endif // HAVE_XPCOM
 
@@ -189,13 +208,17 @@
 
if (err != NPERR_NO_ERROR || !supportsXEmbed)
{
+#if GNASH_PLUGIN_DEBUG  1
cout  NPAPI ERROR: No xEmbed support in this browser!
+#endif
 endl;
return NPERR_INCOMPATIBLE_VERSION_ERROR;
}
else
{
+#if GNASH_PLUGIN_DEBUG  1
cout  xEmbed supported in this browser  endl;
+#endif
}
 
err = CallNPN_GetValueProc(NPNFuncs.getvalue, NULL,
@@ -208,14 +231,18 @@
*/
if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2)
{
+#if GNASH_PLUGIN_DEBUG  1
cout  NPAPI ERROR: No GTK2 support in this browser!
 Have version   (int)toolkit  endl;
+#endif
 
return NPERR_INCOMPATIBLE_VERSION_ERROR;
}
else
{
+#if GNASH_PLUGIN_DEBUG  1
cout  GTK2 supported in this browser  endl;
+#endif
}
 
/*
@@ -224,7 +251,9 @@
char* opts = std::getenv(GNASH_OPTIONS);
if (opts != NULL)
{
+#if GNASH_PLUGIN_DEBUG  1
cout  GNASH_OPTIONS :   opts  endl;
+#endif

// Should the plugin wait for gdb to be attached?
if ( strstr(opts, waitforgdb) )
@@ -266,7 +295,9 @@
{
cerr  WARNING: NPAPI plugin could not append to the 
GNASHRC env variable  endl;
}
+#if GNASH_PLUGIN_DEBUG  1
else cout  NOTE: NPAPI plugin set GNASHRC to   newGnashRc 
 endl;
+#endif
 
} while (0);
 
@@ -290,7 +321,9 @@
 #if 0
if (!plugInitialized)
{
+#if GNASH_PLUGIN_DEBUG  1
cout  Plugin already shut down  endl;
+#endif
return;
}
 
@@ -413,10 +446,14 @@
 /// \brief Destructor
 nsPluginInstance::~nsPluginInstance()
 {
+#if GNASH_PLUGIN_DEBUG  1
cout  plugin instance destruction  endl;
+#endif
if ( _ichan )
{
+#if GNASH_PLUGIN_DEBUG  1
cout  shutting down input chan   _ichan  endl;
+#endif
GError *error = NULL;
g_io_channel_shutdown (_ichan, TRUE, 

Bug#497633: gnash: Filled up .xsession-errors with error messages

2009-04-11 Thread advocatux
Package: gnash
Version: 0.8.4-2
Severity: important

Gnash (version 0.8.4-2) is still dumping a lot of junk in ~.xsession-errors.

After visiting some specific URLs it gets worst.

For instance, Gmail.com makes gnash to enter in a loop filling
~.xsession-errors with messages like:

NS_PluginInitialize call ---
xEmbed supported in this browser
GTK2 supported in this browser
NOTE: NPAPI plugin set GNASHRC to
/etc/gnashpluginrc:/home/advocatux/.gnashpluginrc
PARAM: quality = high
PARAM: id = flash_yj_api0
PARAM: name = yj_api0
PARAM: style = width: 100%; height: 100%;
PARAM: src = im/media-api.swf?ver=1.0.0
PARAM: flashvars = dbg=trueap=previewernm=yj_api0cb=Recv_yj_api0os=linux
PARAM: bgcolor = #00
PARAM: allowscriptaccess = sameDomain
PARAM: allowfullscreen = true
PARAM: seamlesstabbing = false
PARAM: type = application/x-shockwave-flash
PARAM: pluginspage = http://www.macromedia.com/go/getflashplayer
PARAM: wmode = window
PARAM: id = flash_object
PARAM: src = im/sound.swf
PARAM: style = position: absolute; top: 1px; left: 1px; height: 1px; width: 1px;
PARAM: quality = high
PARAM: pluginspage = http://www.macromedia.com/go/getflashplayer
PARAM: type = application/x-shockwave-flash
NewStream: The full URL is
https://mail.google.com/mail/im/media-api.swf?ver=1.0.0
Closed 61 files.
Starting process: /usr/bin/gtk-gnash -x 46140444 -j 1 -k 1 -u
https://mail.google.com/mail/im/media-api.swf?ver=1.0.0 -F 66 -U
https://mail.google.com/mail/?ui=2view=jsname=jsver=.es.am=
-P allowfullscreen=true -P allowscriptaccess=sameDomain -P
bgcolor=#00 -P
flashvars=dbg=trueap=previewernm=yj_api0cb=Recv_yj_api0os=linux
-P id=flash_yj_api0 -P name= -P
pluginspage=http://www.macromedia.com/go/getflashplayer -P
quality=high -P seamlesstabbing=false -P
src=im/media-api.swf?ver=1.0.0 -P style=width: 100%; height: 100%; -P
type=application/x-shockwave-flash -P wmode=window -
Forked successfully, child process PID is 4959
RcInitFile: parsing /etc/gnashrc
RcInitFile: couldn't open file: /home/advocatux/.gnashrc
RcInitFile: parsing /etc/gnashpluginrc
RcInitFile: couldn't open file: /home/advocatux/.gnashpluginrc
QSettings: failed to open file '/etc/qt3/qtrc'
QSettings: failed to open file '/etc/qt3/qtrc'
NewStream: The full URL is https://mail.google.com/mail/im/sound.swf
Closed 62 files.
Starting process: /usr/bin/gtk-gnash -x 46140543 -j 1 -k 1 -u
https://mail.google.com/mail/im/sound.swf -F 67 -U
https://mail.google.com/mail/?ui=2view=bspver=xx -P
id=flash_object -P
pluginspage=http://www.macromedia.com/go/getflashplayer -P
quality=high -P src=im/sound.swf -P style=position: absolute; top:
1px; left: 1px; height: 1px; width: 1px; -P
type=application/x-shockwave-flash -
Forked successfully, child process PID is 4963
RcInitFile: parsing /etc/gnashrc
RcInitFile: couldn't open file: /home/advocatux/.gnashrc
RcInitFile: parsing /etc/gnashpluginrc
RcInitFile: couldn't open file: /home/advocatux/.gnashpluginrc

Calling NPN_GetURL(javascript:yj_api0_DoFSCommand('msg','blablabla...)

Calling NPN_GetURL(javascript:yj_api0_DoFSCommand('msg','blablabla...)

Normal read: INVOKE msg:blablabla...

That happens at an amazing speed. In a few minutes you'll find your
~.xsession-errors fill with a good bunch of Mb.

After stopping the browser (Iceweasel), last lines are:

Main loop ended, cleaning up
Any segfault past this message is likely due to improper threads cleanup.
Main loop ended, cleaning up
Any segfault past this message is likely due to improper threads cleanup.
Player request channel hang up
Player request channel hang up
Shutting down
Child process exited with status 0
plugin instance destruction
shutting down input chan 0xdb40fc8
Shutting down
Child process exited with status 0
plugin instance destruction
shutting down input chan 0xdbe5f38
X Error: BadWindow (invalid Window parameter) 3
  Major opcode:  19
  Minor opcode:  0
  Resource id:  0x2c00043
QClipboard::setData: Cannot set X11 selection owner for PRIMARY
QSettings: failed to open file '/etc/qt3/qtrc'
QSettings: failed to open file '/etc/qt3/qtrc'
QSettings: failed to open file '/etc/qt3/qtrc'
QSettings: failed to open file '/etc/qt3/qtrc'
X Error: BadWindow (invalid Window parameter) 3
  Major opcode:  20
  Minor opcode:  0
  Resource id:  0x1600a22
QSettings: failed to open file '/etc/qt3/qtrc'




-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gnash depends on:
ii  gnash-common  0.8.4-2free SWF movie player - common fil
ii  libc6 2.9-4  GNU C Library: Shared libraries
ii  libgcc1   1:4.3.3-3  GCC support library
ii  libglib2.0-0  2.20.0-2   The GLib library of C routines
ii  

Bug#497633: gnash: Filled up .xsession-errors with error messages

2008-09-03 Thread Petter Reinholdtsen

Package: gnash
Version: 0.8.0+cvs20070707.1946-1
Severity: important
User: [EMAIL PROTECTED]
Usertag: debian-edu

Today, I lost several hundred emails because my disk quota was full.
The reason it was full was ~/.xsession-errors, which had extended to
113 GB:

  [EMAIL PROTECTED] ~ $ ls -lah .xsession-errors
  -rw--- 1 pre usit 113G Sep  3 10:28 .xsession-errors
  [EMAIL PROTECTED] ~ $

The reason it filled up was gnash, outputting messages like this
several times a second:

  29248] 10:29:11: MALFORMED SWF: Internal jpeg error: Improper call to JPEG 
library in state %d
  29248] 10:29:11: MALFORMED SWF: Internal jpeg error: Improper call to JPEG 
library in state %d

Please make gnash quiet or at least less verbose when called as a
browser plugin, to avoid filling the disk with messages in
~/.xsession-errors.  Perhaps debug output only should be enabled on
request, when some environment variable is set?

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]