Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    how did you reproduce that, what is the case that crashes?

  • Default User Avatar

    error didn't appear befor adding in this so I'm pretty sure that's it and I can't reproduce the error on my machine because it passes all the basic tests:

     if(word == "!" || word == "," || word == ".")
        {
            result += word;
        }
    
  • Default User Avatar

    it didn't solve the issue

  • Default User Avatar

    I (think I) know whitch part of the code creates the error I just don't know why

  • Default User Avatar

    and this is the code that makes this error appear (word is always a string):

     if(word == "!" || word == "," || word == ".")
        {
            result += word;
        }
    
  • Default User Avatar

    I'm a new c++ programmer, I haven't ever used a debugger, is there a guide you consider good (for me)?

  • Default User Avatar

    i get this error, my code passes all the basic tests:

    UndefinedBehaviorSanitizer:DEADLYSIGNAL
    ==1==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x0000017f4000 (pc 0x7f24e8c24c71 bp 0x000000000001 sp 0x7ffe8bbd26e8 T1)
    ==1==The signal is caused by a READ memory access.
    ==1==WARNING: invalid path to external symbolizer!
    ==1==WARNING: Failed to use and restart external symbolizer!
    #0 0x7f24e8c24c70 (/lib/x86_64-linux-gnu/libc.so.6+0x18ec70)
    #1 0x7f24e96039dc (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x13d9dc)
    #2 0x4267a5 (/workspace/test+0x4267a5)
    #3 0x429da0 (/workspace/test+0x429da0)
    #4 0x427bae (/workspace/test+0x427bae)
    #5 0x427709 (/workspace/test+0x427709)
    #6 0x4272fb (/workspace/test+0x4272fb)
    #7 0x446da5 (/workspace/test+0x446da5)
    #8 0x42695d (/workspace/test+0x42695d)
    #9 0x7f24e8ab7c86 (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #10 0x4054d9 (/workspace/test+0x4054d9)

    UndefinedBehaviorSanitizer can not provide additional info.
    ==1==ABORTING

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    It's fairly easy in python too btw, but I think there is a checking error about whitch I have already commented

  • Default User Avatar

    Oh sry i changed it to main lol
    TYSM

  • Default User Avatar

    So basically I pass all of the tests, byt then this message appears in STDERR:
    Traceback (most recent call last):
    File "/workspace/default/tests.py", line 2, in
    from solution import calculate
    ImportError: cannot import name 'calculate' from 'solution' (/workspace/default/solution.py)

    and it won't accept my code even tho I passed all of the tests.
    Pls help I was rly hype, cuz it's my first lvl 4 cata :)
    I can send you my code for debugging purposes if it turns out it's somhow not my mistake lol.

  • Default User Avatar

    This code passes all of basic and advanced test, but fail some of the random ones, and I don't know why.
    def type_validation(variable, _type):
    a = str(type(variable))
    a = a.removeprefix("<class '")
    a = a.removesuffix("'>")
    return _type == a