christian_drake
christian_drake
MModular
Created by christian_drake on 12/18/2024 in #questions
Has anyone ever seen this error
While I was writing out some code on mojo, this error message appeared on the first line of my code. A crash happened in the Mojo Language Server when processing this document. The Language Server will try to reprocess this document once it is edited again. Please report this issue in https://github.com/modularml/mojo/issues along with all the relevant source codes with their current contents. Afterwards, regardless of the changes I make (ie making a new file or altering current file) I keep getting the following error and stack dump:
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var LLVM_SYMBOLIZER_PATH to point to it): After spitting out a couple hundred messages identical to 255 mojo 0x000057bc2c289433 The output finally crashes
mojo crashed!
Please file a bug report.
Segmentation fault (core dumped)
mojo crashed!
Please file a bug report.
Segmentation fault (core dumped)
I've already put this into github but was wondering if anyone knows what this is, what I did to cause it, and how to fix it. Thank you
7 replies
MModular
Created by christian_drake on 12/4/2024 in #questions
Help I have skill issues
I'm new to mojo and am still having trouble navigating the syntax. Currently, I'm trying to build a simple random number generator using the random module. The following is the function that's giving me problems. It says that I cannot implicitly convert 'None' value to SIMD[uint8, 1]. I think the real issue is that I'm unclear as to how to instantiate a pointer for the random variable. Originally, I put the unsafe pointer in the number variable but moved it to it's own variable in hopes of resolving the issue. I'm sure that I'm making a stupid mistake, but I am really hoping to learn how to write in this language as it would be a great addition to the field. Here is my function:
import random

fn exercise() -> UInt8:
var pointer = UnsafePointer[SIMD[DType.uint8, 1]].alloc(1)
var number = random.randint(pointer, 1, 0, 42)
return number
import random

fn exercise() -> UInt8:
var pointer = UnsafePointer[SIMD[DType.uint8, 1]].alloc(1)
var number = random.randint(pointer, 1, 0, 42)
return number
I properly used a main function. The error appears in 'return number'. If you guys could help me understand what I'm doing wrong and how to correct it, I would greatly appreciate it.
22 replies
MModular
Created by christian_drake on 12/1/2024 in #questions
Mojo crashpad issues
Whenever I run mojo on my computer, I get the following error message Failed to initialize Crashpad. Crash reporting will not be available. Cause: while locating crashpad handler: unable to locate crashpad handler executable I'm running this on the latest stable version of Ubuntu thorugh VS Code. I already looked through stack overflow and they're all discussing this issue on windows. It seems that my programs are still running so I don't even know what the problem is. Does anyone know this error? What is causing it? How do I resolve it?
2 replies
MModular
Created by christian_drake on 11/26/2024 in #questions
Bug or Feature
I'm brand spanking new to this language, though I have coded in Python. When I was testing this language out, I noticed that my code didn't work when I indented the block of a while loop. This seemed a little strange, and a little different from the traditional Python programming syntax. Was this a bug or a feature? Am I insane for noticing this, or am I a genius?
16 replies