[Bug 47271] KCam 4.0 (VB6 based CNC machine control app) fails on startup, reports 'Run-time error '13': Type mismatch'

wine-bugs at winehq.org wine-bugs at winehq.org
Mon May 27 16:46:39 CDT 2019


https://bugs.winehq.org/show_bug.cgi?id=47271

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net
           Keywords|                            |download, hardware
                URL|                            |https://web.archive.org/web
                   |                            |/20190130090155/http://kell
                   |                            |yware.com/anonymous/kcam400
                   |                            |60.exe
     Ever confirmed|0                           |1
            Summary|kcam4 cnc machining control |KCam 4.0 (VB6 based CNC
                   |program  does not run ,     |machine control app) fails
                   |timing error                |on startup, reports
                   |                            |'Run-time error '13': Type
                   |                            |mismatch'
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

that particular crash in SCM was fixed with commit
https://source.winehq.org/git/wine.git/commitdiff/496380709dfdeccd2ff12358e5bdb5b7b8338ac2
("services: Don't double release process in service_start.")

I've also seen it a few times but didn't bother to report a bug.

I guess you are talking about this app:

http://www.kellyware.com/kcam/index.htm -> Software Based CNC Controller

The website seems to be defunct atm. Fortunately using Internet Archive/Wayback
machine one can still access an archived copy.

https://web.archive.org/web/20180928065800/http://www.kellyware.com/download/index.htm

https://web.archive.org/web/20190130090155/http://kellyware.com/anonymous/kcam40060.exe

The installer first complains about out-of-date/missing Visual Basic 6 runtime
which is expected as Wine doesn't provide it -> bug 19816 ("Multiple games and
applications need 'msvbvm60.dll' ('winetricks vb6run' is a workaround)").

It bundles the MS VB6 runtime redistributable and installs it:

--- snip---
...
[05/27/2019 22:18:54] Success    Detection Script: Visual Basic 6.0 (SP6)
[05/27/2019 22:18:54] Info    VB6 SP6 Module: No version of msvbvm60.dll was
found. The VB6 SP6 runtime will be installed.
[05/27/2019 22:18:54] Success    Extract dependency file:
C:\users\focht\Temp\_ir_sf_temp_0\vb6sp6\VBRun60sp6.exe
[05/27/2019 22:18:54] Success    Create folder:
C:\users\focht\Temp\_ir_sf_temp_0\vb6sp6\
[05/27/2019 22:18:54] Success    VB6 SP6 Module: Installation script started.
[05/27/2019 22:19:01] Success    VB6 SP6 Module: User confirmation received, we
are ready to install.
[05/27/2019 22:19:01] Success    VB6 SP6 Module: Running VB6 installer.
[05/27/2019 22:19:01] Success    VB6 SP6 Module: VB6 runtime installation
complete.
--- snip ---

There is another set of errors when the installer is registering some ActiveX
controls:

--- snip ---
002a:err:module:import_dll Library MFC42.DLL (which is needed by
L"C:\\windows\\system32\\azip32.ocx") not found
002a:err:module:import_dll Library MFC42.DLL (which is needed by
L"C:\\windows\\system32\\azip32.ocx") not found
002a:err:module:import_dll Library MFC42.DLL (which is needed by
L"C:\\windows\\system32\\ReSize32.ocx") not found
002a:err:module:import_dll Library MFC42.DLL (which is needed by
L"C:\\windows\\system32\\ReSize32.ocx") not found
--- snip ---

The problem is the install order of COM servers/ActiveX controls and their dll
dependencies:

--- snip ---
...
[05/27/2019 22:26:15] Success    Install archive file:
C:\windows\system32\azip32.ocx
[05/27/2019 22:26:17] Error        Register COM file:
C:\windows\system32\azip32.ocx - System Error # 126 (1)
[05/27/2019 22:26:17] Success    File added to uninstall list:
C:\windows\system32\azip32.ocx
[05/27/2019 22:26:17] Success    Install archive file:
C:\windows\system32\ReSize32.ocx
[05/27/2019 22:26:17] Error        Increment usage count:
C:\windows\system32\ReSize32.ocx (2)
[05/27/2019 22:26:18] Error        Register COM file:
C:\windows\system32\ReSize32.ocx - System Error # 126 (1)
[05/27/2019 22:26:18] Success    File added to uninstall list:
C:\windows\system32\ReSize32.ocx
[05/27/2019 22:26:18] Success    Install archive file:
C:\windows\system32\mfc42.dll
[05/27/2019 22:26:18] Error        Increment usage count:
C:\windows\system32\mfc42.dll (2)
[05/27/2019 22:26:18] Success    Register COM file:
C:\windows\system32\mfc42.dll
[05/27/2019 22:26:18] Success    File added to uninstall list:
C:\windows\system32\mfc42.dll
--- snip ---

Either run 'winetricks -q mfc42' before the installer or re-register the
ActiveX controls manually after installation finished to work around.

There is a kernel driver 'TDLPortIO' for accessing the hardware via I/O ports
(LPT?) installed. It seems to originate from:

http://www.bvsystems.be/downloads/driverlinx

There is a mishap with the driver installer. Two kernel driver binaries
provided:

* DLPortIO.SYS (64-bit PE)
* hwinterfacex64.sys (64-bit PE)

Both are exactly the same binary but with different names. One gets installed
into 'syswow64/drivers' (32-bit) the other goes to 'system32/driver' (64-bit). 

The first one fails to load on WINEPREFIX startup for obvious reason (Wow64),
causing scary looking service failure messages. It can be ignored in the end.
Could be an authoring mistake in the driver installer (only one can be run at
the same time anyway, otherwise it will cause object namespace collision ->
same '\\Device\\hwinterfacex64' entry).

When starting the app, a message box 'Run-time error '13':\n\nType mismatch' is
shown. Is that the problem you are talking about?

Also could you be specific how the CNC hardware is actually connected to your
PC/Laptop? Parallel port = direct I/O port access or via serial port (UART)?

I ask because there is also another driver provided (not installed) -> 'USB
RS-232 Emulation Driver'

$ sha1sum kcam40060.exe 
f749f04bb63a28bcd6c7645f21f3cf526d1627fb  kcam40060.exe

$ du -sh kcam40060.exe 
6.6M    kcam40060.exe

$ wine --version
wine-4.9-46-g3139727a97

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list