That patch worked fine for me. I took a stab at adjusting string_and_string_ref sub-parser used in the GenerateSitrepMessage parser, but apparently that's a bit past my parse-fu as yet.Geoff the Medio wrote:Edit: patch attached. If that works, maybe try switching the GenerateSitrepMessage data parser to take a proper string ValueRef instead of just a string constant.
r 7847 crashes on Linux (Ubuntu)
Moderator: Committer
Re: r 7847 crashes on Linux (Ubuntu)
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: r 7847 crashes on Linux (Ubuntu)
Edit: tryDilvish wrote:I took a stab at adjusting string_and_string_ref sub-parser used in the GenerateSitrepMessage parser, but apparently that's a bit past my parse-fu as yet.
Code: Select all
string_and_string_ref
= parse::label(Tag_token) >> tok.string [ _a = _1 ]
>> parse::label(Data_token)
>> ( int_value_ref [ _val = construct<string_and_string_ref_pair>(_a, new_<ValueRef::StringCast<int> >(_1)) ]
| double_value_ref [ _val = construct<string_and_string_ref_pair>(_a, new_<ValueRef::StringCast<double> >(_1)) ]
| tok.string [ _val = construct<string_and_string_ref_pair>(_a, new_<ValueRef::Constant<std::string> >(_1)) ]
| string_value_ref [ _val = construct<string_and_string_ref_pair>(_a, _1) ]
)
;
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Re: r 7847 crashes on Linux (Ubuntu)
That patch compiled & ran fine; the runtest included getting a 'Then colony on blah has reached recolonizing size." which is from a GenerateSitrepMessage Effect.Geoff the Medio wrote:Edit2: Several patches combined... StringValueRef, Statistic reorganization, GenerateSitrepMessage, misc tweaks..
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: r 7847 crashes on Linux (Ubuntu)
What if you use the same patch, but uncomment the statistic_3 parts in ValueRefParserImpl.h ?Dilvish wrote:That patch compiled & ran fine; the runtest included getting a 'Then colony on blah has reached recolonizing size." which is from a GenerateSitrepMessage Effect.
Re: r 7847 crashes on Linux (Ubuntu)
compiles fine, but it goes back to initialization deadlock when I try to run it. That happens even if I leave the lineGeoff the Medio wrote:What if you use the same patch, but uncomment the statistic_3 parts in ValueRefParserImpl.h ?
Code: Select all
//| statistic_3
I did get it to work, though. Taking a cue from initialize_expression_parsers(), I broke out the initialization of statistic_3 into a separate initialization and pass into it an intermediate form of the main value_ref parser. Compiles & appears to run fine, though I haven't tested the specific new functionality. I suppose that a limitation of this approach is that you can't do a statistic of a statistic of a valueRef, but that seems like a pretty modest and reasonable limitation.
Attached is a patch that includes your above patch plus my changes (to files ValueRefParserImpl.h, DoubleValueRefParser.cpp and IntValueRefParser.cpp).
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: r 7847 crashes on Linux (Ubuntu)
Does the attached build / run?
I'd rather keep the distinct parser types segregated by passing in the sub-parsers as in this patch...
I'd rather keep the distinct parser types segregated by passing in the sub-parsers as in this patch...
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Re: r 7847 crashes on Linux (Ubuntu)
Yes, it does.Geoff the Medio wrote:Does the attached build / run?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0