On Wed, Dec 25, 2013 at 3:55 PM, Denis Gladkikh <outcold...@gmail.com>wrote:
> Assertion failed! > > Program: ...Windows\GoogleMusic\bin\x86\Debug\AppX\sqlite3.DLL > File: sqlite3.c > Line: 79461 > > Expression: pExpr->iTable==0 || pExpr->iTable==1 > > Program: ...Windows\GoogleMusic\bin\x86\Debug\AppX\sqlite3.DLL > File: sqlite3.c > Line: 62181 > > Expression: (&p[1])==pEnd || p[0].db==p[1].d > > My environment is: > > SQLite for Windows Runtime (for VS 2012) > > http://visualstudiogallery.msdn.microsoft.com/23f6c55a-4909-4b1f-80b1-25792b11639e > I use my own fork of https://github.com/praeclarum/sqlite-net for > connection. > > I'm on Windows x64, when I'm building amd64 bit app - everything seems > fine, but in case of x86 on Windows 8.1 x64 - I'm getting this error. Did > not have a chance to verify x86 on Win8 x86. > This (together with the nature of the asserts that fail) suggest some kind of compiler malfunction. Do you get the same problems if you disable optimizations? When compilers make mistakes, it is usually in the optimizer, and so if you disable optimizations sometimes things will work better. The problem might also be memory corruption in your application. If you can provide a test case we can look further. But without a reproducible test case, there isn't much we can do. > > It looks like that SQLite fails to do insert in one of my tables, which has > following trigger: > > CREATE TRIGGER insert_userplaylistentry AFTER INSERT ON UserPlaylistEntry > BEGIN > > update [UserPlaylist] > set > [SongsCount] = [SongsCount] + 1, > [Duration] = [UserPlaylist].[Duration] + (select s.[Duration] from > [Song] as s where s.[SongId] = new.[SongId]), > [ArtUrl] = case when nullif([UserPlaylist].[ArtUrl], '') is null > then (select s.[AlbumArtUrl] from [Song] as s where s.[SongId] = > new.[SongId]) else [UserPlaylist].[ArtUrl] end, > [LastPlayed] = (select case when [UserPlaylist].[LastPlayed] > > s.[LastPlayed] then [UserPlaylist].[LastPlayed] else s.[LastPlayed] end > from [Song] as s where s.[SongId] = new.[SongId]), > [OfflineSongsCount] = [UserPlaylist].[OfflineSongsCount] + > coalesce( (select 1 from CachedSong cs where new.[SongId] = cs.[SongId]) , > 0), > [OfflineDuration] = [UserPlaylist].[OfflineDuration] + coalesce( > (select s.[Duration] from [Song] as s inner join [CachedSong] as cs on > s.SongId = cs.SongId where s.[SongId] = new.[SongId]), 0) > where [PlaylistId] = new.PlaylistId; > > END; > > > If I remove highlighted rows - insert works. > If somebody is interesting to take deeper look in this problem - I can send > my database. > > Btw, by default all Windows Store applications are x86, so if this is > global issue - it can affect a lot of Windows Store developers. > > -- > Thanks, > Denis Gladkikh > http://outcoldman.com > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users