Jump to content

VLC 1.1.x on a P2 (or similar) with KernelEx and FineSSE


Recommended Posts

OK, since this isn't a KernelEx issue, I'm creating a new thread here ...

Note, to download the FineSSE application, see :

Encouraged by this report about VLC, I downloaded and installed version 1.1.9 and it worked just fine on my P3 machine with KernelEx default mode. So, nothing particular seems to be required, other than having KernelEx 4.5.1 installed.

Then I tried to do the same on my P2 machine (with P3CPU.VXD and FineSSE23.exe installed) but although it installs and initializes its font cache OK, it crashes when trying to display any video (no error message).

Joe.

VLC 1.1.9 has an internal error handler that often quietly terminates the app when an illegal instruction is encountered. It reports the error as "handled" rather than passing it to the system default handler for debugging.

To enable FineSSE to have the first chance to handle the errors, launch VLC by dropping it onto FineSSE.

Or do as I did and modify the VLC desktop shortcut target to be:

"C:\finesse.exe" -v "C:\Program Files\VideoLAN\VLC\vlc.exe"

Answer "No" if asked to send a bug report.

I have KernelEx 4.5.1 installed. VLC 1.1.9 will launch on my VIA C3 but opens off-screen. After moving it back on-screen (every time!), the menus don't open. I'll try VLC 1.1.10 soon.

-jumper

Thanks, jumper.

Well, this looked like a good thing to try, so I did (KernelEx 4.5.1, VLC 1.1.9, FineSSE 27a).

However, I encountered the same problems you did. VLC would open off-screen (so I used the context menu from the taskbar to maximize it), the menus didn't open, and it didn't seem to initialize its font cache.

Yet running VLC directly produced none of the above problems. Everything worked just fine, until a media file (audio or video) was actually opened. Then the playback window would pop up briefly, before it and the initial VLC window silently closed, as previously described.

So there seems to be something wrong with how FineSSE loads the VLC application in this way. OTOH, with the 'win.ini' way of using FineSSE, the exception handling is apparently internal to VLC ...

Joe.

Link to comment
Share on other sites


Excellent discovery!

Since reading your post yesterday, I've being struggling with how best to respond even as I ready FineSSE29 for release.

I see three main issues:

  1. getting VLC to run on Win9x
  2. solving the illegal instructions / cpu compatibility problem
  3. solving the KernelEx / FineSSE compatibility problem

