Bug 365523 - OktetaPart plugin crashes on second openUrl() call
Summary: OktetaPart plugin crashes on second openUrl() call
Status: RESOLVED FIXED
Alias: None
Product: okteta
Classification: Applications
Component: general (show other bugs)
Version: 0.16.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Friedrich W. H. Kossebau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-12 17:56 UTC by Alex Bikadorov
Modified: 2016-10-25 08:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.20.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Bikadorov 2016-07-12 17:56:39 UTC
The OktetaPart plugin is used in another application (Krusader) and it crashes on the second call of openUrl(). Here is the test code:

      KPluginLoader loader("oktetapart");
      KPluginFactory *factory = loader.factory();
      KParts::ReadOnlyPart* part = factory->create<KParts::ReadOnlyPart>(this, this);
      part->openUrl(url1);
      part->openUrl(url2); // crash here


And the stack trace:
1  ??                                                                                                                           0x7fffc8014f40 
2  QObject::disconnect(QObject const *, const char *, QObject const *, const char *)                                            0x7ffff2bfa861 
3  ??                                                                                                                           0x7fffd5e83139 
4  ??                                                                                                                           0x7fffd61ba83d 
5  ??                                                                                                                           0x7fffd61bc53c 
6  QMetaObject::activate(QObject *, int, int, void * *)                                                                         0x7ffff2bf64e9 
7  Kasten::AbstractLoadJob::documentLoaded(Kasten::AbstractDocument *)                                                          0x7fffd551e0af 
8  Kasten::AbstractLoadJob::setDocument(Kasten::AbstractDocument *)                                                             0x7fffd551504a 
9  ??                                                                                                                           0x7fffd551636e 
10 ??                                                                                                                           0x7fffd5516476 
11 QObject::event(QEvent *)                                                                                                     0x7ffff2bf7349 
12 QApplicationPrivate::notify_helper(QObject *, QEvent *)                                                                      0x7ffff38aae3c 
13 QApplication::notify(QObject *, QEvent *)                                                                                    0x7ffff38b25b1 
14 QCoreApplication::notifyInternal2(QObject *, QEvent *)                                                                       0x7ffff2bcac80 
15 QCoreApplicationPrivate::sendPostedEvents(QObject *, int, QThreadData *)                                                     0x7ffff2bcd3fd 
16 ??                                                                                                                           0x7ffff2c1f173 
17 g_main_context_dispatch                                                                                                      0x7fffee2c0dd7 
18 ??                                                                                                                           0x7fffee2c1040 
19 g_main_context_iteration                                                                                                     0x7fffee2c10ec 
20 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                                                   0x7ffff2c1f57f 
21 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)                                                                      0x7ffff2bc90da 
22 KJob::exec()                                                                                                                 0x7ffff50dd07e 
23 Kasten::JobManager::executeJob(KJob *)                                                                                       0x7fffd551a0ec 
24 ??                                                                                                                           0x7fffd61bb6cb 
25 ??                                                                                                                           0x7ffff78b7091 
26 KParts::ReadOnlyPart::openUrl(QUrl const&)                                                                                   0x7ffff78b7fbc 
...




Reproducible: Always

Steps to Reproduce:
1. try code above
2. compile
3. run.)

Actual Results:  
crash

Expected Results:  
no crash
Comment 1 Friedrich W. H. Kossebau 2016-10-25 08:39:08 UTC
Git commit 1c14d2d0545c14097e3e443a0ddb5fcfda6e5cc0 by Friedrich W. H. Kossebau.
Committed on 25/10/2016 at 08:37.
Pushed by kossebau into branch 'Applications/16.08'.

Fix crash in KPart: remove current model from controllers before deleting it
FIXED-IN: 0.20.3

M  +3    -0    parts/kpart/part.cpp

http://commits.kde.org/okteta/1c14d2d0545c14097e3e443a0ddb5fcfda6e5cc0