Problem using SQLite

Problem using SQLite

Postby Andrew » 10 Feb 2010, 10:03

By moderator: solution here

I'm having some problems with SQLite which I can't figure out if it's my machine or my code. I could really use someone else running and testing my code. If anyone has time to check it out and reply back it would be great.

You can find out how to build the game here: http://forum.hardwar.org/viewtopic.php?f=5&t=3

1) What I need someone to do is start a server and then a client.
cd bin
./server
./client

2) Open the console by pressing the ` key.
3) Type rcon_password 1
4) Close the console (`) and then open the build menu (tab) and place a building
5) Go back to the console and type: sv_save 1
6) exit the game (Esc) and then look at the output in the terminal the server is running from.

Right now I am getting the error message: I/O Error when attempting the save however the users in the SQLite channel assure me that it's my computer rather then my code. Any helpers?
Hardwar - An open source flight sim shooter on the moon titan.
User avatar
Andrew
 
Posts: 38
Joined: 07 Dec 2009, 08:10
Location: Thailand

Re: Problem using SQLite

Postby qubodup » 10 Feb 2010, 12:31

Well, all I get is a segfault:

{l Code}: {l Select All Code}
Parsing script diffuse.material

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6355add in std::string::assign(std::string const&) () from /usr/lib/libstdc++.so.6
(gdb) bt
#0  0x00007ffff6355add in std::string::assign(std::string const&) () from /usr/lib/libstdc++.so.6
#1  0x00007ffff75ddcfc in Ogre::GpuProgramTranslator::translateHighLevelGpuProgram(Ogre::ScriptCompiler*, Ogre::ObjectAbstractNode*) () from /usr/lib/libOgreMain-1.6.4.so
#2  0x00007ffff75e24ee in Ogre::GpuProgramTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtr<Ogre::AbstractNode> const&) () from /usr/lib/libOgreMain-1.6.4.so
#3  0x00007ffff75c0897 in Ogre::ScriptCompiler::compile(Ogre::SharedPtr<std::list<Ogre::SharedPtr<Ogre::ConcreteNode>, std::allocator<Ogre::SharedPtr<Ogre::ConcreteNode> > > > const&, std::string const&) () from /usr/lib/libOgreMain-1.6.4.so
#4  0x00007ffff75c0a07 in Ogre::ScriptCompiler::compile(std::string const&, std::string const&, std::string const&) ()
   from /usr/lib/libOgreMain-1.6.4.so
#5  0x00007ffff75c0b08 in Ogre::ScriptCompilerManager::parseScript(Ogre::SharedPtr<Ogre::DataStream>&, std::string const&)
    () from /usr/lib/libOgreMain-1.6.4.so
#6  0x00007ffff7573e08 in Ogre::ResourceGroupManager::parseResourceGroupScripts(Ogre::ResourceGroupManager::ResourceGroup*) () from /usr/lib/libOgreMain-1.6.4.so
#7  0x00007ffff75743aa in Ogre::ResourceGroupManager::initialiseAllResourceGroups() () from /usr/lib/libOgreMain-1.6.4.so
#8  0x0000000000445141 in Client::GameManager::configureGame (this=<value optimized out>)
    at /home/qubodup/src/bazaar/hardwar/code/client/core/src/GameManager.cpp:214
#9  0x0000000000445347 in Client::GameManager::startGame (this=0x6fa730, gameState=0x6faa80)
    at /home/qubodup/src/bazaar/hardwar/code/client/core/src/GameManager.cpp:115
#10 0x000000000044ef64 in main (argc=<value optimized out>, argv=<value optimized out>)
    at /home/qubodup/src/bazaar/hardwar/code/client/core/src/main.cpp:63
(gdb) quit
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Problem using SQLite

Postby qubodup » 12 Feb 2010, 05:15

I was just told that this error is the same I'm having with DungeonHack, so my report is invalid, as I seem to have problems with my system.
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Problem using SQLite

Postby Archwyrm » 12 Feb 2010, 06:19

I followed your instructions and am getting the same error.

Server output:
{l Code}: {l Select All Code}
Starting server
Port:26500
Loaded buildings
Server running..
Thread: Client - 0 - started
c4ca4238a0b923820dcc509a6f75849b
Zone: New Building - Position: 40786 408 -28876 - Rotation: 0 0 0 - Mesh: hanger_0602.mesh
SQLite Error: disk I/O error
SQLite Error: disk I/O error
Saved buildings:1

Hardwar r171

Using Arch Linux:
sqlite3 3.6.22-1
ogre 1.6.4-6
boost 1.41.0-2

I'll be happy to help further. Ping me in Freenode if necessary (I'm on GMT-7 though).
DungeonHack -- FOSS RPG focusing on large, open-ended worlds and dynamic gameplay.
Archwyrm
 
Posts: 6
Joined: 12 Feb 2010, 05:25

Re: Problem using SQLite

Postby Andrew » 15 Feb 2010, 03:55

qubodup {l Wrote}:I was just told that this error is the same I'm having with DungeonHack, so my report is invalid, as I seem to have problems with my system.


Based on the error message it could be because you don't have the cg plugin for ogre installed?
Hardwar - An open source flight sim shooter on the moon titan.
User avatar
Andrew
 
Posts: 38
Joined: 07 Dec 2009, 08:10
Location: Thailand

Re: Problem using SQLite

Postby qubodup » 16 Feb 2010, 20:07

Andrew {l Wrote}:Based on the error message it could be because you don't have the cg plugin for ogre installed?

It was probably a too old version or something like that, yes. :)

I will test hardwar again as soon as I find the time.
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Problem using SQLite

Postby Andrew » 25 Feb 2010, 18:47

Just to give everyone a heads up. I figured out the problem and saving / loading is working great in the game. :)
Hardwar - An open source flight sim shooter on the moon titan.
User avatar
Andrew
 
Posts: 38
Joined: 07 Dec 2009, 08:10
Location: Thailand

Re: Problem using SQLite

Postby charlie » 26 Feb 2010, 12:45

...and what was the problem!? ;)
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2131
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Problem using SQLite

Postby Andrew » 27 Feb 2010, 14:10

It was because I used sqlite3_open_v2 with the flag SQLITE_OPEN_NOMUTEX instead of the flags SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE
Hardwar - An open source flight sim shooter on the moon titan.
User avatar
Andrew
 
Posts: 38
Joined: 07 Dec 2009, 08:10
Location: Thailand

Who is online

Users browsing this forum: No registered users and 1 guest