Possible solutions:

  1. KernelEx is the easy solution here. Porting the source code (maybe just the qt4 interface) is the hard way.

    1. The [main] section of the large config file has cpu extension flags, but disabling them seemed to have no affect. :(
    2. FineSSE can handle many of the instructions, but needs more work.
    1. The VLC exception handler could be modified to punt illegal instructions to the system.
    2. We start debugging!

I did get VLC1.1.9 to run to the point where the JPEG plugin would execute an illegal instruction that FineSSE doesn't yet support, so I can start work on (2b).

Now for some (3b) details. I tweaked FineSSE to allow it to attach to a running process. Using TaskInfo2000 (a process viewer), I can right-click on a process and select "debug". Once I get FineSSE29 posted, you will be able to launch VLC normally and then attach FineSSE to it after the window and menus are initialized.

Unfortunately, my C3 chokes on the CMOVs and FUCOMIPs used by the UI. I have to use FineSSE to launch VLC:

FineSSE+vlc.log.zip

You can help: To determine if the window and menu problems are unique to FineSSE, try running VLC inside another debugger such as VisualStudio.

I also found that if ddhelp.exe is loaded with different KernelEx compatibility options than VLC, I get an Access Violation at 8XXXXXXX. This could be a huge problem if two media apps that require different KernelEx options are run at the same time!

Edited by jumper
Link to comment
Share on other sites

Hi jumper,

Yes, KernelEx does a fine job running some (but not all) versions of VLC. I haven't tried them all, but prior to 1.1.9, the other version that ran well for me, was 1.0.3 (if I remember correctly). However, 1.1.9 doesn't run properly on my P2 and 1.0.3 swaps the red and blue colours (at least for 16-bit colour depth), so is a "last choice".

You can help: To determine if the window and menu problems are unique to FineSSE, try running VLC inside another debugger such as VisualStudio.

Well, I finally figured how to do this with VC++ 4.2 (which is installed on my P3) :


File
Open Workspace
File name : ~~~~\vlc.exe
File of type : Executable Files
Build
Execute vlc.exe

The above ran VLC normally.


File
Open Workspace
File name : ~~~~\vlc.exe
File of type : Executable Files
Build
Degug
Go

The above opened the main VLC GUI, but the menus could not be selected. It didn't open off-screen, but this might be video driver related or such. So it's somewhat similar to starting VLC via FineSSE. On exit, the following debug information was presented :


First-chance exception in vlc.exe (KERNEL32.DLL): 0xC0000005: Access Violation.
The thread 0xFFEC1C1D has exited with code 0 (0x0).
The thread 0xFFEC1ADD has exited with code 0 (0x0).
The thread 0xFFEC2019 has exited with code 0 (0x0).
The thread 0xFFEC0A25 has exited with code -1 (0xFFFFFFFF).
The program 'E:\Program Files\VideoLAN\Vlc\vlc.exe' has exited with code 0 (0x0).

I couldn't find a way to "attach" VLC to the VC++ debugger after starting it. Maybe that's a feature only of later editions. Although there should be an automatic attachment to the debugger following a crash, VLC doesn't normally crash on this P3, and in any case, VLC would no doubt handle exceptions itself, just as when FineSSE is the system's debugger.

Joe.

PS. I've now repeated the VC++ debugger test on the P2. This exhibits the "open window off-screen" problem if ever the previous run of VLC was in windowed mode. For example, if VLC was run normally, in windowed mode, it would appear on-screen, but on a subsequent run in the debugger, it would be off-screen at some random location (once in a while, one window edge would be just visible). OTOH, if the previous run of VLC was a maximized window, then in a subsequent run via the debugger, it would again appear maximized. So this "off-screen" behaviour is indeed a side-effect of running VLC in a debugging session.

PPS. Back to the P3, I first ran VLC normally, changed from a maximized window to a normal/resizeable one. After this, running VLC in a debugging session produced the same "off-screen" window behaviour as the P2. However, I found that the inability to select any menu could be overcome by using the keyboard. Pressing "Alt-H", then "Enter" produced a few Chinese or Japanese characters. Pressing "Alt-M", then "Enter" allowed me to open some JPEG files. After exiting, the VC++ debugger window showed :


First-chance exception in vlc.exe (KERNEL32.DLL): 0xC0000005: Access Violation.
The thread 0xFFEA5EF3 has exited with code 0 (0x0).
The thread 0xFFEBA9B3 has exited with code 0 (0x0).
The thread 0xFFEA586B has exited with code 0 (0x0).
The thread 0xFFEC3E23 has exited with code 0 (0x0).
The thread 0xFFEBCF63 has exited with code 0 (0x0).
The thread 0xFFEB990B has exited with code 0 (0x0).
The thread 0xFFEC139B has exited with code 0 (0x0).
The thread 0xFFEC1C53 has exited with code 0 (0x0).
The thread 0xFFEC2CDB has exited with code 0 (0x0).
The thread 0xFFEC0307 has exited with code 0 (0x0).
The thread 0xFFEC0757 has exited with code 0 (0x0).
The thread 0xFFEC1A6F has exited with code 0 (0x0).
The thread 0xFFEC0B13 has exited with code 0 (0x0).
The thread 0xFFEC0DC7 has exited with code 0 (0x0).
The thread 0xFFEC63A7 has exited with code 0 (0x0).
The thread 0xFFEC658B has exited with code 0 (0x0).
The thread 0xFFEC61F3 has exited with code 0 (0x0).
The thread 0xFFEC569F has exited with code 0 (0x0).
The thread 0xFFEC6F0F has exited with code 0 (0x0).
The thread 0xFFEC5D9F has exited with code 0 (0x0).
The thread 0xFFEC51AF has exited with code 0 (0x0).
The thread 0xFFEC540B has exited with code 0 (0x0).
The thread 0xFFEA6613 has exited with code 0 (0x0).
The thread 0xFFEA63D3 has exited with code 0 (0x0).
The thread 0xFFEA0A17 has exited with code 0 (0x0).
The thread 0xFFEA56E3 has exited with code -1 (0xFFFFFFFF).
The thread 0xFFEC787F has exited with code -1 (0xFFFFFFFF).
The program 'E:\Program Files\VideoLAN\Vlc\vlc.exe' has exited with code 0 (0x0).

BTW, the "Advanced settings" mode allows to select (via the GUI) different CPU features, such as SSE, however this doesn't seem to do anything.

Edited by jds
Link to comment
Share on other sites

finesse29.exe

FineSSE 29 features:

  • Multiple modes of process creation and attachment:
    • JIT debugging using Process Id and Event handle (as before, DOTP)
    • attach to running process using Process Id (DOTP)
    • create process in debug mode (DP, DOTP)
    • create process in normal mode with immediate or delayed debug attachment (DOTP)
    • [DOTP=Debug Only This Process, DP=Debug(this and child)Process(es)]

    [*]Verbose listing now includes all Debugging API messages

    [*]Listbox log can be moved / resized / maximized

    [*]Logfile can be created (up to 99) in FineSSE folder

Sample log files:

FineSSE-JIT.log.txt

FineSSE-DP.log.txt

Command line options:


/* Logging options: */
-lb
display listbox log
-lf
output to logfile
-lbf
listbox and logfile (default if 'v' and not 'lb' nor 'lf')
-v
verbose listing

/* Just-In-Time debugging options (WIN.INI): */
-p %u
Process Id placeholder
-e %u
JIT event handle placeholder

/* Attach to running process option: */
-p <decimal>
Process Id

/* New-process creation options: */
-o
create process in DOTP mode
-a
create process in normal mode, then attach immediately
-a<ms>
create, then Sleep <ms> milliseconds before attaching
<filename>
create process from filename
(must be last parameter; quoted if containing spaces)

/* [...Examples coming soon...] */

Edited by jumper
Link to comment
Share on other sites

Command line options:


/* New-process creation options: */
-o
create process in DOTP mode
-a
create process in normal mode, then attach immediately
-a<ms>
create, then Sleep <ms> milliseconds before attaching
<filename>
create process from filename
(must be last parameter; quoted if containing spaces)

Yeah! You've done it, jumper!

I've changed the VLC 1.1.9 desktop shortcut properties to :

E:\Winstall\Patches\finesse29.exe -a6000 "E:\Program Files\VideoLAN\VLC\vlc.exe"

Now I can start VLC, wait 6 seconds, then open and display any media files very nicely (I initially tried the "-a" option by itself, but that didn't work). A fantastic work-around for those pesky media files that don't work properly with alternative media players. :)

BTW, there is a side-effect that invoking VLC in this way causes the Tools/Preferences menu to display Chinese/Japanese characters, so to fiddle with settings, just invoke VLC normally.

Joe.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...