Since it is autogenerated code, most of the time it is just run once (via a shell call) and discarded - it's the results that are important and send back to the knowledge base. So, I don't need to keep the .zo files up to date. In fact, the only reason I ever execute the autogenerated code under DrRacket is when I'm debugging the code generator itself.<br>
<br>However, we're now looking at using the generated models themselves in some more advanced parametric analysis. That's why I split the Monte Carlo code out separately and ran into the bug. The production system is still under V4.2.5 and doesn't have the problem - and it is strictly in the run-once-and-forget mode. I only ran into the problem on my laptop, which I'd rather not drop back to pre-V5.<br>
<br>I'll see if disabling the automatic compilation also solves the problem.<br><br>Doug<br><br><div class="gmail_quote">On Tue, Jul 20, 2010 at 1:45 PM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Did you try disabling the automatic compilation (in the details<br>
portion of the language dialog)? My guess is that that will make the<br>
problem go away. (If so, you can also then start running "raco make<br>
<filename.rkt>" in the shell to keep the .zo files up to date and save<br>
on load times.)<br>
<br>
Robby<br>
<br>
On Tue, Jul 20, 2010 at 2:24 PM, Doug Williams<br>
<div><div></div><div class="h5"><<a href="mailto:m.douglas.williams@gmail.com">m.douglas.williams@gmail.com</a>> wrote:<br>
> Okay, some more information.<br>
><br>
> If I execute DrRacket with the Monte Carlo file, make sure Debugging is<br>
> checked (in the Language dialog with Show Details), and hit Run, I get the<br>
> error:<br>
><br>
> string<?: expects type <string> as 1st argument, given: #f; other arguments<br>
> were:<br>
> "0fe14e326dff1551df22271bdae03080a46dff5a9cd41e2f58a86ac8158ca605f292b20a02896479"<br>
><br>
> with no backtrace available.<br>
><br>
> If I then select No debugging or profiling and hit Run, I get the error:<br>
><br>
> ..\..\..\..\..\..\..\..\..\Program<br>
> Files\Racket\collects\racket\private\sort.rkt:85:19: string<?: expects type<br>
> <string> as 1st argument, given: #f; other arguments were:<br>
> "082577093f20c187869d70b940a5b298cd5572084c12d02f2de08868342b8264c39b7fe111a38bf5"<br>
><br>
> with a backtrace.<br>
><br>
> If I then select Debugging and profiling and hit Run, it actually runs<br>
> (although more slowly) and produces a profile.<br>
><br>
> Interestingly, I can then go and check either Debugging or No debugging or<br>
> profiling and it runs. But, if I exit and restart DrRacket it goes back to<br>
> not working.<br>
><br>
> Weird, huh?<br>
><br>
> Doug<br>
><br>
> On Tue, Jul 20, 2010 at 11:18 AM, Doug Williams<br>
> <<a href="mailto:m.douglas.williams@gmail.com">m.douglas.williams@gmail.com</a>> wrote:<br>
>><br>
>> I seem have hit the same (or related) bug that Laurent Orseau submitted as<br>
>> bug 11017 (but in a completely different context that might help track it<br>
>> down) and I haven't been able to find a workaround. The actual error message<br>
>> I get is:<br>
>><br>
>> string<?: expects type <string> as 1st argument, given: #f; other<br>
>> arguments were:<br>
>><br>
>> "c29a751537a750b825f72c9ee37eea737a0f3a8b9cd41e2f58a86ac8158ca605f292b20a02896479"<br>
>><br>
>> coming from somewhere in the bowels of DrRacket. I don't get the error<br>
>> when using Racket (i.e., MzScheme). I'm not sure if this machine was running<br>
>> the stock V5.0 or a post-V5.0 nightly build that fixed a PLaneT problem I<br>
>> was having. But, the pre-release 5.0.1 build gives the same error. I<br>
>> reloaded V4.2.5 and the code runs fine there.<br>
>><br>
>> I was hoping that the string in the error message itself might give<br>
>> someone in the know some idea of the problem.<br>
>><br>
>> Unfortunately, this happens in a rather large autogenerated agent-based<br>
>> simulation that isn't easily posted - although I can send the code and the<br>
>> development packages it uses to someone if they need it.<br>
>><br>
>> A short extract of the 'main' program that runs:<br>
>><br>
>> #lang scheme<br>
>> ;;; Agent Generation from Templates - PRIME (AGenT') by SET Corporation<br>
>> (an SAIC Company)<br>
>> ;;; Autogenerated PLT Scheme source code<br>
>> invest-in-pa-yangi-yangi-tucker---plausible-outcomes-212-main.ss<br>
>> ;;; Generated Monday, July 19th, 2010 12:33:42pm<br>
>><br>
>> (require (planet williams/madness/madness)<br>
>><br>
>> "invest-in-pa-yangi-yangi-tucker---plausible-outcomes-212-arguments.ss"<br>
>><br>
>> "invest-in-pa-yangi-yangi-tucker---plausible-outcomes-212-argument-values.ss"<br>
>><br>
>> "invest-in-pa-yangi-yangi-tucker---plausible-outcomes-212-data-collection.ss")<br>
>><br>
>> ... <about 1300 SLOC redacted><br>
>><br>
>> ;;;<br>
>> ;;; Monte Carlo loop INVEST-IN-PA-YANGI-YANGI-TUCKER---PLAUSIBLE-OUTCOMES<br>
>> ;;;<br>
>> (define (INVEST-IN-PA-YANGI-YANGI-TUCKER---PLAUSIBLE-OUTCOMES n)<br>
>> (with-new-simulation-environment<br>
>> (let ((aggregate-instance-index (make-hasheq)))<br>
>> (for ((i (in-range n)))<br>
>> (INVEST-IN-PA-YANGI-YANGI-TUCKER i aggregate-instance-index))<br>
>> (print-statistics aggregate-instance-index)<br>
>> (generate-exhibit-files aggregate-instance-index)<br>
>> (generate-results-XML aggregate-instance-index n))))<br>
>><br>
>> ;;;<br>
>> ;;; Execute Monte Carlo<br>
>> ;;;<br>
>><br>
>> (INVEST-IN-PA-YANGI-YANGI-TUCKER---PLAUSIBLE-OUTCOMES 10)<br>
>><br>
>> ;;;<br>
>> ;;; Module Contracts<br>
>> ;;;<br>
>><br>
>> (provide (all-defined-out))<br>
>><br>
>> If I simply remove the call to<br>
>> (INVEST-IN-PA-YANGI-YANGI-TUCKER---PLAUSIBLE-OUTCOMES 10) and move it to<br>
>> it's own package:<br>
>><br>
>> #lang scheme<br>
>> ;;; Agent Generation from Templates - PRIME (AGenT') by SET Corporation<br>
>> (an SAIC Company)<br>
>> ;;; Autogenerated PLT Scheme source code<br>
>> invest-in-pa-yangi-yangi-tucker---plausible-outcomes-212-monte-carlo.ss<br>
>> ;;; Generated Monday, July 19th, 2010 12:33:43pm<br>
>><br>
>> (require<br>
>> "invest-in-pa-yangi-yangi-tucker---plausible-outcomes-212-main.ss")<br>
>><br>
>><br>
>> ;;;<br>
>> ;;; Execute Monte Carlo<br>
>> ;;;<br>
>><br>
>> (INVEST-IN-PA-YANGI-YANGI-TUCKER---PLAUSIBLE-OUTCOMES 10)<br>
>><br>
>> I get the error above. [Again, it runs under Racket (i.e., MzScheme).]<br>
>><br>
>> Please let me know if there are some switches I can set or otherwise<br>
>> provide additional information.<br>
>><br>
>> Ah, I just ran it with "No debugging or profiling" checked and got some<br>
>> additional information - seems interesting that I got more information with<br>
>> no debugging. But anyway the error printed is now<br>
>><br>
>> ..\..\..\..\..\..\..\..\..\Program<br>
>> Files\Racket\collects\racket\private\sort.rkt:85:19: string<?: expects type<br>
>> <string> as 1st argument, given: #f; other arguments were:<br>
>> "146047b7b2121bf8f7b15d7c2ef396b710f394474c12d02f2de08868342b8264c39b7fe111a38bf5"<br>
>><br>
>> It also gave a backtrace that I copied and pasted into the attached file.<br>
>> [Was a better way to do that?]<br>
>><br>
>> Doug<br>
>><br>
>><br>
><br>
><br>
</div></div><div class="im">> _________________________________________________<br>
> For list-related administrative tasks:<br>
</div>> <a href="http://lists.racket-lang.org/listinfo/dev" target="_blank">http://lists.racket-lang.org/listinfo/dev</a><br>
><br>
</blockquote></div><br>