Spring is running in SMP - Page 17

Spring is running in SMP

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
[oxnull]Lupus
Posts: 101
Joined: 12 May 2009, 14:52

Re: Spring is running in SMP

Post by [oxnull]Lupus »

Infolog from DSD(3 attachments max)
Attachments
infolog.txt
(29.75 KiB) Downloaded 23 times
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Spring is running in SMP

Post by imbaczek »

it's a bug in the spring sim engine, so it crashes for everybody, MT or not. fixed already.
[oxnull]Lupus
Posts: 101
Joined: 12 May 2009, 14:52

Re: Spring is running in SMP

Post by [oxnull]Lupus »

So, i disabled ALL the widgets and tried with a fresh USE_GML only build of 0.79 branch. Hanged on "Finalizing..." after third launch from lobby with

Code: Select all

Game has ended
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
infolog and backtrace are attached.
Attachments
infolog.txt
(12.54 KiB) Downloaded 12 times
backtrace.txt
(4.29 KiB) Downloaded 19 times
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Spring is running in SMP

Post by Tobi »

This seems awfully similar to the issue det and Bashar have on 64 bit Linux with non-GML build of Spring.

(Infinite resource allocation because some signed negative number is interpreted as unsigned amount of vertices to allocate, in CBFGroundDrawer. I'll put the notes about it in mantis ASAP.)

EDIT: added to mantis, http://springrts.com/mantis/view.php?id=1415
[oxnull]Lupus
Posts: 101
Joined: 12 May 2009, 14:52

Re: Spring is running in SMP

Post by [oxnull]Lupus »

Cought some crashes. I switched to mantis for crash reporting, so zerver, look for them there ;)
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Bugfixed version:
http://planetspring.free.fr/spring/exec ... 430928.zip

Bugfixed version with debug:
http://planetspring.free.fr/spring/exec ... 430928.zip

Debug is slower, but should help you detect bad widgets without crashing or hanging.
Look for "GML error" in the infolog and disable widgets accordingly.

I have confirmed that these widgets are bad: LUPS manager, FPS manager.

Edit: Updated links due to another bugfix
[oxnull]Lupus
Posts: 101
Joined: 12 May 2009, 14:52

Re: Spring is running in SMP

Post by [oxnull]Lupus »

zerver wrote: Edit: Updated links due to another bugfix
omg, just compiled previous version :)
GJ zerver
Societal
Posts: 64
Joined: 05 May 2009, 13:57

Re: Spring is running in SMP

Post by Societal »

I can't get a stable USE_GML build for Windows XP Pro 32bit. With USE_GML from the github master it crashes immediately on startup.

Code: Select all

(gdb) run
Starting program: F:\SpringDebug/spring.exe
[New thread 2940.0x17c0]
[New thread 2940.0xbdc]

Program received signal SIGSEGV, Segmentation fault.
0x00000001 in ?? ()
(gdb) thread apply all backtrace full

Thread 2 (thread 2940.0xbdc):
#0  0x7c90e514 in ntdll!LdrAccessResource ()
   from C:\WINDOWS\system32\ntdll.dll
No symbol table info available.
#1  0x7c90df4a in ntdll!ZwWaitForMultipleObjects ()
   from C:\WINDOWS\system32\ntdll.dll
No symbol table info available.
#2  0x76b5aee9 in timeGetTime () from C:\WINDOWS\system32\winmm.dll
No symbol table info available.
#3  0x7c80b729 in KERNEL32!GetModuleFileNameA ()
   from C:\WINDOWS\system32\kernel32.dll
No symbol table info available.
#4  0x00000000 in ?? ()
No symbol table info available.

Thread 1 (thread 2940.0x17c0):
#0  0x00000001 in ?? ()
No symbol table info available.
#1  0x0022d8a0 in ?? ()
No symbol table info available.
#2  0x0b57abad in ?? ()
No symbol table info available.
#3  0x7c81cbfe in TerminateThread () from C:\WINDOWS\system32\kernel32.dll
No symbol table info available.
#4  0x009b3b30 in glEdgeFlagPointer@8 ()
No symbol table info available.
#5  0x00000000 in ?? ()
No symbol table info available.
USE_GML_SIM compiles and runs but it has some problems (ignores fullscreen=1 no matter what I try).
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

USE_GML_SIM must be combined with USE_GML to have any effect.

Ignoring fullscreen could indicate that it is a debug build.

Which mod are you playing?
eyu100
Posts: 182
Joined: 05 Jul 2008, 04:10

Re: Spring is running in SMP

Post by eyu100 »

Spring crashes (access violation) immediately on startup.
Attachments
infolog.txt
(4.39 KiB) Downloaded 18 times
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Societal
Posts: 64
Joined: 05 May 2009, 13:57

Re: Spring is running in SMP

Post by Societal »

zerver wrote:USE_GML_SIM must be combined with USE_GML to have any effect.

Ignoring fullscreen could indicate that it is a debug build.

Which mod are you playing?
It was a debug build and I was using BA. I couldn't get both USE_GML and USE_GML_SIM to compile because of the declarations being in twice?:

Code: Select all

Scanning dependencies of target gml
[ 14%] Building CXX object rts/lib/CMakeFiles/gml.dir/gml/gml.cpp.obj
In file included from E:\Data\SpringGit\spring\rts/Rendering/GL/myGL.h:11,
                 from E:\Data\SpringGit\spring\rts/Sim/Projectiles/Projectile.h:
