Open cheese1 opened 6 years ago
What are the contents of alephone-marathon.sh
?
Does it start if you run it with?
alephone /path/to/marathon-1/
Are you able to building alephone yourself with debugging symbols and getting a backtrace with gdb?
contents of start-script:
set -e if [ ! -d $HOME/.alephone/gamefiles/Marathon ]; then /usr/share/autodl/AutoDL.py /usr/share/AlephOne/marathon.autodlrc RET=$?
# 2: download OK, user does not want to start game
if [ "$RET" = "0" -o "$RET" = "2" ]; then
cd $HOME/.alephone/gamefiles/
unzip -u Marathon-20180930-Data.zip
rm -rf Marathon-20180930-Data.zip
fi
if [ "$RET" != "0" ]; then
exit $RET
fi
fi exec /usr/bin/alephone $HOME/.alephone/gamefiles/Marathon
output from gdb:...warning: Loadable section ".note.gnu.property" outside of ELF segmentswarning: Loadable section ".note.gnu.property" outside of ELF segmentswarning: Loadable section ".note.gnu.property" outside of ELF segmentswarning: Loadable section ".note.gnu.property" outside of ELF segmentswarning: Loadable section ".note.gnu.property" outside of ELF segmentswarning: Loadable section ".note.gnu.property" outside of ELF segmentsAleph One Linux 2018-10-06 1.3b2 https://alephone.lhowon.org/ Original code by Bungie Software http://www.bungie.com/Additional work by Loren Petrich, Chris Pruett, Rhys Hill et al.TCP/IP networking by Woody ZenfellExpat XML library by James ClarkSDL port by Christian Bauer Christian.Bauer@uni-mainz.de This is free software with ABSOLUTELY NO WARRANTY.You are welcome to redistribute it under certain conditions.For details, see the file COPYING. Built with network play enabled. Built with Lua scripting enabled.warning: Loadable section ".note.gnu.property" outside of ELF segmentswarning: Loadable section ".note.gnu.property" outside of ELF segmentswarning: Loadable section ".note.gnu.property" outside of ELF segmentswarning: Loadable section ".note.gnu.property" outside of ELF segmentswarning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segmentswarning: Loadable section ".note.gnu.property" outside of ELF
segments[New Thread 0x7fffe48f5700 (LWP 8925)]warning: Loadable section
".note.gnu.property" outside of ELF segmentswarning: Loadable section
".note.gnu.property" outside of ELF segmentswarning: Loadable section
".note.gnu.property" outside of ELF segmentswarning: Loadable section
".note.gnu.property" outside of ELF segments[New Thread 0x7fffe4040700
(LWP 8926)][New Thread 0x7fffcff4f700 (LWP
8927)]/usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp,
_Alloc>::reference std::vector<_Tp,
_Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp =
unsigned int; _Alloc = std::allocator
On Mon, 2018-11-19 at 08:16 -0800, orbea wrote:
What are the contents of alephone-marathon.sh?
Are you able to building this yourself with debugging symbols and getting a backtrace with gdb?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c5 5493e4bb","name":"GitHub"},"entity":{"external_key":"github/Aleph- One-Marathon/alephone","title":"Aleph-One- Marathon/alephone","subtitle":"GitHub repository","main_image_url":" https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":" https://github.com/Aleph-One-Marathon/alephone"}},"updates":{"snippets":[{"icon":"PERSON","message":"@orbea in #125: What are the contents of
alephone-marathon.sh
?\r\n\r\nAre you able to building this yourself with debugging symbols and getting a backtrace with gdb?"}],"action":{"name":"View Issue","url":" https://github.com/Aleph-One-Marathon/alephone/issues/125#issuecomment-439949824 "}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": " https://github.com/Aleph-One-Marathon/alephone/issues/125#issuecomment-439949824 ", "url": " https://github.com/Aleph-One-Marathon/alephone/issues/125#issuecomment-439949824 ", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [Aleph-One-Marathon/alephone] crash after start (#125)", "sections": [ { "text": "", "activityTitle": "orbea", "activityImage": " https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@orbea", "facts": [] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"Aleph-One- Marathon/alephone\",\n\"issueId\": 125,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"Aleph-One-Marathon/alephone\",\n\"issueId\": 125\n}" }, { "targets": [ { "os": "default", "uri": " https://github.com/Aleph-One-Marathon/alephone/issues/125#issuecomment-439949824 " } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 412972495\n}" } ], "themeColor": "26292E" } ]
Can you please use code tags and newlines for the backtrace? That output is not readable.
If you need help with github markdown please see the Styling with Markdown is supported
link below the comments field.
gdb.txt attached the output from gdb as file. i could add debugsymbols for additional packages, if needed.
Thanks for the text file, that is more readable.
While I can't replicate this on my FC28 machine, the place where it's crashing creates a zero-length vector and then tries to access the first element of that vector. That's definitely not good. Several places in that function do the same thing, and other functions might also make this mistake.
I'll get a fix checked in soon, and then have you recompile from master to make sure nothing else is wrong. Thanks for the report and the work to get us the info we needed!
hi thanks for your patch attached is a new backtrace AFTER applying your patch. i try to start a new game, screen shows the image with "leonardo", turns black and stays black.
any more information needed?
I did manage to replicate the crashes on a machine here. I had to build using:
./configure CXXFLAGS="-D _GLIBCXX_ASSERTIONS"
I'll keep working on the fixes (I've been traveling and haven't had time lately), but in the meantime you might be able to stop crashing by building with:
./configure CXXFLAGS="-U _GLIBCXX_ASSERTIONS"
It's okay to disable these assertions because so far, none of the crash spots would lead to a problem during execution. The assertions fail because Aleph One asks for a pointer that's not safe to use, but Aleph One never uses the pointer it requested. The fixes are just moving checks to before Aleph One asks.
I just completed a short game with the code in current master, so hopefully you will get further too. It's impossible to tell whether all crash locations have been found, so please report any other crashes you see. Thank you!
Sorry to bump this up, but I wanted to ask a question concerning this here as I think my issue and the OP is related. I recently started working on a port of this and keep running into an error with marathon infinity where you try to open a certain door and it immediately crashes.
After many attempts of failed debugging the crash is coming from a half broken struct "SortedNodes" which is a member of a RenderSortPolyClass (RSPtr). I am guessing that the corruption is taking place somewhere in the creation / update code of the corresponding render objects (linked list), possibly some pointer casting or something.
Has anyone ever had any issues with this happening? Marathon 2 crashes immediately on startup as soon as you spawn and infinity always crashes on the first level when trying to open the same door (I think it is supposed to be jammed) It always locks up there as it crashes when trying to render the ceiling and floor.
Can anyone recommend where in the code I could look for this problematic area? I thought RenderSortPoly.cpp might, maybe the culprit?
@joepogo The OP's crash is due to STL assertions being turned on. What type of crash are you seeing: an STL assertion, a segmentation fault, an infinite loop?
The main render starts with render_view()
, in render.cpp:423. The floors and ceilings to draw are managed in RenderVisTree.build_render_tree()
(RenderVisTree.cpp:120) and RenderSortPoly.sort_render_tree()
(RenderSortPoly.cpp:91). You might start at line 199 of RenderSortPoly.cpp, and see if the polygon index is valid -- it should always be between 0 and 559 for Infinity's first level. Best of luck!
@Hopper262
Sorry for the necro bump here but i wanted to update on something with this port. I am still trying to trace the crash on my end but i found something extremely odd so far which might help:
When i start marathon 2, it crashes immediately when spawning. If i hit the overhead map though when starting and run straight ahead indoors, it actually will let me play the indoor segments of the map without crashing until it has to render outdoor segments again and then it promptly crashes again.
So it seems when it has to render outdoor segments something is causing it to crash.
Anywhere i can look in the code as to why the outdoor segments are doing this? It really makes no sense at all.....
Are you running with OpenGL on? Have you tried software mode? You might drop by the Discord or IRC for more real time support...instead of an issue tracker :)
Hey @treellama!. Thank you for the response! Can you direct me as to where i can go to try to speak with someone? :)
https://discord.gg/c7rEVgY or #alephone on Libera.chat (although the latter is very empty)
Thanks @treellama for the responses! Instead of clogging up the issues tracker i did have one last question for you on this thread. I think i am getting somewhere with my troubleshooting, but am having a hard time locating the skybox rendering code, i think this is where the port is having it's issues,
I want to run a test where i run the game with the sxybox rendering disabled, do you know where that code in particular is?
Thanks again and i'll look to the IRC chat here shortly after i test this out.
There is no skybox in Marathon. Landscapes are rendered as wall or ceiling textures.
Apologies and thank you for the clarification! I guess that would explain why i cannot find it. :P
Please excuse my noobness as I'm still learning as i go with all of this.
The crashing seems to be related to that particular area when being rendered. It seems to not mind indoors at all though which is odd. Which is why i want to test there first.
So if i wanted to disable the sky (outdoor areas)to run my test i would need to disable ceiling textures i presume?
And thanks again for responding here, i am at work and cannot hop on any chat at the moment. :P
@treellama I meant to mention you to the above post just in case you didn't see it.
[cheese@localhost ~]$ alephone-marathon.sh Aleph One Linux 2018-10-06 1.3b2 https://alephone.lhowon.org/
Original code by Bungie Software http://www.bungie.com/ Additional work by Loren Petrich, Chris Pruett, Rhys Hill et al. TCP/IP networking by Woody Zenfell Expat XML library by James Clark SDL port by Christian Bauer Christian.Bauer@uni-mainz.de
This is free software with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. For details, see the file COPYING.
Built with network play enabled.
Built with Lua scripting enabled. while initializing preferences (preferences.cpp:2666) Reading older preferences of version 20170205. Preferences will be upgraded to version 20181006 when saved. (/home/cheese/.alephone/Marathon Preferences) (preferences.cpp:2739) /usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = unsigned int; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::reference = unsigned int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
Aborted (core dumped)
compiled for fedora 29