<div dir="ltr"><div><div><div><div>Okay, Progress! A little, anyway.<br><br></div>The Windows VM boots, attempts to build, and shuts down correctly.<br><br></div>The actually builds are still failing though, this time because it says a PDB DLL file is missing.<br><br></div>---<br></div>James Paige<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 9, 2018 at 1:18 AM, Ralph Versteegen <span dir="ltr"><<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Oh, and it occurs to me that you're going to need to manually do an 'svn update', because the script dies before it gets that far.<br></div>Also, manually updating svn will also make it skip building, because it'll think there are no new commits. That's would be fine, although it'll prevent you from actually seeing whether it's working or not.<br></div>Also, I forgot to ask you to delete the old nightly build .zips, for builds which are no longer done or have been renamed.<br></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Sun, 9 Sep 2018 at 17:07, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><div>OK, that was enough to figure out what was going on.<br><br></div>Quoting in batch scripts is really a nightmare!<br>If you write<br> SET ISCC=C:\Program Files (x86)\Inno Setup 5\iscc.exe<br></div><div>then the brackets cause a parsing error.<br></div>If you write<br> SET ISCC="C:\Program Files (x86)\Inno Setup 5\iscc.exe"<br></div><div>and then do<br></div><div>  ECHO %ISCC%<br></div><div>it prints the filename with quotes. But if you do<br></div><div>  IF NOT EXISTS %ISCC% ( ...<br></div><div>you get an error due to the unquoted (x86) in the filename, although it is quoted!<br></div><div>So if you try instead<br><div>  IF NOT EXISTS "%ISCC%" ( ...<br></div><div>that expands to ""C:\Program Files (x86)\Inno Setup 5\iscc.exe"" and now cmd.exe DOES process the quotes, the double quotes apparently cancelling out, and cmd.exe complains about 'Files' being unexpected!! Talk about inconsistent!<br></div><div>It turns out that the only possible way to get everything to work is to write<br>  SET "ISCC=C:\Program Files (x86)\Inno Setup 5\iscc.exe"<br></div><div>which does protect the (x86) but doesn't put the quotes in the variable itself, so that yuo can then write "%ISCC%" without causing double quoting.<br><br></div><div>I take back every single nice thing I said about batch scripting!<br><br></div><div>This is another reason why I want to convert most of our distrib scripts into python!<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, 9 Sep 2018 at 10:04, James Paige <<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>So far I can see that the VM starts up, runs distrib-nightly-win.bat inside c:\nightly\ohrrpgce\ and then immediately quits.<br><br></div>The only output in c:\nightly\distrib-out.txt says:<br><br></div>Searching for support programs...<br></div>\Inno was unexpected at this time.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 8, 2018 at 6:35 AM, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If I have time this weekend, I'll boot up that VM in interactive mode and investigate :)<div class="m_-2810556785424935843m_-8690205924473933247m_6275063555892160101HOEnZb"><div class="m_-2810556785424935843m_-8690205924473933247m_6275063555892160101h5"><br><br>On Saturday, September 8, 2018, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Looks like I managed to break Windows nightly builds somehow. It's not even sending email with the build log anymore!<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 7 Sep 2018 at 01:03, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><div>I see that the last nightly build failed.<br><br></div>Firstly, there's this error:<br>  'nightly\ohrrpgce' is not recognized as an internal or external command,<br>  
operable program or batch file.<br></div>I saw this sort of crazy thing a lot while testing. "svn update" must have modified the copy of distrib-nightly-win.bat that was being executed! cmd.exe kept the same position in the file, but its contents changed, so it was suddenly in the middle of a line.<br></div><div>I had thought that a separate copy of the source code was used to provide the nightly build scripts and that you had to manually update them if they changed, but I guess you changed that at some point. (I thought that comment at the top was obsolete!)<br></div><div>I guess this isn't worth fixing, but just keep it mind it might cause more (temporary) build failures in future.<br><br></div><div>All other errors are also caused by the same thing. The first few lines of the old .bat file and the rest of the new .bat were executed, so the necessary environmental variables didn't get set. The next nightly build should hopefully work correctly.<br></div><div><br><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 6 Sep 2018 at 13:14, James Paige <<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Awesome! I'll take a look and see if I need to change anything on the build VMs or on the dreamhost account when I get a chance. This has been a very busy week, but I have been reading all your commit messages with a smile on my face :D<div><br></div><div>---</div><div>James<br><br>On Wednesday, September 5, 2018, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>OK, I'm finally done with changes to the distrib scripts. I don't know how I managed to spend so many commits on cleaning them up...<br></div>James, set the value of $SCPSYMBOLS, the location to upload the symbols archives to, to your liking. It's set in three different files.<br></div><div>Although I renamed some scripts, that shouldn't affect anything.<br><br></div><div>Hmm, I should make the windows nightly build script skip the build if there have been no svn commits, like the mac nightlies already do.<br></div><div>(I'm not sure but I don't think we can easily reuse a .pdb file for two 
builds made from identical source code, because the .exe hash won't necessarily match)<br></div><div>Skipping unnecessarily rebuilds would allow rebuilding the builds more than once per 24 hours (manually, or by cron).<br>(I tried to let you still manually force additional early builds as long as there's been an svn commit, by putting the commit number in the archive name. But I just realised that won't work if you do a  manual build and then the scheduled build happens after, without any commits between. )<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 4 Sep 2018 at 15:48, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>OK, great!<br></div>I think it would definitely be a good idea to get the php script to forward reports to <a href="mailto:ohrrpgce-crash@hamsterrepublic.com" target="_blank">ohrrpgce-crash@<wbr>hamsterrepublic.com</a> so they don't get forgotten (assuming there isn't a flood of them). Unless they are too large, I guess - someone could try to include a large .rpg file in the report. Is your email hosted by dreamhost? Then it seems that I can just send email from another <a href="http://hamsterrepublic.com" target="_blank">hamsterrepublic.com</a> address to ohrrpgce-crash using php's mail() function, according to the dreamhost docs.<br></div><div>And, I'll put the script in the web/ directory in svn.</div><div><br>What about uploading the exe/pdb archives, where should they be put? I guess I'll name them something like ohrrpgce-symbols-win-$RELEASE-<wbr>$BACKENDS-$DATE-$SVNREV.7z (I'll put 7z.exe in support/) and they can all go in one directory, and old files can be deleted manually when we do a release, or automated later.<br>Incidentally, I notice that only mac nghtly builds skip building if there are no changes to svn, linux and win builds build regardless.<br><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 4 Sep 2018 at 03:07, James Paige <<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Okay, you can now configure crashrpt to submit its reports to <a href="https://rpg.hamsterrepublic.com/crashrpt/" target="_blank">https://rpg.hamsterrepublic.<wbr>com/crashrpt/</a><br><br></div>They get saved in /home/james_paige/crash_<wbr>reports/ which is not web accessible.<br><br></div>TMC, if you send me an ssh public key, I can give you ssh/sftp access to that.<br><br></div>Feel free to make whatever changes you like to the nightly build scripts, and let me know what I need to change, either on the VMs or on the dreamhost account<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 3, 2018 at 8:34 AM, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Anything that gives better crash reports sounds great to me.<div><br></div><div>Increasing the download size a bit is not a big problem. I think our downloads are already comparatively tiny.</div><div><br></div><div>I also don't expect any problem with storing a few gigabytes of exes and crash related data. My dreamhost account might be stingy about processor resources, but it is very generous about storage space.</div><div><br></div><div>I'll see what I can do about setting up that php script. We can use it over either http or https since I have LetsEncrypt certs for all my domains</div><div><br></div><div>This is going to be a busy week, so if I don't get to it today it will have to be next weekend. (I am making myself a reminder)<div><div><br><br>On Sunday, September 2, 2018, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><div>I've heard of quite a few reports of various kinds of crashes which I don't have enough information to do anything about, so am forced to ignore. (Mostly they've been reported on the SS Discord server which even has a dedicated 
channel for reporting bugs!).<br><br></div><div>My previous attempt to generate stack traces on Windows required somewhat large extra dlls to parse the DWARF debug info in game/custom.exe, and they can't provide line numbers, which would require huge totally-unstripped builds. Line numbers would help hugely.<br></div><div>So the new plan is to instead generate minidumps which get sent back for analysis. Win XP and later have a function to generate minidumps (and the dll can be downloaded for older Windows versions if needed) The minidump 
includes the stack of each thread, so you can use it to 
generate traces with line numbers and inspect variables. 
Optionally you can include more parts of the process memory like global 
variables, but that makes it large.</div><div><br><div>I've been trying out an open-source reporter, which sends reports over the internet with minimal user will needed:<br><a href="http://crashrpt.sourceforge.net/" target="_blank">http://crashrpt.sourceforge.<wbr>net/</a><br></div><div>There
 are a couple other such reporters, like BreakPad (originally from 
Mozilla, and used by Firefox and Chrome) but they seem pretty 
heavy-weight and more difficult to use.<br></div><br><div>CrashRpt requires a separate .dll (I doubt I would 
be able to statically link) plus CrashSender.exe which does the actual 
work, and an ini file.<br></div><div>Zipped, these are 300KB in total (I
 compiled a custom build to strip out the extravagant ability to record 
ogg theora videos and jpgs!). So that's fine for including with Custom 
in support/. But we wouldn't want these extra files when distributing 
games. However, if you have a full distribution of the OHRRPGCE, then 
any copy of game.exe can reuse the CrashRpt files from support/. If CrashRpt isn't available, game.exe can still easily save a minidump itself and ask the user to email it manually.<br></div><br><div>== How this will work ==<br></div><div><br><div dir="ltr">CrashRpt does not generate stack traces. It only collects
 data and sends it off. You can tell it which files to attach, and it 
includes some metadata and a minidump and can include a screenshot.<br></div><br></div><div>fbc -gen gas generates STABS debug symbols, gcc generates 
DWARF symbols, and Visual C++ generates PDB symbols, which live in a 
separate .pdb file. PDB is undocumented, but recently LLVM folks have 
been creating documentation by examining code Microsoft open-sourced. So
 GCC and GDB don't support PDB or minidumps.<br><br></div><div>We can use the cv2pdb tool to convert DWARF to .pdb files, which we keep. The executables themselves get stripped, and also need to be kept; a .pdb alone is useless. (Currently we partially strip exes, leaving in function symbols so gcc can create a backtrace. I don't think that's worth keeping anymore, except in the debug build. By fully stripping, we can reduce each exe by another 300KB.) cv2pdb doesn't convert FB strings correctly, but those are on the heap so not in the minidump anyway.<br><br></div>To examine the minidumps, you can use Visual Studio (the free versions will do) or windbg (CLI), or use a commandline tool or server-side to generate a stracktrace and other info from it. CrashRpt has such a tool, and scripts for handling large numbers of crash reports and sorting them. BreakPad also has tools for it.<br></div></div><br></div><div>== What we need to do ==<br><br><div>Firstly the .pdb files should get uploaded somewhere. We will want to keep the .pdb 
files and .exes for every nightly build - not just the weekly archived 
nightlies! .pdb files alone are unfortunately useless.<br></div><div>I'm going to get rid of most of most of our windows nightly builds,
 they're redundant now that you can switch graphics backend. So leaving just 
music_sdl, music_native, music_native2 and music_sdl-debug. (In fact, music_native and music_native2 appear broken and I couldn't find anyone who uses them or even remembers using them.)<br> We 
should keep the files for at least every default (music_sdl) build since at least 
the last stable release, probably longer since not everyone upgrades promptly. Using xz, the game+custom exe+pdb 
files compress to 2.4MB. So 4 builds, 3 months of backups is ~1000MB. **<br></div><div>An idea to save space: upload just the music_sdl files since the last stable release, (~250MB) and keep all the other files on the build machine in the unlikely event they're needed.<br><br></div><div>(** however I just remembered that exes from the nightly build machine are significantly larger than ones built on my machine)<br></div></div><div><div><br>Secondly we need to collect reports - CrashRpt can send via HTTP, HTTPS, SMTP and by opening an email client. I assume dreamhost will block emails from random IPs, so we will want HTTP.<br>There is an example php script to accept reports and save them.<br><a href="http://crashrpt.sourceforge.net/docs/html/sending_error_reports.html#httpsend" target="_blank">http://crashrpt.sourceforge.<wbr>net/docs/html/sending_error_<wbr>reports.html#httpsend</a><br></div><div>I guess it would be easiest if we modify this script to email us the zip file. And keep a copy on the server in case something goes wrong? Can we put us up at <a href="http://hamsterrepublic.com" target="_blank">hamsterrepublic.com</a>?<br></div><div><br></div></div></div></div></div>
</blockquote></div></div></div>
</blockquote></div><br></div>
______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.<wbr>org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.<wbr>org/listinfo.cgi/ohrrpgce-<wbr>motherhamster.org</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.<wbr>org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.<wbr>org/listinfo.cgi/ohrrpgce-<wbr>motherhamster.org</a><br>
</blockquote></div>
</blockquote></div>
</blockquote>
</div></div></blockquote></div><br></div>
______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.<wbr>org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.<wbr>org/listinfo.cgi/ohrrpgce-<wbr>motherhamster.org</a><br>
</blockquote></div>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org">ohrrpgce@lists.motherhamster.<wbr>org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.<wbr>org/listinfo.cgi/ohrrpgce-<wbr>motherhamster.org</a><br>
<br></blockquote></div><br></div>