Skip to content

Instantly share code, notes, and snippets.

@donSchoe
donSchoe / gist:8267693
Created January 5, 2014 12:36
protoshares coincontrol make stack
$ make
Making all in src
make[1]: Entering directory `/home/afri/opt/Proto-coincontrol/src'
make all-recursive
make[2]: Entering directory `/home/afri/opt/Proto-coincontrol/src'
Making all in .
make[3]: Entering directory `/home/afri/opt/Proto-coincontrol/src'
CXX addrman.o
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
addrman.cpp:1:0: note: this is the location of the previous definition
@donSchoe
donSchoe / ringo.strace
Created October 19, 2013 04:39
--> ERROR :Closing link:
31458 0.009987 gettimeofday({1382146110, 430027}, NULL) = 0 <0.000015>
31458 0.000077 futex(0x7f6b1ce489c0, FUTEX_WAKE_PRIVATE, 1) = 0 <0.000014>
31458 0.000070 futex(0x7f6b1ce48a04, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 131854369, {1382146110, 440027000}, ffffffff <unfinished ...>
31457 0.005613 <... select resumed> ) = 0 (Timeout) <0.100164>
31457 0.000119 clock_gettime(CLOCK_REALTIME, {1382146110, 435917146}) = 0 <0.000028>
31457 0.000129 select(4, [3], NULL, NULL, {0, 100000} <unfinished ...>
31458 0.004103 <... futex resumed> ) = -1 ETIMEDOUT (Connection timed out) <0.009934>
31458 0.000097 gettimeofday({1382146110, 440242}, NULL) = 0 <0.000029>
31458 0.000109 futex(0x7f6b1ce489c0, FUTEX_WAKE_PRIVATE, 1) = 0 <0.000027>
31458 0.000098 futex(0x7f6b1ce48a04, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 131854371, {1382146110, 450242000}, ffffffff) = -1 ETIMEDOUT (Connection timed out) <0.009868>
@donSchoe
donSchoe / ringo.strace.log
Created October 19, 2013 04:36
UNKNOWN PROTOCOL PART: ERROR :Closing link:
--> PING :folly.JxcelDolghmQ.net
<-- PONG :folly.JxcelDolghmQ.net
--> PING :folly.JxcelDolghmQ.net
<-- PONG :folly.JxcelDolghmQ.net
<-- PING :1382144069.0660088
--> :folly.JxcelDolghmQ.net PONG folly.JxcelDolghmQ.net :1382144069.0660088
--> PING :folly.JxcelDolghmQ.net
<-- PONG :folly.JxcelDolghmQ.net
--> PING :folly.JxcelDolghmQ.net
<-- PONG :folly.JxcelDolghmQ.net
@donSchoe
donSchoe / SIGSEGV
Created August 18, 2013 20:25
SIGSEGV after pressing space bar, military aid?
Program received signal SIGSEGV, Segmentation fault.
GameWorldView::Draw (this=<optimized out>, player=<optimized out>, water=<optimized out>, draw_selected=false, selected_x=0, selected_y=0, rb=...) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/GameWorldView.cpp:169
169 /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/GameWorldView.cpp: No such file or directory.
(gdb) bt
#0 GameWorldView::Draw (this=<optimized out>, player=<optimized out>, water=<optimized out>, draw_selected=false, selected_x=0, selected_y=0, rb=...) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/GameWorldView.cpp:169
#1 0x0000000000608c39 in Draw (rb=..., selected_y=<optimized out>, selected_x=<optimized out>, draw_selected=<optimized out>, water=0x7fffffffd1c0, player=<optimized out>, this=<optimized out>) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/GameWorld.h:600
#2 Run (this=0xe2ceda0) at /srv/jenkins/jobs/
@donSchoe
donSchoe / gist:5994258
Created July 14, 2013 13:23
Ware.cpp:171
Program received signal SIGSEGV, Segmentation fault.
Ware::GoalDestroyed (this=0x7e20460) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/Ware.cpp:171
171 /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/Ware.cpp: No such file or directory.
(gdb) bt
#0 Ware::GoalDestroyed (this=0x7e20460) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/Ware.cpp:171
#1 0x000000000085e81c in nobUsual::Destroy_nobUsual (this=0x8847a60) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/nobUsual.cpp:140
#2 0x00000000007706ac in GameWorldGame::DestroyPlayerRests (this=0x7b40018, x=216, y=119, new_player=1 '\001', exception=0x8854780) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/GameWorldGame.cpp:881
#3 0x00000000007741a7 in GameWorldGame::RecalcTerritory (this=0x7b40018, building=0x8854780, radius=<optimized out>, destroyed=false, newBuilt=<optimized out>) at /srv/jenkins/jobs/s
Program received signal SIGSEGV, Segmentation fault.
0x00000000007b8da3 in SerializedGameData::PushObject (this=0x7fffffffd0c0, go=0x1ddcee00, known=<optimized out>) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/SerializedGameData.cpp:267
267 /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/SerializedGameData.cpp: No such file or directory.
(gdb) bt
#0 0x00000000007b8da3 in SerializedGameData::PushObject (this=0x7fffffffd0c0, go=0x1ddcee00, known=<optimized out>) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/SerializedGameData.cpp:267
#1 0x000000000085ee21 in PushObjectList<Ware> (known=true, gos=..., this=0x7fffffffd0c0) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/SerializedGameData.h:88
#2 nobUsual::Serialize_nobUsual (this=0xb13bc20, sgd=0x7fffffffd0c0) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/nobUsual.cpp:180
#3 0x00000000007b8da6 in Seri
@donSchoe
donSchoe / gist:5841437
Created June 22, 2013 16:14
reproduced at GF 119999
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00000000007b8da6 in SerializedGameData::PushObject (this=0x7fffffffd0c0, go=0x8d2d9e0, known=<optimized out>) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/SerializedGameData.cpp:267
#2 0x000000000085ee21 in PushObjectList<Ware> (known=true, gos=..., this=0x7fffffffd0c0) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/SerializedGameData.h:88
#3 nobUsual::Serialize_nobUsual (this=0x9396600, sgd=0x7fffffffd0c0) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/nobUsual.cpp:180
#4 0x00000000007b8da6 in SerializedGameData::PushObject (this=0x7fffffffd0c0, go=0x9396600, known=<optimized out>) at /srv/jenkins/jobs/s25rttr/workspace/ARCH/x86_64/PLATFORM/linux/label/ma/src/SerializedGameData.cpp:267
#5 0x00000000007d3698 in Ware::Serialize_Ware (this=0xb2b5970, sgd=0x7fffffffd0c0) at /srv/jenkins
@donSchoe
donSchoe / dither_2.cpp
Created May 10, 2013 17:05
wo is der fehler?
/* dither() */
float p11 = image[w * y + x];
float sw11 = 1.f;
if(p11 < 0.5) sw11 = 0.f;
float qe = p11 - sw11;
image[ w * y + x ] = sw11;
image[ w * y + _clamp(0, w, (x + 1))] += 7.f * qe / 16.f;
image[_clamp(0, h, (w * (y + 1))) + _clamp(0, w, (x - 1))] += 3.f * qe / 16.f; //@TODO: Not applied, why?
image[_clamp(0, h, (w * (y + 1))) + x ] += 5.f * qe / 16.f; //@TODO: Not applied, why?
@donSchoe
donSchoe / dither.cpp
Created May 9, 2013 18:00
wo ist der fehler?
// dither()
float p11 = image[w * y + x];
float sw11 = 1.f;
if(p11 < 0.5) sw11 = 0.f;
float qe = p11 - sw11;
float p12 = image[w * y + _clamp(0, w, (x + 1))];
float p20 = image[_clamp(0, h, (w * (y + 1))) + _clamp(0, w, (x - 1))];
float p21 = image[_clamp(0, h, (w * (y + 1))) + x];
float p22 = image[_clamp(0, h, (w * (y + 1))) + _clamp(0, w, (x + 1))];
@donSchoe
donSchoe / double-sobel.cpp
Created May 9, 2013 17:05
zweifach sobel
int w = image.width() - 1;
int h = image.height() - 1;
QColor c00(image.pixel(_clamp(0, w, x - 1), _clamp(0, h, y - 1)));
QColor c01(image.pixel(x, _clamp(0, h, y - 1)));
QColor c02(image.pixel(_clamp(0, w, x + 1), _clamp(0, h, y - 1)));
QColor c10(image.pixel(_clamp(0, w, x - 1), y));
QColor c11(image.pixel(x, y));
QColor c12(image.pixel(_clamp(0, w, x + 1), y));
QColor c20(image.pixel(_clamp(0, w, x - 1), _clamp(0, h, y + 1)));
QColor c21(image.pixel(x, _clamp(0, h, y + 1)));