3,
                 from E:\Data\SpringGit\spring\rts/Sim/Projectiles/FireProjectil
e.h:4,
                 from E:\Data\SpringGit\spring\rts\lib\gml\gml.cpp:1094:
E:\Data\SpringGit\spring\rts/lib/gml/gml.h:32: error: conflicting declaration 'g
mlSingleItemServer<unsigned int, GLhandleARB (*)()> gmlProgramServer'
E:\Data\SpringGit\spring\rts\lib\gml\gml.cpp:172: error: 'gmlProgramServer' has
a previous declaration as 'gmlSingleItemServer<unsigned int, GLuint (**)()> gmlP
rogramServer'
E:\Data\SpringGit\spring\rts/lib/gml/gml.h:33: error: conflicting declaration 'g
mlSingleItemServer<unsigned int, GLhandleARB (*)()> gmlProgramObjectARBServer'
E:\Data\SpringGit\spring\rts\lib\gml\gml.cpp:173: error: 'gmlProgramObjectARBSer
ver' has a previous declaration as 'gmlSingleItemServer<unsigned int, GLuint (**
)()> gmlProgramObjectARBServer'
E:\Data\SpringGit\spring\rts/lib/gml/gml.h:35: error: conflicting declaration 'g
mlSingleItemServer<GLUquadric*, GLUquadric* (*)()> gmlQuadricServer'
. . . and so on
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Spring is running in SMP

Post by imbaczek »

gcc bug, upgrade
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Spring is running in SMP

Post by Auswaschbar »

imbaczek wrote:gcc bug, upgrade
To what? I thought 4.4.0 is newest?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Spring is running in SMP

Post by imbaczek »

i've had errors like this in gcc 4.3.0 but not 4.3.2+.
Societal
Posts: 64
Joined: 05 May 2009, 13:57

Re: Spring is running in SMP

Post by Societal »

I'm using the 4.4.0 TDM package.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Spring is running in SMP

Post by imbaczek »

would take a look but my isp failed thursday and still haven't fixed whatever broke :/
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Spring is running in SMP

Post by zerver »

Try replacing the section "Item server instances" on line 172 in gml.cpp with this:

Code: Select all

gmlSingleItemServer<GLhandleARB, GLhandleARB (*)(void)> gmlProgramServer(&glCreateProgram, 2, 0);
gmlSingleItemServer<GLhandleARB, GLhandleARB (*)(void)> gmlProgramObjectARBServer(&glCreateProgramObjectARB, 2, 0);

gmlSingleItemServer<GLhandleARB, GLhandleARB (*)(void)> gmlShaderServer_VERTEX(&glCreateShader_VERTEX, 2, 0);
gmlSingleItemServer<GLhandleARB, GLhandleARB (*)(void)> gmlShaderServer_FRAGMENT(&glCreateShader_FRAGMENT, 2, 0);
gmlSingleItemServer<GLhandleARB, GLhandleARB (*)(void)> gmlShaderServer_GEOMETRY_EXT(&glCreateShader_GEOMETRY_EXT, 2, 0);

gmlSingleItemServer<GLhandleARB, GLhandleARB (*)(void)> gmlShaderObjectARBServer_VERTEX(&glCreateShaderObjectARB_VERTEX, 2, 0);
gmlSingleItemServer<GLhandleARB, GLhandleARB (*)(void)> gmlShaderObjectARBServer_FRAGMENT(&glCreateShaderObjectARB_FRAGMENT, 2, 0);
gmlSingleItemServer<GLhandleARB, GLhandleARB (*)(void)> gmlShaderObjectARBServer_GEOMETRY_EXT(&glCreateShaderObjectARB_GEOMETRY_EXT, 2, 0);
gmlSingleItemServer<GLUquadric *, GLUquadric *(*)(void)> gmlQuadricServer(&gluNewQuadric, 100, 25);

gmlMultiItemServer<GLuint, GLsizei, void (*)(GLsizei,GLuint *)> gmlTextureServer(&glGenTextures, 100, 25);
gmlMultiItemServer<GLuint, GLsizei, void (*)(GLsizei, GLuint*)> gmlBufferARBServer(&glGenBuffersARB, 2, 0);
gmlMultiItemServer<GLuint, GLsizei, void (*)(GLsizei, GLuint*)> gmlFencesNVServer(&glGenFencesNV, 2, 0);
gmlMultiItemServer<GLuint, GLsizei, void (*)(GLsizei, GLuint*)> gmlProgramsARBServer(&glGenProgramsARB, 2, 0);
gmlMultiItemServer<GLuint, GLsizei, void (*)(GLsizei, GLuint*)> gmlRenderbuffersEXTServer(&glGenRenderbuffersEXT, 2, 0);
gmlMultiItemServer<GLuint, GLsizei, void (*)(GLsizei, GLuint*)> gmlFramebuffersEXTServer(&glGenFramebuffersEXT, 2, 0);
gmlMultiItemServer<GLuint, GLsizei, void (*)(GLsizei, GLuint*)> gmlQueryServer(&glGenQueries, 20, 5);
gmlMultiItemServer<GLuint, GLsizei, void (*)(GLsizei, GLuint*)> gmlBufferServer(&glGenBuffers, 2, 0);
eyu100
Posts: 182
Joined: 05 Jul 2008, 04:10

Re: Spring is running in SMP

Post by eyu100 »

Is it possible to make the LOS calculations multithreaded (I don't know enough about the engine to know how it is done)?
Post Reply

Return to “Engine”