## SharpCap closes suddenly when seleccting Mono16

A place to report problems and bugs in SharpCap
Forum rules

*** Please do not post license keys - please report any problems with licensing to 'admin' by PM ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
mramirez
Posts: 5
Joined: Mon Jan 13, 2020 7:13 pm

### SharpCap closes suddenly when seleccting Mono16

Hi all.

I am new in this forum.

I am using SharpCap Pro 3.2, with a camera QHY5L-II-M. And a laptop with windows 10.

The program works fine while I am ussing Mono8 mode, but, when I selecct Mono16, without doing anything else, the program crashes (closes) suddenly after a few seconds.
There is no bug or crash report.

Thanks for your support

Mateo

Posts: 4976
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: SharpCap closes suddenly when seleccting Mono16

Hi,

Are you using the latest version of SharpCap 3.2 available on the downloads page? This will likely be newer than the version that you would get by checking for auto updates. If you are not then it's certainly worth updating to the latest version to see if that fixes the problem as there have been lots of fixes in the QHY SDK in recent months. It's also worth checking that you have the Windows system drivers from the qhy website.

I have just tested with my QHY5LIIC which is the nearest camera I have to the model that you are using. I certainly don't see a problem in RAW16 mode (obviously I don't have a mono 16 mode to test on a colour camera).

Unfortunately, if the programme shuts without offering to send a bug report then it's a strong indication that the problem is an error in the QHY SDK code, which I'm unlikely to be able to do anything about in SharpCap. However you may be able to make SharpCap create a crash dump file by following the instructions here - viewtopic.php?t=5 - if you can make a crash dump file get created then please send it to me and I will be able to work out a little more about what is going on.

Cheers, Robin

mramirez
Posts: 5
Joined: Mon Jan 13, 2020 7:13 pm

### Re: SharpCap closes suddenly when seleccting Mono16

Hi Robin. Thanks for your quick answer.

I have been testing your suggestions, and I am going to explain you the results.
The version of the SharpCap that I was using when I had the 1st problems was: (3.2.6173.0).
Although I said at first that I haven’t found any “dump” file, I did it later on, and here is a link as an attachment.
SharpCap.rar
dmp file
It is in a rar version, because the dmp version is not accepted as an attachment and I don’t know how to do it (sorry).
I hope you can find the origin of the first problem with this dmp file.
Ok, now I have updated to version (3.2.6194). About the QHY drivers, I don’t know which one I was using, but I think they should be the latest because I bought the camera just a few days ago. Just in case, I have updated them to the latest.
I am talking in plural about the drivers because, as you know, QHY provides with two different drivers for the camera. One is the Windows driver (known as QHY5LII-M by SharpCap), and the other is the (ASCOM 3 in 1 Driver). When this one is installed, SharpCap listed them three as (QHYCCD-Cameras-Capture, QHYCCD-Cameras-Guide and QHYCCD-Cameras2-Capture).
By the way, which driver is better to use??????

These are my findings with the newest versions. (things have gone worst)
Selecting the QHY driver “QHY5LII-M”.
With Mono8, starts working fine, but as soon as I adjust the gain or the exposure, in a minute or so, the image gets frozen and the previewing counter stops, although the program seems to keep on working. i.e. All the controls keep on working.
When I try to close the program, it appears a window telling that the camera is not responding, and with the following report:
------------------------------------------------------------------------------------------------------------------------------------------------

SharpCap.Base.CameraException: SharpCap tried to stop the camera and waited 14 seconds, but got no response.
en SharpCap.Base.CameraProxyBase.StopGrabThread() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap.Base\CameraProxyBase.cs:línea 161
en SharpCap.Base.CameraProxyBase.StopPreview() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap.Base\CameraProxyBase.cs:línea 135
en SharpCap.Base.BaseImageProvider.Stop() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap.Base\BaseImageProvider.cs:línea 360
en SharpCap.Base.CaptureProviderBase1.StopFramesRunning() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap.Base\CaptureProviderBase.cs:línea 1055
en SharpCap.Base.CaptureProviderBase1.StopPreview() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap.Base\CaptureProviderBase.cs:línea 473
en SharpCap.MultiCaptureProvider.CloseDevice() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Models\MultiCaptureProvider.cs:línea 464
en SharpCap.Models.Camera.CloseDevice() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Models\Camera.cs:línea 1312
en SharpCap.Models.Application.<>c__DisplayClass47_0.<set_SelectedCamera>b__0() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Models\Application.cs:línea 192
en SharpCap.Utils.ExtensionMethods.<>c__DisplayClass12_0.<RunSyncInUIThread>b__0() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Utils\ExtensionMethods.cs:línea 144
en SharpCap.Utils.ExtensionMethods.RunSyncInUIThread[T](DispatcherObject target, Func1 action) en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Utils\ExtensionMethods.cs:línea 184
en SharpCap.Utils.ExtensionMethods.RunSyncInUIThread(DispatcherObject target, Action action) en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Utils\ExtensionMethods.cs:línea 142
en SharpCap.Models.Application.set_SelectedCamera(Camera value) en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Models\Application.cs:línea 182
en SharpCap.Models.Application.DisposeOnClose() en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Models\Application.cs:línea 696
en SharpCap.UI.SharpCapForm.SharpCap_FormClosed(Object sender, FormClosedEventArgs e) en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\UI\SharpCapForm.cs:línea 621
en System.Windows.Forms.Form.OnFormClosed(FormClosedEventArgs e)
en System.Windows.Forms.Form.WmClose(Message& m)
en System.Windows.Forms.Form.WndProc(Message& m)
en SharpCap.UI.SharpCapForm.WndProc(Message& m) en C:\Documents\Source Code\SharpCap3.2\src\SharpCap\UI\SharpCapForm.cs:línea 753
en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
--------------------------------------------------------------------------------------------------------------------------------------------------------------

