Bug#852346: kdenlive: crash on startup

2017-01-31 Thread Luca Boccassi
On Tue, 2017-01-31 at 21:56 +0100, Vincent Pinon wrote:
> Hello,
> 
> Actually this is Kdenlive bug 375094, fixed just after 16.12.1 release :(
> See Kdenlive revert commit 8a20fca86e9e2ce3d04b3e024b0752e19f9d8c8e
> (attached as patch)
> 
> Actually the following commit in 16.12 branch also fixes NVidia crash with 
> GPU effects:
> kdenlive commit 754b8eeed8c1a874a5535eb5136b02841a812180
> (attached too)
> 
> maybe worth to include in a 16.12.1-2 for stretch users, if not too late? 
> (16.12.2 won't come on time)
> 
> Cheers and thanks to all,
> 
> Vincent

Thanks for the analysis!

Patrick, are you happy for me to punt these bugs back to kdenlive then?

Kind regards,
Luca Boccassi


signature.asc
Description: This is a digitally signed message part


Bug#852346: kdenlive: crash on startup

2017-01-31 Thread Vincent Pinon
Hello,

Actually this is Kdenlive bug 375094, fixed just after 16.12.1 release :(
See Kdenlive revert commit 8a20fca86e9e2ce3d04b3e024b0752e19f9d8c8e
(attached as patch)

Actually the following commit in 16.12 branch also fixes NVidia crash with GPU 
effects:
kdenlive commit 754b8eeed8c1a874a5535eb5136b02841a812180
(attached too)

maybe worth to include in a 16.12.1-2 for stretch users, if not too late? 
(16.12.2 won't come on time)

Cheers and thanks to all,

Vincent>From 8a20fca86e9e2ce3d04b3e024b0752e19f9d8c8e Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Mardelle 
Date: Mon, 16 Jan 2017 20:06:00 +0100
Subject: [PATCH 1/9] Revert "Fix warning about QOffscreenSurface thread"
 Caused startup crash on NVidia cards CCBUG: 375094

This reverts commit 6675c4a509046aa3b57c60cbc3f31435e09c2df7.
---
 src/monitor/glwidget.cpp | 10 +++---
 src/monitor/glwidget.h   |  1 -
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/monitor/glwidget.cpp b/src/monitor/glwidget.cpp
index e4089e661..cd4f56add 100644
--- a/src/monitor/glwidget.cpp
+++ b/src/monitor/glwidget.cpp
@@ -109,7 +109,6 @@ GLWidget::GLWidget(int id, QObject *parent)
 mlt_properties_set_data(mlt_global_properties(), "glslManager", NULL, 0, NULL, NULL);
 emit gpuNotSupported();
 }
-connect(this, SIGNAL(sceneGraphInitialized()), SLOT(createOffscreen()));
 connect(this, SIGNAL(sceneGraphInitialized()), SLOT(initializeGL()), Qt::DirectConnection);
 connect(this, SIGNAL(beforeRendering()), SLOT(paintGL()), Qt::DirectConnection);
 }
@@ -143,17 +142,14 @@ void GLWidget::updateAudioForAnalysis()
 	m_frameRenderer->sendAudioForAnalysis = KdenliveSettings::monitor_audio();
 }
 
-void GLWidget::createOffscreen()
+void GLWidget::initializeGL()
 {
+if (m_isInitialized || !isVisible() || !openglContext()) return;
 if (!m_offscreenSurface.isValid()) {
 m_offscreenSurface.setFormat(openglContext()->format());
 m_offscreenSurface.create();
+openglContext()->makeCurrent(this);
 }
-}
-
-void GLWidget::initializeGL()
-{
-if (m_isInitialized || !isVisible() || !openglContext()) return;
 initializeOpenGLFunctions();
 qDebug() << "OpenGL vendor: " << QString::fromUtf8((const char*) glGetString(GL_VENDOR));
 qDebug() << "OpenGL renderer: " << QString::fromUtf8((const char*) glGetString(GL_RENDERER));
diff --git a/src/monitor/glwidget.h b/src/monitor/glwidget.h
index dc1e0e2f3..d12500a57 100644
--- a/src/monitor/glwidget.h
+++ b/src/monitor/glwidget.h
@@ -182,7 +182,6 @@ private slots:
 void updateTexture(GLuint yName, GLuint uName, GLuint vName);
 void paintGL();
 void onFrameDisplayed(const SharedFrame );
-void createOffscreen();
 
 protected:
 void resizeEvent(QResizeEvent* event);
-- 
2.11.0

>From 754b8eeed8c1a874a5535eb5136b02841a812180 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Mardelle 
Date: Fri, 20 Jan 2017 01:15:01 +0100
Subject: [PATCH 2/9] Fix NVIDIA crash with GPU accel (movit)

---
 src/main.cpp|  2 +-
 src/mltcontroller/producerqueue.cpp | 14 +-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index fc93963de..b081e056f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
 // Force QDomDocument to use a deterministic XML attribute order
 extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed;
 qt_qhash_seed.store(0);
-
+QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
 #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
 QCoreApplication::setAttribute(Qt::AA_X11InitThreads);
 #endif
diff --git a/src/mltcontroller/producerqueue.cpp b/src/mltcontroller/producerqueue.cpp
index 07fd234d3..aa06cf6fb 100644
--- a/src/mltcontroller/producerqueue.cpp
+++ b/src/mltcontroller/producerqueue.cpp
@@ -299,7 +299,19 @@ void ProducerQueue::processFileProperties()
 } else if (service.contains(QStringLiteral("avformat"))) {
 Mlt::Profile *blankProfile = new Mlt::Profile();
 blankProfile->set_explicit(false);
-blankProfile->from_producer(*producer);
+if (KdenliveSettings::gpu_accel()) {
+Clip clp(*producer);
+Mlt::Producer *glProd = clp.softClone(ClipController::getPassPropertiesList());
+Mlt::Filter scaler(*m_binController->profile(), "swscale");
+Mlt::Filter converter(*m_binController->profile(), "avcolor_space");
+glProd->attach(scaler);
+glProd->attach(converter);
+blankProfile->from_producer(*glProd);
+delete glProd;
+}
+else {
+blankProfile->from_producer(*producer);
+}
 

Bug#852346: kdenlive: crash on startup

2017-01-25 Thread George B.

On 25/01/17 13:09, Luca Boccassi wrote:

NVIDIA Corporation GM107GLM [Quadro M1000M]

Do you have an Optimus laptop by any chance? What's the exact model?


I do: Dell Precision 7510.

I have had to disable the Intel graphics card in the BIOS to get the thing to 
work with 2 external screens so it's only Optimus in theory. ;)


George



Bug#852346: kdenlive: crash on startup

2017-01-25 Thread Luca Boccassi
On Wed, 2017-01-25 at 13:57 +0100, Andreas Beckmann wrote:
> On 2017-01-25 13:52, Luca Boccassi wrote:
> > Otherwise you can try to run the script manually, but you'll need to
> > copy it and comment out the "exec" command near the top:
> > 
> > /usr/share/bug/nvidia-driver/script
> 
> or just
> 
> /usr/share/bug/nvidia-driver/script 3>outputfile
> 
> 
> Andreas

Yes that's better :-D

Kind regards,
Luca Boccassi


signature.asc
Description: This is a digitally signed message part


Bug#852346: kdenlive: crash on startup

2017-01-25 Thread Luca Boccassi
On Wed, 2017-01-25 at 13:03 +, George B. wrote:
> affects 852346 kdenlive
> thanks
> 
> On 25/01/17 12:52, Luca Boccassi wrote:
> > Otherwise you can try to run the script manually, but you'll need to
> > copy it and comment out the "exec" command near the top:
> >
> > /usr/share/bug/nvidia-driver/script
> 
> Thanks - reportbug still failed but I was able to run the script because of 
> your instructions. :-)
> 
> Output attached.
> 
> 
> Best regards,
> 
> George

NVIDIA Corporation GM107GLM [Quadro M1000M]

Do you have an Optimus laptop by any chance? What's the exact model?

Kind regards,
Luca Boccassi


signature.asc
Description: This is a digitally signed message part


Bug#852346: kdenlive: crash on startup

2017-01-25 Thread Andreas Beckmann
On 2017-01-25 13:52, Luca Boccassi wrote:
> Otherwise you can try to run the script manually, but you'll need to
> copy it and comment out the "exec" command near the top:
> 
> /usr/share/bug/nvidia-driver/script

or just

/usr/share/bug/nvidia-driver/script 3>outputfile


Andreas



Bug#852346: kdenlive: crash on startup

2017-01-25 Thread Luca Boccassi
On Wed, 2017-01-25 at 12:31 +, George B. wrote:
> Hi Luca,
> 
> On 24/01/17 22:41, Luca Boccassi wrote:
> > Please run:
> >
> > reportbug -N 852346
> >
> > to attach the full system information and logs
> 
> Unfortunately I am unable to do this due to a bug[1] with reportbug. :-(
> 
> Can I get you some information by hand?
> 
> 
> Best regards,
> 
> George

If reportbug can work locally it can print the report to the console:

reportbug --template nvidia-driver

Otherwise you can try to run the script manually, but you'll need to
copy it and comment out the "exec" command near the top:

/usr/share/bug/nvidia-driver/script

Kind regards,
Luca Boccassi


signature.asc
Description: This is a digitally signed message part


Bug#852346: kdenlive: crash on startup

2017-01-25 Thread George B.

Hi Luca,

On 24/01/17 22:41, Luca Boccassi wrote:

Please run:

reportbug -N 852346

to attach the full system information and logs


Unfortunately I am unable to do this due to a bug[1] with reportbug. :-(

Can I get you some information by hand?


Best regards,

George

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848729



Bug#852346: kdenlive: crash on startup

2017-01-24 Thread Luca Boccassi
On Mon, 23 Jan 2017 18:10:00 + "George B."  wrote:
> Package: kdenlive
> Version: 16.12.1-1
> Severity: important
>
> Hello,
>
> Kdenlive crashes on startup:
>
> ```
> OpenGL vendor:  "NVIDIA Corporation"
> OpenGL renderer:  "Quadro M1000M/PCIe/SSE2"
> OpenGL Threaded:  true
> OpenGL ARG_SYNC:  true
> OpenGL OpenGLES:  false
> OpenGL vendor:  "NVIDIA Corporation"
> OpenGL renderer:  "Quadro M1000M/PCIe/SSE2"
> OpenGL Threaded:  true
> OpenGL ARG_SYNC:  true
> OpenGL OpenGLES:  false
> QOpenGLFunctions created with non-current context
> Segmentation fault (core dumped)
> ```
>
> syslog has
> ```
> [95683.085432] FrameRenderer[9753]: segfault at a8 ip 55d95179c919 sp 
> 7f3f30c51650 error 4 in kdenlive[55d951452000+5f5000]
> ```
>
> Backtrace attached.
>
>
> Best regards,
>
> George


Please run:

reportbug -N 852346

to attach the full system information and logs

Kind regards,
Luca Boccassi



Bug#852346: kdenlive: crash on startup

2017-01-24 Thread Patrick Matthäi
reassign #852346 src:nvidia-graphics-drivers
thanks

Am 23.01.2017 um 19:10 schrieb George B.:
> Package: kdenlive
> Version: 16.12.1-1
> Severity: important
>
> Hello,
>
> Kdenlive crashes on startup:
>
> ```
> OpenGL vendor:  "NVIDIA Corporation"
> OpenGL renderer:  "Quadro M1000M/PCIe/SSE2"
> OpenGL Threaded:  true
> OpenGL ARG_SYNC:  true
> OpenGL OpenGLES:  false
> OpenGL vendor:  "NVIDIA Corporation"
> OpenGL renderer:  "Quadro M1000M/PCIe/SSE2"
> OpenGL Threaded:  true
> OpenGL ARG_SYNC:  true
> OpenGL OpenGLES:  false
> QOpenGLFunctions created with non-current context
> Segmentation fault (core dumped)
> ```
>
> syslog has
> ```
> [95683.085432] FrameRenderer[9753]: segfault at a8 ip 55d95179c919 sp 
> 7f3f30c51650 error 4 in kdenlive[55d951452000+5f5000]
> ```
>

FrameRenderer is from the nvidia driver, which is crashing

-- 
/*
Mit freundlichem Gruß / With kind regards,
 Patrick Matthäi
 GNU/Linux Debian Developer

  Blog: http://www.linux-dev.org/
E-Mail: pmatth...@debian.org
patr...@linux-dev.org
*/



Bug#852346: kdenlive: crash on startup

2017-01-23 Thread George B.
Package: kdenlive
Version: 16.12.1-1
Severity: important

Hello,

Kdenlive crashes on startup:

```
OpenGL vendor:  "NVIDIA Corporation"
OpenGL renderer:  "Quadro M1000M/PCIe/SSE2"
OpenGL Threaded:  true
OpenGL ARG_SYNC:  true
OpenGL OpenGLES:  false
OpenGL vendor:  "NVIDIA Corporation"
OpenGL renderer:  "Quadro M1000M/PCIe/SSE2"
OpenGL Threaded:  true
OpenGL ARG_SYNC:  true
OpenGL OpenGLES:  false
QOpenGLFunctions created with non-current context
Segmentation fault (core dumped)
```

syslog has
```
[95683.085432] FrameRenderer[9753]: segfault at a8 ip 55d95179c919 sp 
7f3f30c51650 error 4 in kdenlive[55d951452000+5f5000]
```

Backtrace attached.


Best regards,

George

-- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages kdenlive depends on:
ii  ffmpeg   7:3.2.2-2
ii  kded55.28.0-1
ii  kdenlive-data16.12.1-1
ii  kinit5.28.0-1
ii  kio  5.28.0-1
ii  libc62.24-9
ii  libgcc1  1:6.3.0-4
ii  libgl1-mesa-glx [libgl1] 13.0.3-1
ii  libglu1-mesa [libglu1]   9.0.0-2.1
ii  libkf5archive5   5.28.0-1
ii  libkf5attica55.28.0-1
ii  libkf5auth5  5.28.0-1
ii  libkf5bookmarks5 5.28.0-1
ii  libkf5codecs55.28.0-1
ii  libkf5completion55.28.0-1
ii  libkf5configcore55.28.0-1
ii  libkf5configgui5 5.28.0-1
ii  libkf5configwidgets5 5.28.0-1
ii  libkf5coreaddons55.28.0-1
ii  libkf5crash5 5.28.0-1
ii  libkf5dbusaddons55.28.0-1
ii  libkf5filemetadata3  5.28.0-1
ii  libkf5guiaddons5 5.28.0-1
ii  libkf5i18n5  5.28.0-1
ii  libkf5iconthemes55.28.0-1
ii  libkf5itemviews5 5.28.0-1
ii  libkf5jobwidgets55.28.0-1
ii  libkf5kiocore5   5.28.0-1
ii  libkf5kiofilewidgets55.28.0-1
ii  libkf5kiowidgets55.28.0-1
ii  libkf5newstuff5  5.28.0-1
ii  libkf5notifications5 5.28.0-1
ii  libkf5notifyconfig5  5.28.0-1
ii  libkf5service-bin5.28.0-1
ii  libkf5service5   5.28.0-1
ii  libkf5solid5 5.28.0-2
ii  libkf5sonnetui5  5.28.0-1
ii  libkf5textwidgets5   5.28.0-1
ii  libkf5widgetsaddons5 5.28.0-1
ii  libkf5xmlgui55.28.0-1
ii  libmlt++36.4.1-1
ii  libmlt6  6.4.1-1
ii  libqt5concurrent55.7.1+dfsg-3
ii  libqt5core5a 5.7.1+dfsg-3
ii  libqt5dbus5  5.7.1+dfsg-3
ii  libqt5gui5   5.7.1+dfsg-3
ii  libqt5network5   5.7.1+dfsg-3
ii  libqt5qml5   5.7.1-2
ii  libqt5quick5 5.7.1-2
ii  libqt5script55.7.1~20161021+dfsg-2
ii  libqt5svg5   5.7.1~20161021-2
ii  libqt5widgets5   5.7.1+dfsg-3
ii  libqt5xml5   5.7.1+dfsg-3
ii  libstdc++6   6.3.0-4
ii  libv4l-0 1.12.2-1
ii  melt 6.4.1-1
ii  oxygen-icon-theme5:5.28.0-1
ii  qml-module-qtquick-controls  5.7.1~20161021-2
ii  qml-module-qtquick2  5.7.1-2

Versions of packages kdenlive recommends:
ii  dvdauthor0.7.0-2
ii  dvgrab   3.5+git20160707.1.e46042e-1
ii  frei0r-plugins   1.5.0-1
ii  genisoimage  9:1.1.11-3
ii  recordmydesktop  0.3.8.1+svn602-1+b1
ii  swh-plugins  0.4.17-1

Versions of packages kdenlive suggests:
pn  khelpcenter  

-- debconf-show failed
#0  0x55d95179c919 in  ()
#1  0x55d95179e9db in  ()
#2  0x55d9518f2dbc in  ()
#3  0x7f3f7511f459 in QObject::event(QEvent*) (this=0x7f3f18173090, 
e=) at kernel/qobject.cpp:1263
mce = 
sw = {receiver = 0x7f3f18173090, previousSender = 0x0, currentSender = 
{sender = 0x0, signal = -1, ref = 1}, switched = true}
#4  0x7f3f768beb8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) 
(this=, receiver=0x7f3f18173090, e=0x7f3f200157e0) at 
kernel/qapplication.cpp:3799
consumed = 
this = 
e = 0x7f3f200157e0
receiver = 0x7f3f18173090
#5  0x7f3f768c6341 in QApplication::notify(QObject*, QEvent*) 
(this=0x7fffb6e152f0, receiver=0x7f3f18173090, e=0x7f3f200157e0) at 
kernel/qapplication.cpp:3556
w = 0x7f3f18173090
extra = 
isProxyWidget = 
res = false
#6  0x7f3f750f29a0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) 
(receiver=0x7f3f18173090, event=event@entry=0x7f3f200157e0) at 
kernel/qcoreapplication.cpp:988