Bug 319768 - Skrooge 1.6.0 crashes with EXCEPTION_ACCESS_VIOLATION on Windows
Summary: Skrooge 1.6.0 crashes with EXCEPTION_ACCESS_VIOLATION on Windows
Status: RESOLVED FIXED
Alias: None
Product: kde-windows
Classification: Unmaintained
Component: general (show other bugs)
Version: 4.10
Platform: Other Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Patrick Spendrin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-13 08:15 UTC by Stephane MANKOWSKI
Modified: 2013-05-28 22:10 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane MANKOWSKI 2013-05-13 08:15:08 UTC
After an update of Skrooge done with kdewin-installer-gui-1.0.0,
when Skrooge is launched, Skrooge crashes systematically with the following call stack:
Application: Skrooge (skrooge.EXE), signal: EXCEPTION_ACCESS_VIOLATION


ntdll.dll!ZwWaitForSingleObject() [[unknown] @ -1] at 0x779ff8b1
kernel32.dll!WaitForSingleObjectEx() [[unknown] @ -1] at 0x75ab1194
wlanapi.dll!WlanOpenHandle() [[unknown] @ -1] at 0x5d49531d
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x75ab33aa
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ef2
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ec5


ntdll.dll!NtRemoveIoCompletion() [[unknown] @ -1] at 0x779ff939
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x75ab33aa
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ef2
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ec5


ntdll.dll!ZwWaitForWorkViaWorkerFactory() [[unknown] @ -1] at 0x77a01f26
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x75ab33aa
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ef2
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ec5