After this window is closed, it appears the following window. I clicked on (Send and Quit), but I don’t know what happens when I do this, neither how you could contact me for any solution.

Error window after crash
Error window.jpg (98.73 KiB) Viewed 1000 times

Selecting the ASCOM QHY driver “QHYCCD-Cameras-Capture”.
I can only select Mono16 (Mono8 has disappeared).
By the way, with this driver it appears the info of the Temperature. Is this only info of the sensor Temp? It looks like a control; can I control anything? Why this info is not available with the original windows driver for this camera?
I have done this testing with the following results:
1st try
Measuring the Sensor Analysis, it stops when has preview 1957 frames and, while measuring black level, is setting the Gain to 16.
2nd try.
Measuring the Sensor Analysis, it stops when has preview 1183 frames and, while measuring black level, is setting the Gain to 16
3rd try
Measuring the Sensor Analysis, it stops when has preview 1032 frames and, while measuring black level, is setting the Gain to 13.
4th try.
Measuring the Sensor Analysis, it stops when has preview 744 frames and, while measuring black level, is setting the Gain to 1.
After this problem, the rest of the program works (all the controls seem to keep on working) but the image is frozen as well as the previewing counter. The only way to makes the camera works again is to unplug it and plug it again.

Sorry for this long message, and thanks for your help.
Best regards
Mateo

Posts: 4976
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: SharpCap closes suddenly when seleccting Mono16

Hi,

Thanks for taking the time to create and send the dump file. Looking into that has confirmed my initial suspicion that the crash is occurring in QHY code - it looks like the code is trying to copy a block of memory and either the source or the destination are incorrect. Unfortunately I can't fix this problem, but you could report it to qhy and possibly send them the dump file or this stack trace which I've extracted from

Code: Select all

>	msvcr90.dll!memcpy(unsigned char * dst=0x2d517025, unsigned char * src=0x25db4020, unsigned long count=524288) Line 250	Unknown
qhyccd.dll!2556110f()	Unknown
qhyccd.dll![Frames below may be incorrect and/or missing, no symbols loaded for qhyccd.dll]	Unknown
qhyccd.dll!25561385()	Unknown
qhyccd.dll!256f3a48()	Unknown
msvcr90.dll!_callthreadstartex() Line 348	C
msvcr90.dll!_threadstartex(void * ptd=0x2a98bcd0) Line 326	C
kernel32.dll!76686359()	Unknown
ntdll.dll!77777b74()	Unknown
ntdll.dll!77777b44()	Unknown

The second issue that you flag up does look like a case where the cameras stopped responding at least partially – sometimes this can happen such that the control stop working but the frames continue to update, or sometimes the other way round. The error report window that appears is very much reporting a symptom caused by the camera stopping responding rather than the primary problem.

Cheers, Robin

mramirez
Posts: 5
Joined: Mon Jan 13, 2020 7:13 pm

### Re: SharpCap closes suddenly when seleccting Mono16

Thank you Robin. I'll try to find out the problem.
Cheers, Mateo

mramirez
Posts: 5
Joined: Mon Jan 13, 2020 7:13 pm

### Re: SharpCap closes suddenly when seleccting Mono16

Hi Robin.

I have gone back to version (3.2.6173.0) wich is, in my case, more stable.
When I select USB-Trafic=0, and then MONO16, the program starts prewieving at a variable FPS below 4.
After about 50 seconds or so the program closes suddenly, producing the dmp file that I am attaching.
I hope this file helps you somehow.

Thanks a lot

Mateo

P.S. The SharCap.rar file is the dmp file. By the way, why it is not possible to attach a dmp file?
Attachments
SharpCap.rar

Posts: 4976
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: SharpCap closes suddenly when seleccting Mono16

Hi,

Thanks for the further update. As far as I can see this is exactly the same crash as the first report – the code is crashing in the QHY software. By the look of it, it's trying to copy a frame or part of the frame from one place in memory to another and is doing it wrong and accessing memory that it should not.

Code: Select all

>	msvcr90.dll!memcpy(unsigned char * dst=0x300a96ee, unsigned char * src=0x06f05020, unsigned long count=524288) Line 271	Unknown
qhyccd.dll!0623110f()	Unknown
qhyccd.dll![Frames below may be incorrect and/or missing, no symbols loaded for qhyccd.dll]	Unknown
qhyccd.dll!06231385()	Unknown
qhyccd.dll!063c3a48()	Unknown
msvcr90.dll!_callthreadstartex() Line 348	C
msvcr90.dll!_threadstartex(void * ptd=0x2d43ec40) Line 326	C
kernel32.dll!76ae6359()	Unknown
ntdll.dll!77017b74()	Unknown
ntdll.dll!77017b44()	Unknown

`
This confirms my diagnosis that this bug will need to be fixed by the developers at QHY. It seems that in this older version of the qhy software the error may be intermittent rather than happening almost at once in the new version.

Thanks, Robin

mramirez
Posts: 5
Joined: Mon Jan 13, 2020 7:13 pm

### Re: SharpCap closes suddenly when seleccting Mono16

Thanks Robin.

I can not register in QHY forum by now. If I ever can, I'll try to find their help.

Regards

Mateo