Crashed when run new script

Case number:954892-993163
Topic:Developer Preview
Opened by:Rav3n_pl
Status:Closed
Type:Bug
Opened on:Sunday, July 15, 2012 - 16:39
Last modified:Tuesday, December 29, 2020 - 11:29

Looks like something killing foldit:

code:
--local seed=recipe.GetRandomSeed() --NOT WORKING!!!
--calculate REALLY good seed
seed=math.abs(Score())*os.time()
seed=seed%0.001
seed=1/seed
while seed<10000000 do seed=seed*1000 end
seed=seed-seed%1
p("Seed is: "..seed)
math.randomseed(seed)
--REALLY good seed made by rav3n_pl :P

output:

Seed is: -1.#IND

log:

Playing sound: 4
delta_score: 0
Playing sound: 4
Error removing old copy of file data
Error creating temporary file puzzles/0000993053/0000174969/helix3mer\aut9A12.tmp falling back to unsafe direct write of save data
Autosaved puzzles/0000993053/0000174969/helix3mer/autosave.ir_solution.
Error removing old copy of file data
Error creating temporary file puzzles/0000993053/0000174969/helix3mer\aut9A22.tmp falling back to unsafe direct write of save data
Autosaved puzzles/0000993053/0000174969/helix3mer/autosave-best.ir_solution.
Error removing old copy of file data
Error creating temporary file puzzles/0000993053/0000174969/helix3mer\aut9A23.tmp falling back to unsafe direct write of save data
Autosaved puzzles/0000993053/0000174969/helix3mer/autosave-recentbest.ir_solution.
Error removing old copy of file data
Error creating temporary file puzzles/0000993053/0000174969/helix3mer\aut9A34.tmp falling back to unsafe direct write of save data
Autosaved puzzles/0000993053/0000174969/helix3mer/autosave-creditbest.ir_solution.
SRVR_THRD sending: 174969 993053 group_score
SRVR_THRD sending: 174969 993053 score
SRVR_THRD getting notifications...
SRVR_THRD sending play event log...

UNHANDLED EXCEPTION
1: library_main +913604 bytes (no line)
2: library_main +9744685 bytes (no line)
3: library_main +9755624 bytes (no line)
4: library_main +9744803 bytes (no line)
5: library_main +9745214 bytes (no line)
6: library_main +2795362 bytes (no line)
7: library_main +452563 bytes (no line)
8: library_main +2830579 bytes (no line)
9: library_main +2834043 bytes (no line)
10: BaseThreadInitThunk +18 bytes (no line)
11: RtlInitializeExceptionChain +99 bytes (no line)
12: RtlInitializeExceptionChain +54 bytes (no line)

Number too big exception or -1 passed to math.randomseed
It should be caught in lua, not kill client.

(Sun, 07/15/2012 - 16:39  |  4 comments)


Joined: 06/17/2010

Well... no it is not this.
Changed code to
seed=os.time()/math.abs(Score())
seed is calculated properly now.
And it is crashing when "add dialog" is visible as current cation

ViewOptionsWidget::refresh()
Error removing old copy of file data
Error creating temporary file puzzles/0000993053/0000174969/helix3mer\aut2CE7.tmp falling back to unsafe direct write of save data
Autosaved puzzles/0000993053/0000174969/helix3mer/autosave.ir_solution.
Error removing old copy of file data
Error creating temporary file puzzles/0000993053/0000174969/helix3mer\aut2CF8.tmp falling back to unsafe direct write of save data
Autosaved puzzles/0000993053/0000174969/helix3mer/autosave-best.ir_solution.
Error removing old copy of file data
Error creating temporary file puzzles/0000993053/0000174969/helix3mer\aut2D08.tmp falling back to unsafe direct write of save data
Autosaved puzzles/0000993053/0000174969/helix3mer/autosave-recentbest.ir_solution.
Error removing old copy of file data
Error creating temporary file puzzles/0000993053/0000174969/helix3mer\aut2D09.tmp falling back to unsafe direct write of save data
Autosaved puzzles/0000993053/0000174969/helix3mer/autosave-creditbest.ir_solution.
SRVR_THRD sending: 174969 993053 group_score
SRVR_THRD sending: 174969 993053 score
SRVR_THRD getting notifications...
SRVR_THRD sending play event log...

UNHANDLED EXCEPTION
1: library_main +913604 bytes (no line)
2: library_main +9744685 bytes (no line)
3: library_main +9755624 bytes (no line)
4: library_main +9744803 bytes (no line)
5: library_main +9745214 bytes (no line)
6: library_main +2795362 bytes (no line)
7: library_main +452563 bytes (no line)
8: library_main +2830579 bytes (no line)
9: library_main +2834043 bytes (no line)
10: BaseThreadInitThunk +18 bytes (no line)
11: RtlInitializeExceptionChain +99 bytes (no line)
12: RtlInitializeExceptionChain +54 bytes (no line)

Joined: 06/17/2010

Ok, found it:

opt.gen = dialog.AddTextbox("Generations:", herd.maxgen)
vs
opt.gen = dialog.AddTextbox("Generations:", herd.maxGen)

herd.maxgen is null, herd.maxGen is boolean.

Dialog should catch it?

brow42's picture
User offline. Last seen 1 year 30 weeks ago. Offline
Joined: 09/19/2011
Groups: None

Many functions do not check their argument types, see http://fold.it/portal/node/991496 . And we discussed GetRandomSeed problems in https://fold.it/portal/node/992549 . Has that been fixed in dev prev?

Joined: 09/24/2012
Groups: Go Science
Status: Open » Closed

old

Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, Boehringer Ingelheim, RosettaCommons