SQLite error saving new wiki

73 views
Skip to first unread message

wwwald

unread,
Sep 24, 2016, 3:33:25 PM9/24/16
to wikidpad-devel
Hi all,

I'm running Wikidpad 2.3beta15, on Win10 - Python 2.7.12 (64bit) with wxPython 3.0.2.
Creating and saving a new wiki results in the following error:

Seems to be an issue with closing the database file after saving, but I haven't yet been able to trace it down deeper than that. Traceback reads:
Traceback (most recent call last):
  File "lib\pwiki\PersonalWikiFrame.py", line 2988, in newWiki
    False)
  File "lib\pwiki\wikidata\WikiDataManager.py", line 77, in createWikiDb
    createWikiDbFunc(wikiName, dataDir, overwrite)
  File "lib\pwiki\wikidata\original_sqlite\DbStructure.py", line 702, in createWikiDB
    connwrap.close()
  File "lib\pwiki\wikidata\original_sqlite\DbStructure.py", line 133, in close
    self.dbConn.close()
  File "lib\pwiki\sqlite3api.py", line 154, in close
    raise e
Error: unable to close due to unfinalized statements or unfinished backups [5]


Thanks for any clues,
wwwald

wwwald

unread,
Sep 26, 2016, 3:44:32 PM9/26/16
to wikidpad-devel
Alright... some more elements to the story that may help narrow down the problem.

Today I used another laptop (Win7 - otherwise same setup as mentioned before) to rebuild the wiki that I was having trouble with. On that computer, no problem to create a new wiki, nor opening the existing one after rebuilding the database.
On the original Windows 10 laptop, however, this repaired wiki again fails to open.

Traceback that I'm seeing now:
Version: 'wikidPad 2.3beta15' Session start: 2016-09-26 20:41:30
Traceback (most recent call last):
  File "lib\pwiki\wikidata\original_sqlite\WikiData.py", line 774, in getChildRelationships
    return self.connWrap.execSqlQuerySingleColumn(sql, (wikiWord,))
  File "lib\pwiki\wikidata\original_sqlite\DbStructure.py", line 86, in execSqlQuerySingleColumn
    data = self.execSqlQuery(sql, params)
  File "lib\pwiki\wikidata\original_sqlite\DbStructure.py", line 63, in execSqlQuery
    self.dbCursor.execute(sql, params, typeDetect=sqlite.TYPEDET_FIRST)
  File "lib\pwiki\sqlite3api.py", line 331, in execute
    self.stmt = self.conn.prepare(sql)
  File "lib\pwiki\sqlite3api.py", line 98, in prepare
    return [self.thinConn.prepare(sql), None]
  File "lib\pwiki\SqliteThin3.py", line 613, in prepare
    len(sql), byref(stmtref), 0))
WindowsError: exception: access violation writing 0xFFFFFFBB00000000
Traceback (most recent call last):
  File "lib\pwiki\WikiTreeCtrl.py", line 2439, in OnTreeItemExpand
    nodeStyle = ch.getNodePresentation()
  File "lib\pwiki\WikiTreeCtrl.py", line 230, in getNodePresentation
    return self._createNodePresentation(self.newLabel)
  File "lib\pwiki\WikiTreeCtrl.py", line 316, in _createNodePresentation
    style.hasChildren = fast or self._hasValidChildren(wikiPage)
  File "lib\pwiki\WikiTreeCtrl.py", line 286, in _hasValidChildren
    selfreference=False, withFields=())
  File "lib\pwiki\DocPages.py", line 656, in getChildRelationships
    existingonly, selfreference, withFields=withFields)
  File "lib\pwiki\wikidata\WikiDataManager.py", line 257, in __call__
    return self.callFunction(*args, **kwargs)
  File "lib\pwiki\wikidata\original_sqlite\WikiData.py", line 777, in getChildRelationships
    raise DbReadAccessError(e)
DbReadAccessError: exception: access violation writing 0xFFFFFFBB00000000

Again, seems to be a problem with DB access. 

Are there any restrictions on the SQlite3 DLL version that Wikidpad works with? I'm currently using 3.14.2, the latest available.
Could this be a Win10 thing? Just thinking aloud, since everything on the Win7 machine works as expected...

wwwald

Michael Butscher

unread,
Sep 26, 2016, 8:40:17 PM9/26/16
to wikidpa...@googlegroups.com
On 26.09.2016 21:44, wwwald wrote:
> Alright... some more elements to the story that may help narrow down the
> problem.
>
> Today I used another laptop (Win7 - otherwise same setup as mentioned
> before) to rebuild the wiki that I was having trouble with. On that
> computer, no problem to create a new wiki, nor opening the existing one
> after rebuilding the database.
> On the original Windows 10 laptop, however, this repaired wiki again fails
> to open.
>
> Traceback that I'm seeing now:

[...]
> File "lib\pwiki\SqliteThin3.py", line 613, in prepare
> len(sql), byref(stmtref), 0))
> WindowsError: exception: access violation writing 0xFFFFFFBB00000000

[...]
> Again, seems to be a problem with DB access.
>
> Are there any restrictions on the SQlite3 DLL version that Wikidpad works
> with? I'm currently using 3.14.2, the latest available.

WikidPad was only tested with the Sqlite version shipped with the Windows binary
so maybe the new version works differently in some way.


> Could this be a Win10 thing? Just thinking aloud, since everything on the
> Win7 machine works as expected...

Maybe it has to do with some mitigation default settings (controllable by the
https://en.wikipedia.org/wiki/Enhanced_Mitigation_Experience_Toolkit ) or other
special security settings which changed from Win 7 to 10.

The mitigation functionality tries to remove some general vulnerabilities by
e.g. watching the code execution and allocating memory in a random way where
malware expects a predictable behavior.

Unfortunately the mitigation can sometimes disturb regular software as well but
I don't know if this is the cause here.


Michael



--
Homepage: http://www.mbutscher.de/


Diese Nachricht wurde mit 0% neuer Rechtschreibung hergestellt.

wwwald

unread,
Sep 27, 2016, 4:36:51 PM9/27/16
to wikidpad-devel
Hi!

I'm going to be careful, but at first sight the Windows 10 hunch is the right one.

Yesterday, I already switched from my regular source-code based WikidPad (the one that was acting up) to a vanilla installer-based Wikidpad installation. This worked perfectly fine on the Win7 laptop, the Win10 laptop still continued complaining about SQLite database access (this time in some prepare() statements).

I just installed the EMET tool, and disabled all protection mechanisms for the wikidpad.exe binary. And behold, my wiki's open normally again, on the Win10 machine.

Next step is to switch back to my source-code-based setup and update the EMET setting for the Python binary. Will report back how things go...

Thanks for pointing me to the EMET tool, I wasn't familiar with that.
wwwald

Bjorn

unread,
Mar 8, 2017, 8:50:34 AM3/8/17
to wikidpad-devel
The latest sqlite seems to work well with wikidpad in my experience (Version 3.17.0). /bjorn
Reply all
Reply to author
Forward
0 new messages