drandula
Member
I have structs, which hold 3D and 4D arrays. Structs have Update and Draw -methods, which loop through these arrays. There are no problems when using YYC, and it runs smoothly.
Problem resides when I use VM and Debugger.
- Running Draw-method shows all items in arrays exist, so initialization is not a problem. Also verified this with debugger.
- Whenever I run Update-method, last dimension might become empty. Update-call is heavier than Draw.
- Problem occurs randomly during or after Update-call. It can happen in same frame, but also after several frames have passed after executing Update.
- This doesn't happen every time, certain situations make it more likely.
- Error states following. Actual Index can vary, as sometimes this occurs in middle of loop, and index can be something like "5".
It seems that entries on last dimension got garbage-collected -> eg. array[w][h][c] values have became undefined, dimensional structure exist.
- Usually all items on last dimension become undefined, but sometimes only partly.
I have been trying to pinpoint this problem for several hours, and my testing points towards gc instead having problem in the code. (Of course there is that possiblity).
- When I disable gc, there is no problem with arrays.
- By reading gc_stats I understand gc happens before problem.
- Having gc as cause would explain seemingly random timing of problem after Update-call.
- Just to mention, I have cleared cache several times.
Update method is heavier and usually isn't called every frame. Draw-method is called constantly for drawing arrays.
- Problem is more likely to occur when arrays are larger + more complex. Larger arrays make calling Update more heavy.
- Problem is likely to happen when Update-call takes long enough. Though this isn't surefire.
-> I have tried to make arrays large enough to make GMS struggling to run without problem occurring. But then rerunning project can make problem happen.
-> Making Update call every frame, then stop and start Updating again can cause it?
Here are some errors I have managed to get:
Two bottom erro rmessages only have happened once.
- First I don't know how Unknown Software Expection error happened. can have occurred during I tried enabling/disabling gc.
- Second, having error happen at Tanh-function is bit mystery, because error should have happen when accessing the value (color = output[w][h][c], then color = NeuronColor(color)). Could input-argument have been collected xD
So I think it is gc-related, but what do you think? Could there be something else to look for? I have no clue, so enlight me
Problem resides when I use VM and Debugger.
- Running Draw-method shows all items in arrays exist, so initialization is not a problem. Also verified this with debugger.
- Whenever I run Update-method, last dimension might become empty. Update-call is heavier than Draw.
- Problem occurs randomly during or after Update-call. It can happen in same frame, but also after several frames have passed after executing Update.
- This doesn't happen every time, certain situations make it more likely.
- Error states following. Actual Index can vary, as sometimes this occurs in middle of loop, and index can be something like "5".
Variable Index [0] out of range [0]
It seems that entries on last dimension got garbage-collected -> eg. array[w][h][c] values have became undefined, dimensional structure exist.
- Usually all items on last dimension become undefined, but sometimes only partly.
I have been trying to pinpoint this problem for several hours, and my testing points towards gc instead having problem in the code. (Of course there is that possiblity).
- When I disable gc, there is no problem with arrays.
- By reading gc_stats I understand gc happens before problem.
- Having gc as cause would explain seemingly random timing of problem after Update-call.
- Just to mention, I have cleared cache several times.
Update method is heavier and usually isn't called every frame. Draw-method is called constantly for drawing arrays.
- Problem is more likely to occur when arrays are larger + more complex. Larger arrays make calling Update more heavy.
- Problem is likely to happen when Update-call takes long enough. Though this isn't surefire.
-> I have tried to make arrays large enough to make GMS struggling to run without problem occurring. But then rerunning project can make problem happen.
-> Making Update call every frame, then stop and start Updating again can cause it?
Here are some errors I have managed to get:
Two bottom erro rmessages only have happened once.
- First I don't know how Unknown Software Expection error happened. can have occurred during I tried enabling/disabling gc.
- Second, having error happen at Tanh-function is bit mystery, because error should have happen when accessing the value (color = output[w][h][c], then color = NeuronColor(color)). Could input-argument have been collected xD
So I think it is gc-related, but what do you think? Could there be something else to look for? I have no clue, so enlight me
Attachments
-
6.4 KB Views: 6