[ts-gen] segfault
gene livingston
gene_livingston at yahoo.com
Wed Mar 31 13:43:55 EDT 2010
Introduction:
Hi, I've just joined the list, and am looking into using your Trading Shim. Your tastes seem to match closely with mine (Linux & C++) so I am very happy to have found this project. I am hoping to use the shim for 1) gathering historical data, mostly futures 2) gathering end of day data 3) trading history,open trades, portfolio mgmt. Not doing much intra-day. Will be using this data to write risk management software in C++ for Linux for my use (Van K Tharp's "Guide to Position Sizing", and Grant's "Trading Risk" are my main references for this project).
Issue:
I am receiving a segfault when running the shim with the --data option. I have run the install script in /sql and TWS is running(using the paper account, API socket clients enabled for localhost), and have verified that the username works using MySQL query browser. I have tested the TWS API connection using the Java sample app. Thank you very much in advance for any assistance.
I did receive several warnings during compilation, no errors, and a binary was built. My specs are:
Ubuntu 9.10(Karmic)/x86
g++ 4.4.1
ruby 1.8.7
Sun Java 6
MySQL Server 5.1.37
**I will admit to having one known wrong configuration, but that's related to mysql, so I doubt that would generate a segfault. In 'my.cnf' I did not set "transaction-isolation = SERIALIZABLE" yet as I am having trouble getting mysql to recognize that option. Will have a look at the .diff to see what I'm doing wrong there.
output of "make shim":
genel at lopburi:~/Downloads/shim/shim-100330$ make shim
g++ -Wall -g -I/usr/include/mysql -c -o obj/main.o src/main.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/root.o src/root.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/once.o src/once.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/self.o src/self.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/mode.o src/mode.c
src/mode.c: In member function ‘virtual void TShimInterpreter::DomainSingletons::Risk::check_api(const TShimInterpreter::LanguageConstant::Exceptions&, MultipleParadigm::nat, bool) const’:
src/mode.c:241: warning: format not a string literal and no format arguments
g++ -Wall -g -I/usr/include/mysql -c -o obj/help.o src/help.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/data.o src/data.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/tags.o src/tags.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/lets.o src/lets.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/fsms.o src/fsms.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/type.o src/type.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/sets.o src/sets.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/rule.o src/rule.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/apis.o src/apis.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/cusp.o src/cusp.c
src/cusp.c: In constructor ‘TShimInterpreter::LanguageConstant::NatValue::NatValue(const TShimInterpreter::AppFiniteDomains::ParmName&, const char*, MultipleParadigm::nat)’:
src/cusp.c:214: warning: format ‘%lu’ expects type ‘long unsigned int*’, but argument 3 has type ‘MultipleParadigm::nat*’
g++ -Wall -g -I/usr/include/mysql -c -o obj/vars.o src/vars.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/freq.o src/freq.c
src/freq.c: In member function ‘MultipleParadigm::Long TShimInterpreter::DomainSingletons::TscClock::cpu_info() const’:
src/freq.c:183: warning: format not a string literal and no format arguments
src/freq.c: In member function ‘MultipleParadigm::Long TShimInterpreter::DomainSingletons::TscClock::cpuinfo_hertz() const’:
src/freq.c:202: warning: format not a string literal and no format arguments
g++ -Wall -g -I/usr/include/mysql -c -o obj/bind.o src/bind.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/init.o src/init.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/dbms.o src/dbms.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/open.o src/open.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/late.o src/late.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/file.o src/file.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/fail.o src/fail.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/talk.o src/talk.c
src/talk.c: In member function ‘const TShimInterpreter::TuplesAttributes::Natural* TShimInterpreter::DomainSingletons::IoBase::talk(const TShimInterpreter::EnvironmentValue::CuspEnv&, const TShimInterpreter::LanguageConstant::VersionTuple&, const TShimInterpreter::TuplesAttributes::Compound&, const TShimInterpreter::TuplesAttributes::Natural&, const TShimInterpreter::TuplesAttributes::MessageAtoms::NextId&) const’:
src/talk.c:111: warning: format not a string literal and no format arguments
g++ -Wall -g -I/usr/include/mysql -c -o obj/null.o src/null.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/shim.o src/shim.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/fill.o src/fill.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/wait.o src/wait.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/read.o src/read.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/ctor.o src/ctor.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/proc.o src/proc.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/nque.o src/nque.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/send.o src/send.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/time.o src/time.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/tick.o src/tick.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/wire.o src/wire.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/post.o src/post.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/past.o src/past.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/echo.o src/echo.c
src/echo.c: In member function ‘void TShimInterpreter::DomainSingletons::Logger::log(const MultipleParadigm::ArraysVectorsAndTables::Buffer&, MultipleParadigm::nat) const’:
src/echo.c:68: warning: format not a string literal and no format arguments
g++ -Wall -g -I/usr/include/mysql -c -o obj/form.o src/form.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/term.o src/term.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/acts.o src/acts.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/name.o src/name.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/leaf.o src/leaf.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/base.o src/base.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/envs.o src/envs.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/else.o src/else.c
src/else.c: In member function ‘const TShimInterpreter::AppFiniteDomains::Permanent& TShimInterpreter::DomainSingletons::AutoEnum::mysql_connection_failure() const’:
src/else.c:256: warning: format not a string literal and no format arguments
src/else.c: In member function ‘const TShimInterpreter::AppFiniteDomains::Permanent& TShimInterpreter::DatabaseRelation::SdbVersion::shim_and_db_ver_mismatch(const TShimInterpreter::EnvironmentValue::BaseEnv&) const’:
src/else.c:390: warning: format not a string literal and no format arguments
src/else.c: In member function ‘double TShimInterpreter::TuplesAttributes::CommandAtoms::Wait::arg_term_typecheck_error(const TShimInterpreter::LanguageConstant::Exceptions&) const’:
src/else.c:484: warning: format not a string literal and no format arguments
src/else.c: In member function ‘void TShimInterpreter::EnvironmentValue::Cursor::mismatch(const TShimInterpreter::LanguageConstant::Compound&, bool, bool) const’:
src/else.c:675: warning: format not a string literal and no format arguments
src/else.c:676: warning: format not a string literal and no format arguments
g++ -Wall -g -I/usr/include/mysql -c -o obj/scan.o lib/scan.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/hash.o lib/hash.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/text.o lib/text.c
lib/text.c: In member function ‘const MultipleParadigm::ArraysVectorsAndTables::Buffer& MultipleParadigm::ArraysVectorsAndTables::Buffer::format(const char*, MultipleParadigm::nat, char*, MultipleParadigm::nat) const’:
lib/text.c:21: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘MultipleParadigm::nat’
lib/text.c:21: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘MultipleParadigm::nat’
g++ -Wall -g -I/usr/include/mysql -c -o obj/wrap.o lib/wrap.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/pool.o lib/pool.c
lib/pool.c: In member function ‘void* MultipleParadigm::HashAndTreeMaps::BinsPool::alloc(MultipleParadigm::nat) const’:
lib/pool.c:409: warning: format ‘%6lu’ expects type ‘long unsigned int’, but argument 3 has type ‘MultipleParadigm::nat’
lib/pool.c:409: warning: format ‘%2lu’ expects type ‘long unsigned int’, but argument 4 has type ‘unsigned int’
lib/pool.c:409: warning: format ‘%6lu’ expects type ‘long unsigned int’, but argument 5 has type ‘MultipleParadigm::nat’
g++ -Wall -g -I/usr/include/mysql -c -o obj/buds.o lib/buds.c
lib/buds.c: In member function ‘const char* MultipleParadigm::SimpleEfficientAllocator::Map::memory_map_failure() const’:
lib/buds.c:446: warning: format not a string literal and no format arguments
g++ -Wall -g -I/usr/include/mysql -c -o obj/inet.o lib/inet.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/boot.o lib/boot.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/math.o lib/math.c
g++ -Wall -g -I/usr/include/mysql -c -o obj/dfsa.o lib/dfsa.c
(cd obj; g++ -g -o ../shim main.o root.o once.o self.o mode.o help.o data.o tags.o lets.o fsms.o type.o sets.o rule.o apis.o cusp.o vars.o freq.o bind.o init.o dbms.o open.o late.o file.o fail.o talk.o null.o shim.o fill.o wait.o read.o ctor.o proc.o nque.o send.o time.o tick.o wire.o post.o past.o echo.o form.o term.o acts.o name.o leaf.o base.o envs.o else.o scan.o hash.o text.o wrap.o pool.o buds.o inet.o boot.o math.o dfsa.o -L/usr/lib/mysql -lmysqlclient -lm)
genel at lopburi:~/Downloads/shim/shim-100330$
genel at lopburi:~/Downloads/shim/shim-100330$ ./shim
Usage: shim <mode> [optional feature list]
Modes:
# real modes, requiring access to an IB tws:
--data # process subscriptions and log resulting tick stream events
--risk # accept full command set, send requests, and log all events
genel at lopburi:~/Downloads/shim/shim-100330$ ./shim --data
Segmentation fault
genel at lopburi:~/Downloads/shim/shim-100330$
More information about the ts-general
mailing list