[vlc-devel] Re: ATTN: ipkiss, asmax;Skins2-Win98
CUTMAN ~CW~
cutmancw at hotmail.com
Wed Jul 6 22:52:19 CEST 2005
>From: Olivier Teulière <ipkiss at via.ecp.fr>
>Reply-To: vlc-devel at videolan.org
>To: CUTMAN ~CW~ <cutmancw at hotmail.com>
>CC: vlc-devel at videolan.org, asmax at via.ecp.fr
>Subject: [vlc-devel] Re: ATTN: ipkiss, asmax;Skins2-Win98
>Date: Mon, 4 Jul 2005 20:53:57 +0200
>
>On Sun, Jul 03, 2005, CUTMAN ~CW~ wrote:
> > attached is a few of the stack trace logs from
> > ./Win98::cygwin::drmingw that we talked about..
>
>It would be nice if you could put some debug info in the
>Win32Graphics::drawBitmap() fonction, to see where exactly it crashes.
>
>I suspect the call to BitBlt (line 195), as this code is not executed on
>WinNT/2K/XP, but is called on Win98...
>But i don't know why it would crash... maybe a threading issue.
>
>Cheers,
>--
>Ipkiss
>
>--
>This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
>To unsubscribe, please read http://developers.videolan.org/lists.html
>
Ipkiss,
After adding some error checking features, this is what I find:
Here's two modified sections of interest(which now do prevent the fatal
error).
HDC hDC = CreateCompatibleDC( m_hDC );
if( hDC == NULL )
{
LPVOID ebuf;
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&ebuf, 0, NULL );
msg_Err( getIntf(), "Win32Graphics::drawBitmap::CreateCompatibleDC()
== NULL" );
msg_Err( getIntf(), (LPCTSTR)ebuf );
LocalFree(ebuf);
return;
}
HBITMAP hBmp = CreateDIBSection( hDC, &bmpInfo, DIB_RGB_COLORS,
&pBits, NULL, 0 );
if( hBmp == NULL )
{
LPVOID ebuf;
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&ebuf, 0, NULL );
msg_Err( getIntf(), "Win32Graphics::drawBitmap::CreateDIBSection()
== NULL" );
msg_Err( getIntf(), (LPCTSTR)ebuf );
LocalFree(ebuf);
DeleteDC( hDC );
return;
}
-additionally, I had added the same type of error checks throughout the rest
of the function but have yet to see it get that far on an erroneous
condition.
==========================
So, after running tests in cygwin mode as well as windows mode, I suspect
that the issue is onset from something else entirely :|
-maybe memory is being eaten somewhere?
Here is the typical logging results...
skins2 error: Win32Graphics::drawBitmap::CreateDIBSection() == NULL
skins2 error: Not enough storage is available to process this command.
and of course once it starts, it continues in this manner(for every updating
bitmap resource) and only gets worse, and within a few more seconds the
tooltips become blank of text, and within even a few more -the tooltips
become non-existent and apparently fail gracefully.. -and this is why it
appears that memory may possibly be progressively overtaken.
also, on a few occasions the log has shown the failure in the earlier call
to CreateCompatibleDC(...) where the log was this:
skins2 error: Win32Graphics::drawBitmap::CreateCompatibleDC() == NULL
skins2 error: The operation completed successfully.
-though I don't understand this condition.. : /
so, I'm not sure where that leaves things, but I had imagined initially how
there could possibly be issues due to the custom messaging queue in vlc(not
being in the typical syncronization as a Windows WinProc callback and
hitting BeginPaint/EndPaint(...);) and running over the GDI-batch scheme.
So maybe a w32GDI::GdiFlush/GdiGetBatchLimit/GdiSetBatchLimit can be
integrated into the system if needed, but I'm not familiar with the higher
system there so maybe that's not even needed/relevant.
Any other ideas?
zcot
ps. I'd like to send up something for the integration of local system
settings matching(system tooltip color/font, screen resolution/depth, etc)..
where is the top of the skin creation/initialization chain?
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list