Hi All,

Andree forwarded some information to the mailing list that I thought was
worth sending out. Enjoy.

I had to edit it a little because it went through several bounces... and
the MIME information wasn't intact anymore.

-Neal


>Since I got no answer from Takashi I simply forward this to the
>mailinglist (I am not subscribed...)
>
>
>-----FW: awe midi plugin - bugfix-----
>
>Date: Wed, 23 Sep 1998 23:34:28 +0200 (CEST)
>From: Andree Borrmann <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: awe midi plugin - bugfix
>
>Hi Takashi,
>
>I have found the bug which makes your netscape-midi-plugin make a "bus 
> error".
>
>The widgets get called when the plugin is already unloaded... so the widgets
>must be completly destroyed before plugin shutdown. (The LD_PRELOAD 
> workaround
>disabled unloading)
>
>I also found another bug:
>When you start netscape with "netscape midi.html" "ExclusiveStart" 
> might get 
>called before NPP_SetWindow and therefore the manipulation of the 
> widget which
>are not yet created fail...
>
>I have attached a diff which corrects both bugs to this mail
>
>Bye,
>Andree
>
>PS: The diff is made against "midiplg-0.4.1b1.tgz"
>
>

diff -c midiplg-0.4.1/midiplg.c midiplg-0.4.1-new/midiplg.c
*** midiplg-0.4.1/midiplg.c     Thu Aug  7 10:47:05 1997
--- midiplg-0.4.1-new/midiplg.c Wed Sep 23 23:14:17 1998
***************
*** 342,348 ****
  NPP_Destroy(NPP instance, NPSavedData** save)
  {
        PluginInstance* This;
! 
        add_log(("destroy"));
        if (instance == NULL)
                return NPERR_INVALID_INSTANCE_ERROR;
--- 342,349 ----
  NPP_Destroy(NPP instance, NPSavedData** save)
  {
        PluginInstance* This;
!       XtAppContext   App;
!    
        add_log(("destroy"));
        if (instance == NULL)
                return NPERR_INVALID_INSTANCE_ERROR;
***************
*** 352,357 ****
--- 353,364 ----
        if (This != NULL) {
                add_log(("destroy instance [%x]", This));
  #ifndef NO_CONPANEL
+               App = XtWidgetToApplicationContext(This->start);
+          
+               XtDestroyWidget(This->start);
+               XtDestroyWidget(This->stop);
+               XtDestroyWidget(This->pause);
+         
                /* remove pixmaps */
                XFreePixmap(This->display, This->startPix);
                XFreePixmap(This->display, This->stopPix);
***************
*** 359,364 ****
--- 366,373 ----
                XFreePixmap(This->display, This->startStPix);
                XFreePixmap(This->display, This->stopStPix);
                XFreePixmap(This->display, This->pauseStPix);
+               
+               _XtDoPhase2Destroy(App,0);
  #endif
                FreeList(This);
                if (This->playing)
***************
*** 581,587 ****
--- 590,600 ----
  {
        pipe_puts(STOP_CMD);
        This->playing = FALSE;
+       add_log(("- stop %s", This->curFile));
+ 
  #ifndef NO_CONPANEL
+       if (!This->start) return;
+ 
        XtSetSensitive(This->start, TRUE);
        XtVaSetValues(This->start,
                      XtNleftBitmap, This->startPix,
***************
*** 595,601 ****
                      XtNleftBitmap, This->pauseStPix,
                      NULL, NULL);
  #endif
-       add_log(("- stop %s", This->curFile));
  }
  
  
--- 608,613 ----
***************
*** 614,620 ****
        pipe_puts(This->curFile);
        This->playing = TRUE;
  #ifndef NO_CONPANEL
!       XtSetSensitive(This->start, FALSE);
        XtVaSetValues(This->start,
                      XtNleftBitmap, This->startStPix,
                      NULL, NULL);
--- 626,634 ----
        pipe_puts(This->curFile);
        This->playing = TRUE;
  #ifndef NO_CONPANEL
!       if (!This->start) return;
! 
!       XtSetSensitive(This->start, FALSE);
        XtVaSetValues(This->start,
                      XtNleftBitmap, This->startStPix,
                      NULL, NULL);


-- 
+-------- Neal Sanche +----+ [ [EMAIL PROTECTED] ] +------ ICQ 5516171 ------+


 All a man needs out of life is a place to sit 'n' spit in the fire.

Reply via email to