| Anonymous | Login | Signup for a new account | 2013-06-19 10:18 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0001762 | Kdenlive | MLT | public | 2010-08-23 15:15 | 2011-06-10 10:48 | ||||
| Reporter | Granjow | ||||||||
| Assigned To | ddennedy | ||||||||
| Priority | normal | Severity | crash | Reproducibility | N/A | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | 0.8 | |||||||
| Summary | 0001762: Segfault in consumer_sdl_still.c when loading project | ||||||||
| Description | Something is wrong there. Will recompile now. Crash in consumer_sdl_still.c: static inline void display_4( SDL_Surface *screen, SDL_Rect rect, uint8_t *image, int width, int height ) { // Generate the affine transform scaling values if ( rect.w == 0 || rect.h == 0 ) return; int scale_width = ( width << 16 ) / rect.w; int scale_height = ( height << 16 ) / rect.h; int stride = width * 4; int x, y, row_index; uint8_t *q, *row; // Constants defined for clarity and optimisation int scanlength = screen->pitch / 4; uint32_t *start = ( uint32_t * )screen->pixels + rect.y * scanlength + rect.x; uint32_t *p; // Iterate through the screen using a very basic scaling algorithm for ( y = 0; y < rect.h; y ++ ) { p = start; row_index = ( 32768 + scale_height * y ) >> 16; row = image + stride * row_index; for ( x = 0; x < rect.w; x ++ ) { q = row + ( ( ( 32768 + scale_width * x ) >> 16 ) * 4 ); *p ++ = SDL_MapRGB( screen->format, *q, *( q + 1 ), *( q + 2 ) ); | ||||||||
| Tags | No tags attached. | ||||||||
| Build/Install Method | Manual build from SVN | ||||||||
| Attached Files | |||||||||
Relationships |
||||||||||||||||
|
||||||||||||||||
Notes |
|
|
(0005706) Granjow (developer) 2010-08-30 20:00 |
0 display_4 consumer_sdl_still.c 372 0x00007fffdecfb2a2 1 consumer_play_video consumer_sdl_still.c 522 0x00007fffdecfb2a2 2 consumer_thread consumer_sdl_still.c 570 0x00007fffdecfb2a2 3 start_thread pthread_create.c 300 0x00007ffff25398ba 4 clone clone.S 112 0x00007ffff281e01d 5 ?? 0 0x0000000000000000 Occured again today, when loading a project. |
|
(0005723) Granjow (developer) 2010-08-31 19:35 |
Getting this error over and over again. What information can I provide to help finding this bug? Might be a concurrency issue as not always reproducible. |
|
(0005738) Granjow (developer) 2010-09-01 10:44 |
Perhaps I'll post the stack of all threads: 0 pthread_cond_wait@@GLIBC_2.3.2 pthread_cond_wait.S 162 0x00007ffff253e16c 1 consumer_thread consumer_sdl_preview.c 428 0x00007fffdb5b73d5 2 start_thread pthread_create.c 300 0x00007ffff25398ba 3 clone clone.S 112 0x00007ffff281e01d 4 ?? 0 0x0000000000000000 0 display_4 consumer_sdl_still.c 372 0x00007fffdb5b82a2 1 consumer_play_video consumer_sdl_still.c 522 0x00007fffdb5b82a2 2 consumer_thread consumer_sdl_still.c 570 0x00007fffdb5b82a2 3 start_thread pthread_create.c 300 0x00007ffff25398ba 4 clone clone.S 112 0x00007ffff281e01d 5 ?? 0 0x0000000000000000 0 pthread_cond_timedwait@@GLIBC_2.3.2 pthread_cond_timedwait.S 211 0x00007ffff253e4d9 1 QWaitCondition::wait(QMutex*, unsigned long) /usr/lib/libQtCore.so.4 0 0x00007ffff4220df2 2 ?? /usr/lib/libQtCore.so.4 0 0x00007ffff4215e21 3 ?? /usr/lib/libQtCore.so.4 0 0x00007ffff421fe35 4 start_thread pthread_create.c 300 0x00007ffff25398ba 5 clone clone.S 112 0x00007ffff281e01d 6 ?? 0 0x0000000000000000 0 *__GI___poll poll.c 87 0x00007ffff2813103 1 ?? /usr/lib/libxcb.so.1 0 0x00007fffefb418ca 2 xcb_wait_for_reply /usr/lib/libxcb.so.1 0 0x00007fffefb43c0c 3 _XReply /usr/lib/libX11.so.6 0 0x00007ffff5b3b804 4 XSync /usr/lib/libX11.so.6 0 0x00007ffff5b2f403 5 XCloseDisplay /usr/lib/libX11.so.6 0 0x00007ffff5b0de70 6 ?? /usr/lib/libSDL-1.2.so.0 0 0x00007fffdb3362ec 7 SDL_VideoQuit /usr/lib/libSDL-1.2.so.0 0 0x00007fffdb327492 8 SDL_QuitSubSystem /usr/lib/libSDL-1.2.so.0 0 0x00007fffdb2ffdc5 9 SDL_Quit /usr/lib/libSDL-1.2.so.0 0 0x00007fffdb2ffe5e 10 consumer_stop consumer_sdl_preview.c 255 0x00007fffdb5b6934 11 mlt_consumer_stop mlt_consumer.c 945 0x00007ffff78b8222 12 Mlt::Consumer::stop() /usr/lib/libmlt++.so.3 0 0x00007ffff768f8d5 13 Render::stop renderer.cpp 1264 0x00000000004926a0 14 MonitorManager::activateMonitor monitormanager.cpp 60 0x00000000004c40c9 15 MonitorManager::slotResetProfiles monitormanager.cpp 164 0x00000000004c41d3 16 MainWindow::connectDocument mainwindow.cpp 2137 0x0000000000457ad0 17 MainWindow::qt_metacall mainwindow.moc 350 0x0000000000464d9d 18 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) /usr/lib/libQtCore.so.4 0 0x00007ffff4322346 19 QTabWidget::currentChanged(int) /usr/lib/libQtGui.so.4 0 0x00007ffff38bf6ce 20 ?? /usr/lib/libQtGui.so.4 0 0x00007ffff38c0f8d 21 QTabWidget::qt_metacall(QMetaObject::Call, int, void**) /usr/lib/libQtGui.so.4 0 0x00007ffff38c1240 22 KTabWidget::qt_metacall(QMetaObject::Call, int, void**) /usr/lib/libkdeui.so.5 0 0x00007ffff70d4fe5 23 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) /usr/lib/libQtCore.so.4 0 0x00007ffff4322346 24 QTabBar::currentChanged(int) /usr/lib/libQtGui.so.4 0 0x00007ffff38b63ae 25 QTabBar::insertTab(int, QIcon const&, QString const&) /usr/lib/libQtGui.so.4 0 0x00007ffff38be46a 26 QTabWidget::insertTab(int, QWidget*, QIcon const&, QString const&) /usr/lib/libQtGui.so.4 0 0x00007ffff38c0cd8 27 MainWindow::doOpenFile mainwindow.cpp 1806 0x000000000045adef 28 MainWindow::openFile mainwindow.cpp 1786 0x000000000045b866 29 MainWindow::qt_metacall mainwindow.moc 342 0x0000000000464cf5 30 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) /usr/lib/libQtCore.so.4 0 0x00007ffff4322346 31 KRecentFilesAction::urlSelected(KUrl const&) /usr/lib/libkdeui.so.5 0 0x00007ffff6f0bcf2 32 ?? /usr/lib/libkdeui.so.5 0 0x00007ffff6f0c073 33 KRecentFilesAction::qt_metacall(QMetaObject::Call, int, void**) /usr/lib/libkdeui.so.5 0 0x00007ffff6f0c123 34 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) /usr/lib/libQtCore.so.4 0 0x00007ffff4322346 35 KSelectAction::triggered(QAction*) /usr/lib/libkdeui.so.5 0 0x00007ffff6f0fbcf 36 KSelectAction::actionTriggered(QAction*) /usr/lib/libkdeui.so.5 0 0x00007ffff6f11509 37 KSelectAction::qt_metacall(QMetaObject::Call, int, void**) /usr/lib/libkdeui.so.5 0 0x00007ffff6f127d5 38 KRecentFilesAction::qt_metacall(QMetaObject::Call, int, void**) /usr/lib/libkdeui.so.5 0 0x00007ffff6f0c0d5 39 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) /usr/lib/libQtCore.so.4 0 0x00007ffff4322346 40 QActionGroup::triggered(QAction*) /usr/lib/libQtGui.so.4 0 0x00007ffff3452b3f 41 ?? /usr/lib/libQtGui.so.4 0 0x00007ffff3453347 42 QActionGroup::qt_metacall(QMetaObject::Call, int, void**) /usr/lib/libQtGui.so.4 0 0x00007ffff34535a1 43 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) /usr/lib/libQtCore.so.4 0 0x00007ffff4322346 44 QAction::triggered(bool) /usr/lib/libQtGui.so.4 0 0x00007ffff344e132 45 QAction::activate(QAction::ActionEvent) /usr/lib/libQtGui.so.4 0 0x00007ffff34501ab 46 ?? /usr/lib/libQtGui.so.4 0 0x00007ffff388f981 47 ?? /usr/lib/libQtGui.so.4 0 0x00007ffff3895512 48 KMenu::mouseReleaseEvent(QMouseEvent*) /usr/lib/libkdeui.so.5 0 0x00007ffff70b58be 49 QWidget::event(QEvent*) /usr/lib/libQtGui.so.4 0 0x00007ffff34aa602 50 QMenu::event(QEvent*) /usr/lib/libQtGui.so.4 0 0x00007ffff389770b 51 QApplicationPrivate::notify_helper(QObject*, QEvent*) /usr/lib/libQtGui.so.4 0 0x00007ffff345432c 52 QApplication::notify(QObject*, QEvent*) /usr/lib/libQtGui.so.4 0 0x00007ffff345afdb 53 KApplication::notify(QObject*, QEvent*) /usr/lib/libkdeui.so.5 0 0x00007ffff6fd9836 54 QCoreApplication::notifyInternal(QObject*, QEvent*) /usr/lib/libQtCore.so.4 0 0x00007ffff430f15c 55 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) /usr/lib/libQtGui.so.4 0 0x00007ffff345a1be 56 ?? /usr/lib/libQtGui.so.4 0 0x00007ffff34da4bd 57 QApplication::x11ProcessEvent(_XEvent*) /usr/lib/libQtGui.so.4 0 0x00007ffff34d89ac 58 ?? /usr/lib/libQtGui.so.4 0 0x00007ffff3504552 59 g_main_context_dispatch /lib/libglib-2.0.so.0 0 0x00007fffeeb9f6c2 60 ?? /lib/libglib-2.0.so.0 0 0x00007fffeeba3538 61 g_main_context_iteration /lib/libglib-2.0.so.0 0 0x00007fffeeba36ec 62 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /usr/lib/libQtCore.so.4 0 0x00007ffff4338713 63 ?? /usr/lib/libQtGui.so.4 0 0x00007ffff350414e 64 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /usr/lib/libQtCore.so.4 0 0x00007ffff430da82 65 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) /usr/lib/libQtCore.so.4 0 0x00007ffff430de5c 66 QCoreApplication::exec() /usr/lib/libQtCore.so.4 0 0x00007ffff4312aeb 67 main main.cpp 87 0x000000000044f8d4 |
|
(0005739) Granjow (developer) 2010-09-01 10:49 |
@Dan, I'm not sure whether this is just a local problem, but I've encountered this segfault several times now when loading a (bigger) project in kdenlive. Is there something I could do next time that helps locating the problem? |
|
(0005747) ddennedy (developer) 2010-09-01 19:45 |
In src/modules/sdl/consumer_sdl_still.c, locate the calls to display_1() .. display_4(). There is a mutex lock after the switch block. Move the lock to above the switch statement. If it seems to work, please test it heavily before declaring it as the solution! |
|
(0005748) Granjow (developer) 2010-09-01 20:37 |
In static int consumer_play_video( consumer_sdl this, mlt_frame frame )? |
|
(0005749) ddennedy (developer) 2010-09-01 20:52 |
Yes, should be line 530, move it to line 510, above the switch, but inside the if. |
|
(0005804) ddennedy (developer) 2010-09-07 03:40 |
You tried this? |
|
(0005828) Granjow (developer) 2010-09-13 16:05 |
Hey Dan, had been in holidays last week. But I've been working with this fix, got some other segfaults I had before, but not this one. So to me it didn't seem to break anything. Whether it fixes this bug I cannot say for sure yet due to the behaviour of concurrency issues, will test for another 10 years ;) |
|
(0006094) ddennedy (developer) 2010-11-20 08:06 |
This might have been fixed with the fix for bug 1711. |
|
(0006162) ttill (developer) 2010-12-11 23:49 |
Nope it was not fixed. Got this one today, now trying the suggested fix. |
|
(0006185) ddennedy (developer) 2010-12-17 06:59 |
Fixed in mlt git commit cfd388d. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-08-23 15:15 | Granjow | New Issue | |
| 2010-08-23 15:27 | Granjow | Summary | Segfault when loading project => Segfault in consumer_sdl_still.c when loading project |
| 2010-08-30 20:00 | Granjow | Note Added: 0005706 | |
| 2010-08-31 19:35 | Granjow | Note Added: 0005723 | |
| 2010-09-01 10:44 | Granjow | Note Added: 0005738 | |
| 2010-09-01 10:44 | Granjow | Assigned To | => ddennedy |
| 2010-09-01 10:44 | Granjow | Status | new => assigned |
| 2010-09-01 10:49 | Granjow | Note Added: 0005739 | |
| 2010-09-01 19:45 | ddennedy | Note Added: 0005747 | |
| 2010-09-01 20:37 | Granjow | Note Added: 0005748 | |
| 2010-09-01 20:52 | ddennedy | Note Added: 0005749 | |
| 2010-09-07 03:40 | ddennedy | Note Added: 0005804 | |
| 2010-09-07 03:40 | ddennedy | Status | assigned => feedback |
| 2010-09-13 16:05 | Granjow | Note Added: 0005828 | |
| 2010-09-13 16:05 | Granjow | Status | feedback => assigned |
| 2010-09-22 04:58 | ddennedy | Relationship added | related to 0001560 |
| 2010-09-22 05:14 | ddennedy | Relationship added | has duplicate 0001820 |
| 2010-11-20 08:05 | ddennedy | Relationship added | related to 0001711 |
| 2010-11-20 08:06 | ddennedy | Note Added: 0006094 | |
| 2010-11-20 08:06 | ddennedy | Status | assigned => feedback |
| 2010-12-11 23:49 | ttill | Note Added: 0006162 | |
| 2010-12-17 06:59 | ddennedy | Note Added: 0006185 | |
| 2010-12-17 06:59 | ddennedy | Status | feedback => resolved |
| 2010-12-17 06:59 | ddennedy | Fixed in Version | => Recent git |
| 2010-12-17 06:59 | ddennedy | Resolution | open => fixed |
| 2011-04-26 21:58 | j-b-m | Fixed in Version | Recent git => 0.8 |
| 2011-06-10 10:48 | Granjow | Status | resolved => closed |
| Copyright © 2000 - 2013 MantisBT Team |