Crash-wiggle with band.Add

Case number:845829-2004973
Topic:Crash/Hang
Opened by:robgee
Status:Open
Type:Bug
Opened on:Thursday, April 5, 2018 - 14:12
Last modified:Friday, April 6, 2018 - 08:14

Main, original UI, Win10/64
buildid: 20180312-1714f56737-win_x86

Created recipe using band.add with 9 parameters. On wiggle
after a short while it hangs then crashes.

Change 'OG' for any segment on a puzzle, then run it a few times and it will crash.
RECIPE::
--Crashme ::wiggle with band.add
function seedRandom()
seed=os.time()/math.abs( current.GetEnergyScore() )
seed=seed%0.001
seed=1/seed
while seed<10000000 do seed=seed*1000 end
seed=seed-seed%1
--print("Seed is: "..seed)
math.randomseed(seed)
end
OG=321 --{321 for puzzle 1503} ,choose any segment on any puzzle
RHO=0.95
stren=1.5
atomNum=structure.GetAtomCount(OG)
atomsegO = math.random(atomNum )
atomsegX = math.random(atomNum )
atomsegY = math.random(atomNum )
print('atom count:',atomsegO,atomsegX,atomsegY)
local theta = math.acos(2 * math.random () - 1 )
local phi = 2 * math.pi * math.random()
local qed=band.Add(OG,1,2,RHO, theta, phi,atomsegO,atomsegX,atomsegY )
print('band at:',OG,1,2,RHO, theta, phi,atomsegO,atomsegX,atomsegY)
if qed>=1 then
band.SetStrength(qed,stren)
end
selection.SelectAll()
-- uncomment this line and it will crash(usually does not take long)
--structure.WiggleSelected(1, true, true)
band.DeleteAll()
selection.DeselectAll()
--end of file

extract from LOG.txt
***** ENDING THREAD ActionGlobalMinimize
Tool on_action_complete called
delta_score: 0
Playing sound: 4
Tool on_action_complete called
Tool on_action_complete called
delta_score: 0
Playing sound: 4
Tool on_action_complete called
***** STARTING THREAD ActionGlobalMinimize
sin_cos_range ERROR: nan is outside of [-1,+1] sin and cos value legal range
sin_cos_range ERROR: nan is outside of [-1,+1] sin and cos value legal range
ERROR:: Exit from: c:\cygwin64\home\jflat06\foldit\develop\source\src\numeric/trig.functions.hh line: 124

UNHANDLED EXCEPTION
1: RaiseException +98 bytes (no line)
2: alIsAuxiliaryEffectSlot +603490 bytes (no line)
3: library_main +47188928 bytes (no line)
4: library_main +1162032 bytes (no line)
5: library_main +34807231 bytes (no line)
6: library_main +38730173 bytes (no line)
7: library_main +38732767 bytes (no line)
8: library_main +38725697 bytes (no line)
9: library_main +38941351 bytes (no line)
10: library_main +34609636 bytes (no line)
11: library_main +34609239 bytes (no line)
12: library_main +33194651 bytes (no line)
13: library_main +34551462 bytes (no line)
14: library_main +34560090 bytes (no line)
15: library_main +31625622 bytes (no line)
16: library_main +31624719 bytes (no line)
17: library_main +5912680 bytes (no line)
18: library_main +5488976 bytes (no line)
19: library_main +5909420 bytes (no line)
20: library_main +370360 bytes (no line)
21: library_main +3409717 bytes (no line)
22: library_main +3410155 bytes (no line)
23: BaseThreadInitThunk +36 bytes (no line)
24: RtlGetAppContainerNamedObjectPath +311 bytes (no line)
25: RtlGetAppContainerNamedObjectPath +263 bytes (no line)
-End log.txt

(Thu, 04/05/2018 - 14:12  |  2 comments)


robgee's picture
User is online Online
Joined: 07/26/2013

Aha, found the problem in my code. From the wiki:
"arguments atomIndexOrigin, atomIndexXAxis, and atomIndexYAxis are atom numbers for the corresponding segments."
The variables atomsegX and atomsegY in my code are not linked to the 'corresponding' segments, so sometimes their value is an atom number that does not exist.

brow42's picture
User offline. Last seen 6 days 7 hours ago. Offline
Joined: 09/19/2011
Groups: None

I've never used this function with 9 parameters; I didn't know you could do that. I'm not sure why you would specify 8 and 9.

However, whatever numbers you used, it should not have crashed the client. This is a legitimate bug.

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, RosettaCommons