You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compiled from source, got the iso and use it in QEMU VM, after some use (hangs around the file system, compile and run the pre-write codes) suddenly the system crushed with the error: V panic: array.get: index out of range like in the screenshot.
another problem, the v compiler isn't working at all, and thanks.
The text was updated successfully, but these errors were encountered:
Perhaps it would be helpful if the latest version of the v compiler was used. Secondly the logs could be checked in Vinix with dmesg and journalctl -u vinix This might shed light on precisely what happened but the sort of message you got indicates a bug with the version of V that is being used. What do you think?
Highly typically the error involves the array.get function, so peeking at the source code for V in vlib/arrays/arrays.v It seems that the array handling functions are well written but as a case example the first one,
// min returns the minimum value in the array// Example: arrays.min([1, 2, 3, 0, 9])! // => 0pub fnmin[T](array []T) !T {
if array.len==0 {
returnerror('.min called on an empty array')
}
mutval:= array[0]
for e in array {
if e < val {
val= e
}
}
return val
}
The function correctly checks for an empty array and returns an error. However, if the function is called with an empty array and the error is not handled, the program will panic. And so on and so forth the file needs to be examined carefully. What do you think?
compiled from source, got the iso and use it in QEMU VM, after some use (hangs around the file system, compile and run the pre-write codes) suddenly the system crushed with the error:
V panic: array.get: index out of range
like in the screenshot.another problem, the v compiler isn't working at all, and thanks.
The text was updated successfully, but these errors were encountered: