.net application crashing

Questions about Wine on Linux
Locked
Buka
Newbie
Newbie
Posts: 3
Joined: Tue Jul 04, 2017 11:00 am

.net application crashing

Post by Buka »

I've a .net application using the portsip sdk for SIP telephony functionality (https://www.portsip.com/portsip-voip-sdk/).

The application starts fine, the wpf windows appear. I can start a video call that rings at the counterpart. But if I answer the call the app crashes and I'm not able to find the reason because of some cryptic output.

Of course I tested the app in a windows environment and it works fine.

The are some messages telling me some device is busy:

Code: Select all

libv4l2: error setting pixformat: Das Gerät oder die Ressource ist belegt
err:qcap_v4l:qcap_driver_init video format NULL renderer isn't available
Do I have to allow access to the camera somehow?

There is an unhandled exception. Is there a way to find the type of exception or even the message of the exception?

I know it is a very special case, but perhaps I have some luck and find someone who can give me some hints on how to continue finding the error. Any help is very appreciated.


Details:
System information:
-Wine build: wine-2.11 (Staging)
-Platform: i386
-Version: Windows 7
-Host system: Linux
-Host version: 4.4.0-81-generic
Installed dotnet40 with winetricks
installed dotnet462 with the microsoft offline installer (NDP462-KB3151800-x86-x64-AllOS-ENU.exe)

The output:

Code: Select all

fixme:urlmon:SecManagerImpl_MapUrlToZone not supported flags: 00000001
fixme:kernelbase:QuirkIsEnabled3 (0x32dd80, 0xffffffff) stub!
fixme:urlmon:SecManagerImpl_MapUrlToZone not supported flags: 00000001
fixme:kernelbase:QuirkIsEnabled3 (0x1918e560, 0xffffffff) stub!
fixme:kernelbase:QuirkIsEnabled3 (0x1918e560, 0xffffffff) stub!
fixme:kernelbase:QuirkIsEnabled3 (0x1918e560, 0xffffffff) stub!
fixme:kernelbase:QuirkIsEnabled3 (0x1918e560, 0xffffffff) stub!
fixme:kernelbase:QuirkIsEnabled3 (0x1918e548, 0xffffffff) stub!
WARNING: no real random source present!
fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",0x1f30e9bc): stub
fixme:avrt:AvSetMmThreadPriority (0x12345678)->(2) stub
fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",0x1f40e944): stub
fixme:avrt:AvSetMmThreadPriority (0x12345678)->(2) stub
fixme:qcap:KSP_Get () Not adding a pin with PIN_CATEGORY_PREVIEW
libv4l2: error setting pixformat: Das Gerät oder die Ressource ist belegt
libv4l1: error setting pixformat: Das Gerät oder die Ressource ist belegt
libv4l2: error setting pixformat: Das Gerät oder die Ressource ist belegt
libv4l1: error setting pixformat: Das Gerät oder die Ressource ist belegt
libv4l2: error setting pixformat: Das Gerät oder die Ressource ist belegt
libv4l1: error setting pixformat: Das Gerät oder die Ressource ist belegt
libv4l2: error setting pixformat: Das Gerät oder die Ressource ist belegt
libv4l1: error setting pixformat: Das Gerät oder die Ressource ist belegt
libv4l2: error setting pixformat: Das Gerät oder die Ressource ist belegt
libv4l1: error setting pixformat: Das Gerät oder die Ressource ist belegt
err:qcap_v4l:qcap_driver_init video format NULL renderer isn't available
fixme:kernelbase:QuirkIsEnabled3 (0xdebd2b8, 0xffffffff) stub!
fixme:kernelbase:QuirkIsEnabled3 (0xdebc760, 0xffffffff) stub!
fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000402,(nil),0x0001,0x00000000,0xdebca34,(nil)): stub
err:eventlog:ReportEventW L"Application: VTMA.exe\nFramework Version: v4.0.30319\nDescription: The process was terminated due to an unhandled exception.\nException Info: exception code c0000264, exception address 7BC687C9\n"
fixme:advapi:DeregisterEventSource (0xcafe4242) stub
wine: Unhandled exception 0xc0000264 in thread 4c at address 0x7bc687c9 (thread 004c), starting debugger...
fixme:avrt:AvRevertMmThreadCharacteristics (0x12345678): stub
Unhandled exception: 0xc0000264 in 32-bit code (0x7bc687c9).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:7bc687c9 ESP:0debdbe4 EBP:0debdc58 EFLAGS:00200216(   - --  I   -A-P- )
 EAX:00000000 EBX:7bd05000 ECX:0debdc90 EDX:00000000
 ESI:0debdbfc EDI:80010000
