View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0001624 | Spring engine | General | public | 2009-09-05 08:44 | 2009-10-03 10:46 | ||||
Reporter | hughperkins | ||||||||
Assigned To | zerver | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | 0.81.0.0 | Fixed in Version | 0.80.4.0+git | ||||||
Summary | 0001624: Drawing 8000 lines, then viewing them causes Spring to segfault | ||||||||
Description | Drawing 8000 lines, then viewing them causes Spring to segfault. Environment: - using Java Interface v0.1 - unclear whether it's a Spring issue or a Java interface issue - I didn't have this issue with the C# AI, so either something has changed in Spring, or it could be a Java Interface issue? To reproduce, in a Java AI do: Ok, the easiest thing: install HughAI from this patch http://springrts.com/mantis/view.php?id=1623 In hughai.test.Tester.java, get uncomment drawlineTests3 in: void drawlineTests() { drawlineTests3(); // drawlineTests2(); // drawmapTests1(); // drawmapTests2(); } ... then launch the AI in spring, and click on the "Run drawline tests" button. => when you look at the top left of the map after doing this, Spring will segfault. It looks like there is a buffer overflow, either in Spring, or in the Java interface v0.1 | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|||||||||||||
|
![]() |
|
hughperkins (reporter) 2009-09-05 08:47 |
(tested in Spring 0.80.02) |
hughperkins (reporter) 2009-09-05 09:36 Last edited: 2009-09-05 09:38 |
Or, alternative way to reproduce: In a Java AI, add something like hte following code: for( int i = 0; i < 8193; i++ ) { handleEngineCommand( new AddLineDrawAICommand( new AIFloat3( 100, 100, 100 ), new AIFloat3( 200, 100, 100 ) ) ); } ... then run, and look at the top left corner of the map, where the lines were drawn. => Spring will segfault. |
SirMaverick (reporter) 2009-09-11 21:49 Last edited: 2009-09-11 21:50 |
Can trigger a crash with Spring.MarkerAddLine too: for i=1,20000 do Spring.MarkerAddLine(100, 100, 100, 200, 100, 100) end -------------- spring: /home/spring/spring/spring/spring_0.80.4.1-debug/rts/Rendering/GL/VertexArray.inl:36: void CVertexArray::AddVertexQC(const float3&, const unsigned char*): Assertion `drawArraySize>=drawArrayPos+ 4' failed. Program received signal SIGABRT, Aborted. 0xb7fe1430 in __kernel_vsyscall () (gdb) bt #0 0xb7fe1430 in __kernel_vsyscall () #1 0xb759e3d0 in raise () from /lib/i686/cmov/libc.so.6 #2 0xb75a1a85 in abort () from /lib/i686/cmov/libc.so.6 0000003 0xb75974ee in __assert_fail () from /lib/i686/cmov/libc.so.6 0000004 0x085cc7f7 in CVertexArray::AddVertexQC (this=0x9cb4818, pos=..., color=0x9fbcaac "\277\277\277\377") at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/Rendering/GL/VertexArray.inl:36 0000005 0x085c9994 in InMapDraw_QuadDrawer::DrawQuad (this=0xbfffe984, x=0, y=0) at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/Rendering/InMapDraw.cpp:313 #6 0x08590b31 in CSmfReadMap::GridVisibility (this=0xa5c54e8, cam=0x9fc22c8, quadSize=32, maxdist=3000, qd=0xbfffe984, extraSize=0) at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/Map/SMF/SmfReadMap.cpp:361 #7 0x085c88f6 in CInMapDraw::Draw (this=0xa950c68) at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/Rendering/InMapDraw.cpp:340 #8 0x0831d10e in CGame::DrawWorld (this=0x9fc9980) at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/Game/Game.cpp:2862 #9 0x0831dfe6 in CGame::Draw (this=0x9fc9980) at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/Game/Game.cpp:3088 0000010 0x088a0d6b in SpringApp::Update (this=0xbffff000) at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/System/SpringApp.cpp:877 #11 0x088a8f12 in SpringApp::Run (this=0xbffff000, argc=2, argv=0xbffff0e4) at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/System/SpringApp.cpp:964 0000012 0x088d625d in Run (argc=2, argv=0xbffff0e4) at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/System/Main.cpp:111 0000013 0x088d62b8 in main (argc=Cannot access memory at address 0x31c5) at /home/spring/spring/spring/spring_0.80.4.1-debug/rts/System/Main.cpp:127 |
zerver (reporter) 2009-09-12 12:39 |
Already fixed, but need another version bump to get the new changes released. http://springrts.com/mantis/view.php?id=1632 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2009-09-05 08:44 | hughperkins | New Issue | |
2009-09-05 08:47 | hughperkins | Note Added: 0004066 | |
2009-09-05 09:36 | hughperkins | Note Added: 0004067 | |
2009-09-05 09:38 | hughperkins | Note Edited: 0004067 | |
2009-09-11 13:40 | hoijui | Relationship added | related to 0001634 |
2009-09-11 21:49 | SirMaverick | Note Added: 0004109 | |
2009-09-11 21:49 | SirMaverick | Note Edited: 0004109 | |
2009-09-11 21:50 | SirMaverick | Note Edited: 0004109 | |
2009-09-11 23:17 | hoijui | Project | AI => Spring engine |
2009-09-12 12:39 | zerver | Note Added: 0004111 | |
2009-09-12 12:39 | zerver | Relationship added | duplicate of 0001632 |
2009-09-12 12:39 | zerver | Duplicate ID | 0 => 1632 |
2009-09-12 12:39 | zerver | Status | new => resolved |
2009-09-12 12:39 | zerver | Fixed in Version | => 0.80.4.0+git |
2009-09-12 12:39 | zerver | Resolution | open => fixed |
2009-09-12 12:39 | zerver | Assigned To | => zerver |
2009-10-03 10:46 | imbaczek | Target Version | => 0.81.0.0 |