Bug v18 Win64 no uwp bug with secondary monitor
#1
Hi to all, I have just switched to v18, with nightly KodiSetup-20180113-acedd16a-master-x64. when switching to secondary monitor at next start apparently nothing happens, no splash screen, no tray icon, but in task manager there is kodi.exe.

During the first monitor switch video is correctly display in secondary monitor until I start a playback, then crashing and throwing this error:

xml:
Nome registro: Application
Origine:       Application Error
Data:          13/01/2018 19:18:48
ID evento:     1000
Categoria attivitàSad100)
Livello:       Errore
Parole chiave: Classico
Utente:        N/D
Computer:      Utente-PC
Descrizione:
Nome dell'applicazione che ha generato l'errore: kodi.exe, versione: 17.9.701.0, timestamp: 0x5a5a1ec6
Nome del modulo che ha generato l'errore: kodi.exe, versione: 17.9.701.0, timestamp: 0x5a5a1ec6
Codice eccezione: 0xc0000005
Offset errore 0x00000000006a68bf
ID processo che ha generato l'errore: 0x4a8
Ora di avvio dell'applicazione che ha generato l'errore: 0x01d38c9ad4156f6d
Percorso dell'applicazione che ha generato l'errore: C:\Program Files\Kodi\kodi.exe
Percorso del modulo che ha generato l'errore: C:\Program Files\Kodi\kodi.exe
ID segnalazione: 222d0c6f-6213-4198-b863-d72edb4da7b0
Nome completo pacchetto che ha generato l'errore:
ID applicazione relativo al pacchetto che ha generato l'errore:
XML evento:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2018-01-13T18:18:48.431693400Z" />
    <EventRecordID>16933</EventRecordID>
    <Channel>Application</Channel>
    <Computer>Utente-PC</Computer>
    <Security />
  </System>
  <EventData>
    <Data>kodi.exe</Data>
    <Data>17.9.701.0</Data>
    <Data>5a5a1ec6</Data>
    <Data>kodi.exe</Data>
    <Data>17.9.701.0</Data>
    <Data>5a5a1ec6</Data>
    <Data>c0000005</Data>
    <Data>00000000006a68bf</Data>
    <Data>4a8</Data>
    <Data>01d38c9ad4156f6d</Data>
    <Data>C:\Program Files\Kodi\kodi.exe</Data>
    <Data>C:\Program Files\Kodi\kodi.exe</Data>
    <Data>222d0c6f-6213-4198-b863-d72edb4da7b0</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>

guisettings.xml  https://pastebin.com/UtW0fY9i
kodi.old.log https://pastebin.com/KgETJ5PT
kodi.log https://pastebin.com/WrrkAYGf
Reply
#2
After a little investigation, seems that IDXGIOutput in deviceresource.cpp at line 122 return a null pointer, but only on secondary adapter that is a intel hd graphics 4000. On primary adapter pOutput is filled correctly.

Edit
Debug window

DXGI_OUTPUT_DESK returns NULL Monitor on secondary adapter

Please @afedchin take a look.
Reply
#3
With #13386 and  #13417 the situation has improved, no more infinite loops and dx structs are almost filled correctly.
Now starts right in secondary monitor and crashes when start playback or switch to fullscreen (no windowed fullscreen).
Track flow in neighborhood of the access violation show that pOutput pointer was nullptr.
Debug log shows that the output device was select correctly but the renderer point to primary adapter instead of the correct one.

There is an extract of the log:

https://pastebin.com/sh38UUyH

Thanks
Reply
#4
In xbmc/rendering/dx/DeviceResources.cpp in function CreateDeviceResources() at line 283:

xml:
HRESULT hr = D3D11CreateDevice(
nullptr, // Specify nullptr to use the default adapter.
D3D_DRIVER_TYPE_HARDWARE, // Create a device using the hardware graphics driver.
nullptr, // Should be 0 unless the driver is D3D_DRIVER_TYPE_SOFTWARE.
creationFlags, // Set debug and Direct2D compatibility flags.
featureLevels, // List of feature levels this app can support.
ARRAYSIZE(featureLevels), // Size of the list above.
D3D11_SDK_VERSION, // Always set this to D3D11_SDK_VERSION for Windows Store apps.
&device, // Returns the Direct3D device created.
&m_d3dFeatureLevel, // Returns feature level of device created.
&context // Returns the device immediate context.
);

According to https://msdn.microsoft.com/en-us/library...s.85).aspx
if the first parameter is NULL D3D11CreateDevice() ever create the device on the first default adapter.
I think it need to be pointed to adapter on SetMonitor()
Reply
#5
Fixed by me on #13464
Reply

Logout Mark Read Team Forum Stats Members Help
v18 Win64 no uwp bug with secondary monitor0