Stack dump:
0x0debdbe4:  00000000 ffffffff 7bc687ac 00110000
0x0debdbf4:  7b000000 00000000 c0000264 00000001
0x0debdc04:  00000000 7bc687c9 00000000 00000300
0x0debdc14:  7bc5ec36 ffffffff 7bc731bc 00110060
0x0debdc24:  f7578940 00000000 7bc730af 75e6d000
0x0debdc34:  10d0506c 0debdc78 00110060 10d04920
000c: sel=0067 base=00000000 limit=00000000 32-bit r-x
Backtrace:
=>0 0x7bc687c9 in ntdll (+0x287c9) (0x0debdc58)
  1 0x7bc687ea RtlRaiseStatus+0x19() in ntdll (0x0debdc78)
  2 0x7bcaf721 RtlReleaseSRWLockShared+0x80() in ntdll (0x0debdcc8)
  3 0x0fa1fcea in portsip_sdk (+0x48fce9) (0x0debdd2c)
  4 0x0fa64b33 in portsip_sdk (+0x4d4b32) (0x0debde1c)
  5 0x0fa64a61 in portsip_sdk (+0x4d4a60) (0x0debde34)
  6 0x0fa61b36 in portsip_sdk (+0x4d1b35) (0x0debde48)
  7 0x0fa4c7f9 in portsip_sdk (+0x4bc7f8) (0x0debde5c)
  8 0x0fa4bddb in portsip_sdk (+0x4bbdda) (0x0debde70)
  9 0x0fa58e96 in portsip_sdk (+0x4c8e95) (0x0debe3bc)
  10 0x0fa41848 in portsip_sdk (+0x4b1847) (0x0debe3d4)
  11 0x0f6b67ad in portsip_sdk (+0x1267ac) (0x0debe41c)
  12 0x0f6ad018 in portsip_sdk (+0x11d017) (0x0debe63c)
  13 0x0f6abac8 in portsip_sdk (+0x11bac7) (0x0debe6a4)
  14 0x0f628b65 in portsip_sdk (+0x98b64) (0x0debe748)
  15 0x0f5f3a31 in portsip_sdk (+0x63a30) (0x0debe96c)
  16 0x0f63092d in portsip_sdk (+0xa092c) (0x0debe994)
  17 0x0f77b23b in portsip_sdk (+0x1eb23a) (0x0debe99c)
  18 0x0f9203a5 in portsip_sdk (+0x3903a4) (0x0debe9d8)
  19 0x7bca560c call_thread_func_wrapper+0xb() in ntdll (0x0debe9f8)
  20 0x7bca88dd call_thread_func+0xfc() in ntdll (0x0debeaf8)
  21 0x7bca55ea RtlRaiseException+0x21() in ntdll (0x0debeb18)
  22 0x7bcb086f in ntdll (+0x7086e) (0x0debf368)
  23 0xf7584295 start_thread+0xe4() in libpthread.so.0 (0x0debf428)
  24 0xf74ae05e __clone+0x6d() in libc.so.6 (0x00000000)
  25 0xf74ae05e __clone+0x6d() in libc.so.6 (0x00000000)
  26 0xf74ae05e __clone+0x6d() in libc.so.6 (0x00000000)
  27 0xf74ae05e __clone+0x6d() in libc.so.6 (0x00000000)
  28 0xf74ae05e __clone+0x6d() in libc.so.6 (0x00000000)
  29 0xf74ae05e __clone+0x6d() in libc.so.6 (0x00000000)
  30 0xf74ae05e __clone+0x6d() in libc.so.6 (0x00000000)
