Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

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

- - - - -

  • Please log in to reply
4 replies to this topic

#1
jds

jds

    -DOS+

  • Member
  • PipPipPipPip
  • 596 posts
  • Joined 03-June 08
  • OS:98SE
  • Country: Country Flag
OK, since this isn't a KernelEx issue, I'm creating a new thread here ...

Note, to download the FineSSE application, see : http://www.msfn.org/...810#entry957810


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.


How to remove advertisement from MSFN

#2
jumper

jumper

    2015 All-American Masters HJ'er

  • Member
  • PipPipPipPip
  • 551 posts
  • Joined 21-January 11
  • OS:98SE
  • Country: Country Flag
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:
  • getting VLC to run on Win9x
  • solving the illegal instructions / cpu compatibility problem
  • solving the KernelEx / FineSSE compatibility problem

Possible solutions:
  • KernelEx is the easy solution here. Porting the source code (maybe just the qt4 interface) is the hard way.
    • The [main] section of the large config file has cpu extension flags, but disabling them seemed to have no affect. :(
    • FineSSE can handle many of the instructions, but needs more work.
    • The VLC exception handler could be modified to punt illegal instructions to the system.
    • 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:
Attached File  FineSSE+vlc.log.zip   2.43KB   8 downloads

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, 07 July 2011 - 12:37 PM.

Design feedback requested:
KernelEx 4.5.2015
IHAtool - IpHlpApi tester; call various functions and report results
--status-> framework is solid; 22 api's fully supported; preview release coming soon
Future projects: Kexter - IP40+Ktree+Kexstubs

#3
jds

jds

    -DOS+

  • Member
  • PipPipPipPip
  • 596 posts
  • Joined 03-June 08
  • OS:98SE
  • Country: Country Flag
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, 10 July 2011 - 07:00 PM.


#4
jumper

jumper

    2015 All-American Masters HJ'er

  • Member
  • PipPipPipPip
  • 551 posts
  • Joined 21-January 11
  • OS:98SE
  • Country: Country Flag
Attached File  finesse29.exe   12.5KB   54 downloads

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:
Attached File  FineSSE-JIT.log.txt   1.35KB   14 downloads
Attached File  FineSSE-DP.log.txt   623bytes   12 downloads

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, 16 July 2011 - 03:25 AM.

Design feedback requested:
KernelEx 4.5.2015
IHAtool - IpHlpApi tester; call various functions and report results
--status-> framework is solid; 22 api's fully supported; preview release coming soon
Future projects: Kexter - IP40+Ktree+Kexstubs

#5
jds

jds

    -DOS+

  • Member
  • PipPipPipPip
  • 596 posts
  • Joined 03-June 08
  • OS:98SE
  • Country: Country Flag

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users