ntdll.dll!ZwWaitForMultipleObjects() [[unknown] @ -1] at 0x77a0013d
kernel32.dll!WaitForMultipleObjectsEx() [[unknown] @ -1] at 0x75ab1a2c
USER32.dll!PeekMessageW() [[unknown] @ -1] at 0x771c086a
QtCore4.dll!QEventDispatcherWin32::processEvents() [[unknown] @ -1] at 0x668a71a6
QtCore4.dll!QEventLoop::exec() [[unknown] @ -1] at 0x6687eab9
QtCore4.dll!QThread::exec() [[unknown] @ -1] at 0x66796173
QtCore4.dll!QEventDispatcherWin32::`default constructor closure'() [[unknown] @ -1] at 0x66797709
MSVCR100.dll!endthreadex() [[unknown] @ -1] at 0x5d56c600
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x75ab33aa
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ef2
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ec5


ntdll.dll!ZwWaitForMultipleObjects() [[unknown] @ -1] at 0x77a0013d
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x75ab33aa
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ef2
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ec5


[unknown]![unknown]() [[unknown] @ -1] at 0x0
libsqlite.dll!sqlite3_close_v2() [[unknown] @ -1] at 0x51ef6158
libsqlite.dll!sqlite3_close_v2() [[unknown] @ -1] at 0x51ef6bcf
skgbasemodeler.dll!SKGError::trUtf8() [[unknown] @ -1] at 0x5acb5780


ntdll.dll!ZwWaitForMultipleObjects() [[unknown] @ -1] at 0x77a0013d
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x75ab33aa
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ef2
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77a19ec5


Reproducible: Always

Steps to Reproduce:
1. Update Skrooge to version 1.6.0 by using kdewin-installer-gui-1.0.0
2. Launch Skrooge ==> crash
Actual Results:  
Crash.

Expected Results:  
Skrooge must work like previous version.
Comment 1 Patrick Spendrin 2013-05-13 09:59:08 UTC
could you please specify which compiler you used? Does this only happen if you update, or also if you install to a separate place?
Comment 2 Stephane MANKOWSKI 2013-05-13 11:28:38 UTC
(In reply to comment #1)
> could you please specify which compiler you used? Does this only happen if
> you update, or also if you install to a separate place?

Hi Patrick,
I tried an update first ==> crash
I tried a reinstall "MSVC 2010 32bit" on Windows 7 ==> crash
I tried a reinstall "MinGW4 64bit" on Windows 7 ==> crash (but not exactly the same)
I tried a reinstall "MinGW4 32bit" on Windows 7 ==> crash
Comment 3 Patrick Spendrin 2013-05-13 11:38:02 UTC
ok, I can confirm the crash in libsqlite on mingw64
Comment 4 Patrick Spendrin 2013-05-13 11:39:20 UTC
When the application starts, there are a number of modules loaded in the beginning: do you have any idea what module 15/24 could be? Also where are those modules' source codes?
Comment 5 Stephane MANKOWSKI 2013-05-13 12:01:42 UTC
(In reply to comment #4)
> When the application starts, there are a number of modules loaded in the
> beginning: do you have any idea what module 15/24 could be? Also where are
> those modules' source codes?

In Skrooge, all functions are developed as "plugin".
The 24 modules are 24 skrooge plugins.
The source code is in the Skrooge package in the sub directory named "plugins".
Comment 6 Patrick Spendrin 2013-05-13 12:10:53 UTC
ok, it seems to be not related to the plugins, here is a proper backtrace:

WARNING: Frame IP not in any known module. Following frames may be wrong.
0x0
libsqlite!sqlite3_mutex_enter(struct sqlite3_mutex * p = 0x4a100800)+0x16 [r:\build\win32libs\sqlite-3.7.2\work\msvc2010-debug-3.7.15.2\sqlite3.c @ 17636]
libsqlite!sqlite3_create_function_v2(struct sqlite3 * db = 0x089cb1f8, char * zFunc = 0x5955d3d4 "regexp", int nArg = 0n2, int enc = 0n4, void * p = 0x00000000, <function> * xFunc = 0x594ca620, <function> * xStep = 0x00000000, <function> * xFinal = 0x00000000, <function> * xDestroy = 0x00000000)+0x2f [r:\build\win32libs\sqlite-3.7.2\work\msvc2010-debug-3.7.15.2\sqlite3.c @ 113966]
libsqlite!sqlite3_create_function(struct sqlite3 * db = 0x089cb1f8, char * zFunc = 0x5955d3d4 "regexp", int nArg = 0n2, int enc = 0n4, void * p = 0x00000000, <function> * xFunc = 0x594ca620, <function> * xStep = 0x00000000, <function> * xFinal = 0x00000000)+0x2a [r:\build\win32libs\sqlite-3.7.2\work\msvc2010-debug-3.7.15.2\sqlite3.c @ 113950]
skgbasemodeler!SKGDocument::load(class QString * name = 0x00d9c870, class QString * password = 0x00d9c874, bool restoreTmpFile = false, bool iForceReadOnly = false)+0x169d [r:\build\extragear\skrooge-20111009\work\skrooge-1.6.0\skgbasemodeler\skgdocument.cpp @ 1108]
skgbasemodeler!SKGDocument::initialize(void)+0xa6 [r:\build\extragear\skrooge-20111009\work\skrooge-1.6.0\skgbasemodeler\skgdocument.cpp @ 926]
skg_file!SKGFilePlugin::onNew(void)+0x15c [r:\build\extragear\skrooge-20111009\work\skrooge-1.6.0\plugins\generic\skg_file\skgfileplugin.cpp @ 265]
skg_file!SKGFilePlugin::setupActions(class SKGDocument * iDocument = 0x00d9fd20, class QStringList * iArgument = 0x00d9d3a4)+0xd5e [r:\build\extragear\skrooge-20111009\work\skrooge-1.6.0\plugins\generic\skg_file\skgfileplugin.cpp @ 145]
skgbasegui!SKGMainPanel::SKGMainPanel(class KSplashScreen * iSplashScreen = 0x029bac60, class SKGDocument * iDocument = 0x00d9fd20, class QStringList * iArguments = 0x00d9d3a4)+0xf54 [r:\build\extragear\skrooge-20111009\work\skrooge-1.6.0\skgbasegui\skgmainpanel.cpp @ 161]
skgbasegui!SKGUniqueApplication::newInstance(void)+0x5fe [r:\build\extragear\skrooge-20111009\work\skrooge-1.6.0\skgbasegui\skguniqueapplication.cpp @ 94]
kdeui!KUniqueApplication::Private::_k_newInstanceNoFork(void)+0x2b [r:\build\kde\kdelibs-20110130\work\kdelibs-4.10.2\kdeui\kernel\kuniqueapplication.cpp @ 370]
kdeui!KUniqueApplication::qt_static_metacall(class QObject * _o = 0x00d9fce4, QMetaObject::Call _c = InvokeMetaMethod (0n0), int _id = 0n0, void ** _a = 0x029ef6f0)+0x90 [r:\build\kde\kdelibs-20110130\work\msvc2010-debug-4.10.2\kdeui\kuniqueapplication.moc @ 54]
QtCored4!QMetaCallEvent::placeMetaCall(class QObject * object = 0x00d9fce4)+0x2d [q:\qt-4.8.2\src\corelib\kernel\qobject.cpp @ 524]
QtCored4!QObject::event(class QEvent * e = 0x029c2a30)+0x12a [q:\qt-4.8.2\src\corelib\kernel\qobject.cpp @ 1194]
QtCored4!QCoreApplication::event(class QEvent * e = 0x029c2a30)+0x29 [q:\qt-4.8.2\src\corelib\kernel\qcoreapplication.cpp @ 1759]
QtGuid4!QApplication::event(class QEvent * e = 0x029c2a30)+0x3ca [q:\qt-4.8.2\src\gui\kernel\qapplication.cpp @ 2545]
QtGuid4!QApplicationPrivate::notify_helper(class QObject * receiver = 0x00d9fce4, class QEvent * e = 0x029c2a30)+0xfe [q:\qt-4.8.2\src\gui\kernel\qapplication.cpp @ 4562]
QtGuid4!QApplication::notify(class QObject * receiver = 0x00d9fce4, class QEvent * e = 0x029c2a30)+0x2c7 [q:\qt-4.8.2\src\gui\kernel\qapplication.cpp @ 3944]
kdeui!KApplication::notify(class QObject * receiver = 0x00d9fce4, class QEvent * event = 0x029c2a30)+0x23b [r:\build\kde\kdelibs-20110130\work\kdelibs-4.10.2\kdeui\kernel\kapplication.cpp @ 311]
QtCored4!QCoreApplication::notifyInternal(class QObject * receiver = 0x00d9fce4, class QEvent * event = 0x029c2a30)+0xa1 [q:\qt-4.8.2\src\corelib\kernel\qcoreapplication.cpp @ 946]
Comment 7 Patrick Spendrin 2013-05-13 12:15:43 UTC
I have an idea. the problem might be due to sqlite not being the same between the Qt sqlite library and our own.
Comment 8 Stephane MANKOWSKI 2013-05-13 12:31:15 UTC
(In reply to comment #7)
> I have an idea. the problem might be due to sqlite not being the same
> between the Qt sqlite library and our own.

You are right, this could be that because, in SKGDocument::load, I call directly SQLITE3 APIs to create missing functions.
sqlite3_create_function(sqlite_handle, "regexp", 2, SQLITE_UTF16, NULL, &regexpFunction, NULL, NULL);
 sqlite3_create_function(sqlite_handle, "wildcard", 2, SQLITE_UTF16, NULL, &wildcardFunction, NULL, NULL);
 sqlite3_create_function(sqlite_handle, "word", 2, SQLITE_UTF16, NULL, &wordFunction, NULL, NULL);
 sqlite3_create_function(sqlite_handle, "upper", 1, SQLITE_UTF16, NULL, &upperFunction, NULL, NULL);
sqlite3_create_function(sqlite_handle, "lower", 1, SQLITE_UTF16, NULL, &lowerFunction, NULL, NULL);
 sqlite3_create_function(sqlite_handle, "capitalize", 1, SQLITE_UTF16, NULL, &capitalizeFunction, NULL, NULL);

Do you know how to do to align the sqlite version of QT with the sqlite version used by Skrooge?
Comment 9 Patrick Spendrin 2013-05-13 12:37:40 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > I have an idea. the problem might be due to sqlite not being the same
> > between the Qt sqlite library and our own.
> 
> You are right, this could be that because, in SKGDocument::load, I call
> directly SQLITE3 APIs to create missing functions.
> sqlite3_create_function(sqlite_handle, "regexp", 2, SQLITE_UTF16, NULL,
> &regexpFunction, NULL, NULL);
>  sqlite3_create_function(sqlite_handle, "wildcard", 2, SQLITE_UTF16, NULL,
> &wildcardFunction, NULL, NULL);
>  sqlite3_create_function(sqlite_handle, "word", 2, SQLITE_UTF16, NULL,
> &wordFunction, NULL, NULL);
>  sqlite3_create_function(sqlite_handle, "upper", 1, SQLITE_UTF16, NULL,
> &upperFunction, NULL, NULL);
> sqlite3_create_function(sqlite_handle, "lower", 1, SQLITE_UTF16, NULL,
> &lowerFunction, NULL, NULL);
>  sqlite3_create_function(sqlite_handle, "capitalize", 1, SQLITE_UTF16, NULL,
> &capitalizeFunction, NULL, NULL);
> 
> Do you know how to do to align the sqlite version of QT with the sqlite
> version used by Skrooge?

I am currently trying to build our qt with our own sqlite, but that will need me a while. If that fails, we might have to go back to an older sqlite version.
Comment 10 Patrick Spendrin 2013-05-13 18:20:58 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > I have an idea. the problem might be due to sqlite not being the same
> > > between the Qt sqlite library and our own.
> > 
> > You are right, this could be that because, in SKGDocument::load, I call
> > directly SQLITE3 APIs to create missing functions.
> > sqlite3_create_function(sqlite_handle, "regexp", 2, SQLITE_UTF16, NULL,
> > &regexpFunction, NULL, NULL);
> >  sqlite3_create_function(sqlite_handle, "wildcard", 2, SQLITE_UTF16, NULL,
> > &wildcardFunction, NULL, NULL);
> >  sqlite3_create_function(sqlite_handle, "word", 2, SQLITE_UTF16, NULL,
> > &wordFunction, NULL, NULL);
> >  sqlite3_create_function(sqlite_handle, "upper", 1, SQLITE_UTF16, NULL,
> > &upperFunction, NULL, NULL);
> > sqlite3_create_function(sqlite_handle, "lower", 1, SQLITE_UTF16, NULL,
> > &lowerFunction, NULL, NULL);
> >  sqlite3_create_function(sqlite_handle, "capitalize", 1, SQLITE_UTF16, NULL,
> > &capitalizeFunction, NULL, NULL);
> > 
> > Do you know how to do to align the sqlite version of QT with the sqlite
> > version used by Skrooge?
> 
> I am currently trying to build our qt with our own sqlite, but that will
> need me a while. If that fails, we might have to go back to an older sqlite
> version.

Ok, this way it can be fixed indeed, I will rebuild qt tonight, so it can be fixed tomorrow.
Comment 11 Patrick Spendrin 2013-05-16 23:01:31 UTC
Can you please confirm that you see https://bugs.kde.org/show_bug.cgi?id=298680 now after updating the qt package to 4.8.4-1?
Comment 12 Stephane MANKOWSKI 2013-05-23 06:27:35 UTC
(In reply to comment #11)
> Can you please confirm that you see
> https://bugs.kde.org/show_bug.cgi?id=298680 now after updating the qt
> package to 4.8.4-1?

I don't understand the question.
I installed the version "stable 4.10.2" and grantlee 0.3.0 is installed.
This is good but I don't know if it works well because I am still not able to run Skrooge.
Comment 13 Patrick Spendrin 2013-05-23 08:47:01 UTC
No, the question is only if *this* bug has gone. I am already looking at the other problem, but has this crash vanished for you? I think you can work around the other bug by doing:
subst F: C:\Program Files (x86)\KDE (for msvc installations)
subst G: C:\Program Files (x86)\KDE (for mingw 32bit installations)
subst H: C:\Program Files (x86)\KDE (for mingw 64bit installations)
and then running skrooge again.
Comment 14 Stephane MANKOWSKI 2013-05-23 12:05:25 UTC
(In reply to comment #13)
> No, the question is only if *this* bug has gone. I am already looking at the
> other problem, but has this crash vanished for you? I think you can work
> around the other bug by doing:
> subst F: C:\Program Files (x86)\KDE (for msvc installations)
> subst G: C:\Program Files (x86)\KDE (for mingw 32bit installations)
> subst H: C:\Program Files (x86)\KDE (for mingw 64bit installations)
> and then running skrooge again.
Hi,

This bug is still there. But, this is normal because I am still on the same version.
I don't know how to install the new version.
Only one version is available from download.kde.org:
-this is the "stable 4.10.2" version.
-containing Skrooge 1.6.0 crashing.

What should I do to test your correction?
Comment 15 Patrick Spendrin 2013-05-23 14:05:12 UTC
run kdewin-installer in package manager mode, update the Qt package from 4.8.4 to 4.8.4-1 - this is a Qt build which does not contain an internal sqlite anymore, but instead links again the version of sqlite we ship. That way it should be possible to do the casting you make in skrooge.
Comment 16 Stephane MANKOWSKI 2013-05-23 15:36:18 UTC
(In reply to comment #15)
> run kdewin-installer in package manager mode, update the Qt package from
> 4.8.4 to 4.8.4-1 - this is a Qt build which does not contain an internal
> sqlite anymore, but instead links again the version of sqlite we ship. That
> way it should be possible to do the casting you make in skrooge.

Hi,
After the update, I am able to launch Skrooge without issue.
This bug is close.

The issue with "[ERR-6]: Plugin library 'grantlee_defaulttags' not found." is still there.

Thank you for the correction.
Comment 17 Patrick Spendrin 2013-05-28 22:10:40 UTC
This bug has been fixed by an updated Qt package (which uses an external sqlite)