...
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: .net application crashing

Post by Bob Wya »

Buka wrote:...

The are some messages telling me some device is busy:

Code: Select all

libv4l2: error setting pixformat: Das Gerät oder die Ressource ist belegt
err:qcap_v4l:qcap_driver_init video format NULL renderer isn't available
Do I have to allow access to the camera somehow?
Don't worry about that - this just means your version of Wine is built with Video4Linux support...
Buka wrote:Installed dotnet40 with winetricks
installed dotnet462 with the microsoft offline installer (NDP462-KB3151800-x86-x64-AllOS-ENU.exe)
No don't do that!

If you really need MS .Net framework 4.6.2 then install it with winetricks directly:

Code: Select all

winetricks dotnet462
If you can't - then you need to update your winetricks script - to the latest build.
See WineHQ Winetricks...

Can the application run in a WINEPREFIX set to Windows XP?
If so - you might want to test this as well...
Wine support for the newer MS Windows API's - introduced in Windows Vista - is still a bit hit-and-miss...

Bob
Buka
Newbie
Newbie
Posts: 3
Joined: Tue Jul 04, 2017 11:00 am

Re: .net application crashing

Post by Buka »

Thanks for your reply, Bob.
Bob Wya wrote:
Buka wrote:Installed dotnet40 with winetricks
installed dotnet462 with the microsoft offline installer (NDP462-KB3151800-x86-x64-AllOS-ENU.exe)
No don't do that!

If you really need MS .Net framework 4.6.2 then install it with winetricks directly:

Code: Select all

winetricks dotnet462
Ok, I have done that. Unfortunately my company denies access to the dropbox where winetricks wants to download the slim installer from. So I downloaded it in an alternative way and copied it to ~/.cache/winetricks/dotnet462/ and restarted

Code: Select all

winetricks dotnet462
Hope this leads to the same result? The installer installed all the different dotnet versions but in the end I had an error "Error during execution 'netfx_fullp_x86de.msi /qb!'. File not found.". But it seems to work.
Bob Wya wrote: Can the application run in a WINEPREFIX set to Windows XP?
If so - you might want to test this as well...
I also tested that. Still the same behaviour.

Any further ideas?

Thanks
Buka
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: .net application crashing

Post by Bob Wya »

Buka wrote:...
I also tested that. Still the same behaviour.

Any further ideas?

Thanks
Buka
@Buka

Well the crash appears to occur in the .Net 4.0 framework libraries.
Usually applications are based on a single .Net framework version.
So just a thought - do you actually need .Net 4.6.2 framework?
Installing a higher version of .Net framework, then you actually require, is a recipe for disaster... :cry:

Have you tried running the application (in a clean WINEPREFIX) with just:

Code: Select all

winetricks dotnet40
Bob
Buka
Newbie
Newbie
Posts: 3
Joined: Tue Jul 04, 2017 11:00 am

Re: .net application crashing

Post by Buka »

The software needs at least .net version 4.6.1. I tried that also without success.

I also tried to start a simple video capture software with wine. I wasn't able to get a picture.

Then I found several hints that a webcam might not work with wine:
https://bugs.winehq.org/show_bug.cgi?id=16147
https://bugs.winehq.org/show_bug.cgi?id=37561

These are bugs from older wine version. But I can't find if it is solved now.
If it is solved: can someone tell me how to make the webcam work?

Otherwise it's time to give up here I think.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: .net application crashing

Post by dimesio »

Locked