dmitryponv

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: Problems with OpenCV #28008
    dmitryponv
    Participant

    Hello,

    I am following tutorial
    https://visualgdb.com/tutorials/raspberry/opencv/

    It compiles and links correctly, but never enters a breakpoint on the first line in main() function

    The call stack shows the following which I pause debugger

    > do_lookup_x() C++ (gdb)
    _dl_lookup_symbol_x() C++ (gdb)
    elf_machine_rel() C++ (gdb)
    elf_dynamic_do_Rel() C++ (gdb)
    _dl_relocate_object() C++ (gdb)
    dl_main() C++ (gdb)
    _dl_sysdep_start() C++ (gdb)
    _dl_start_final() C++ (gdb)
    _dl_start() C++ (gdb)
    ld-linux-armhf.so.3!_start()

    I can breakpoint without issues if I don’t use OpenCV

    If I try to launch the application through SSH, it doesn’t display anything

    Attachments:
    You must be logged in to view attached files.
    in reply to: Problems with OpenCV #27986
    dmitryponv
    Participant

    WEll right now your tutorial is not working because of this issue, I posed the bug on OpenCV github, I would recommend adding a workaround such as disabling the ADE module

    dmitryponv
    Participant

    Thanks

    But why is the Intellisense option completely greyed out and how can I enable the search features of Visual Studio 2017?

    The Expiration date was in January 2018, so the version I’m using should be fully compatible with VS 2017

    Thank you,

    in reply to: Prevent VisualStudio lock up when launching debugger #7464
    dmitryponv
    Participant

    Yes my binary is around 40 mb in size.
    The compilation time is not an issue, but the deployment constantly interrupts me when I’m writing code. It would be really nice to have a feature to launch it in the background.

    Same issue with a pop up window that says “Searchign for a matchign source file” when trying to open some object definitions. The built-in Visual studio search all function is actually much faster than intellisense search.

    Thanks,

    • This reply was modified 8 years, 9 months ago by dmitryponv.
    in reply to: cc1plus.exe: out of memory allocating 65536 bytes #7047
    dmitryponv
    Participant

    Hello there,

    I have found a temporary workaround to enable 3gB user space addressing.

    Will need to open command prompt as an administrator, then type

    bcdedit /set IncreaseUserVa 3072

    Followed by

    cd C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
    editbin /LARGEADDRESSAWARE "C:\SysGCC\raspberry\libexec\gcc\arm-linux-gnueabihf\4.9\cc1plus.exe"

    The first part enables 3gB user space for 32 bit applications globally. This might not need be done on Windows 64bit, I think it sets it automatically as long as the application is LargeAddressAware flag set

    However, cc1plus.exe does not have largeaddressaware set during compilation, so you will need to set this flag manually. The second command is what does this using a Visual Studio tool editbin.exe

    The actual path to this application may be different depending on what version of Visual Studio is used.

    This is a temporary workaround because the application may exceed 3gB usage on a per-case scenarion.

    Luckily the cc1plus.exe memory usages is on a per-file basis, and it resets when it begins compiling a new file. So it will only be a problem if there are a lot of nested includes in 1 cpp file.

    Thanks,

    dmitryponv
    Participant

    I wanted to follow up on this issue

    intellisense and autocomplete (Visual Studio, or CLang) don’t work at all.

    1. When using auto variables,
    2. When using nested classes and calling objects using . or ->
    3. When using templatized classes of any kind

    It seems that intellisense is only able to pick up immediate class names, if that class contains objects that are defined in it’s headers, I/S won’t be able to recognize them

    All bets are off when using the auto definition, this basically makes Visual Studio 2013 as helpful as Notepad++

    VisualGDB + Visual Studio are still by far the best and the most problem free debugging environment I used, and it’s way less problematic than Eclipse.
    However, Eclipse has no problems recognizing objects embedded in a chain of classes (class1->class2.class3…etc) or using auto

    I’m hoping that someday VisualGDB will be better than Eclipse in autocomplete and intellisense,
    Thanks,

    • This reply was modified 9 years, 1 month ago by dmitryponv.
    dmitryponv
    Participant

    I already provided an example above.

    Here is another:

    When I have a header file “Class2.h” included in the header file “Class1.h”.

    In the cpp file “Class1.cpp” for that class I have a variable “Class2 myClass2”

    Although Class2 shows up green, I cannot right click on it to get to “Class2.h” header file

    Sometimes this works, and sometimes this doesn’t. It seems really buggy, and even when trying to get to the definition in the same header file, Clang Intellisense still has to parse the entire project.

    It seems Eclipse is way better at this,

    Thanks

    dmitryponv
    Participant

    Hi.

    They are not in the same directory, but I did include every folder in intellisense search list using the previous workaround.

    I am fine with this being a permanent solution,

    However this is the problem I am having:

    The header file (Test.h) includes a header for another class (ExampleClass.h)
    If I write a function in Test.h, I can get intellisense context for ExampleClass

    However, if I write that same function in Test.cpp, which includes Test.h, I cannot get the same Context from Intellisense.

    In other words, it seems that intellisense is not looking for context in header files included in the header file of the class being used.

    Thanks,

    dmitryponv
    Participant

    As a temporary workaround for this, I used a command prompt command to list all directories within the project and add them individually to Project->Properties->Con figuration Properties->NMake under Intellisense Search Path

    The prompt command to save all directory names is dir /s /b /o:n /ad > list.txt

    However, this required me to add more than 50 directories, and this number constantly changes, I would need a better solution to have intellisense automatically recognize all header files in the project.
    This also doesn’t work very well,

    For example, if I have a Source.cpp file and a source.h file.

    In Source.h I will “#include ObjectClass.h” and define an ObjectClass ObjectA;

    In Source.cpp, which has “#include Source.h” I will use ObjectA.TestFunction();

    In Source.h I can right click on ObjectClass and it will display ObjectClass.h definition of that class

    However in Source.cpp, ObjectA appears as: error: this object class has no storage class or type specifier

    What could be wrong here, neither Visual Studio nor CLang Intellisese can pick up definitions in the included headers

    EDIT: After deleting *.sdf file inside the VS project directory, and restarting Visual Studio with CLang settings enabled, it started working a lot better,

    I still cannot have to include all the directories manually int he final project,

    Thanks,

    • This reply was modified 9 years, 3 months ago by dmitryponv.
    • This reply was modified 9 years, 3 months ago by dmitryponv.
    in reply to: Bug Submission – Possible Feature Improvement. #6787
    dmitryponv
    Participant

    Ok I figured out a way around this if anybody is havingthe same problem:

    Simply, create a cmake.bat file next to cmake.exe in C:\Program Files (x86)\CMake\bin

    Into it, enter (this is from the above example)

    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_TOOLCHAIN_FILE="../armtoolchain-vs.cmake" -DCMAKE_MAKE_PROGRAM="C:/SysGCC/raspberry/bin/make.exe" ../source
    echo 

    Then in VisualGDB properties enter “C:\Program Files (x86)\CMake\bin\cmake.bat” for Command Line instead of cmake.txt

    This will cause the hard-coded arguments to be appended to the echo command instead of the cmake.exe command

    However, entering echo into the arguments list does not work the same way,

    I am looking for something line a ENTER or CR to force a carriage return before the echo command directly in the Arguments list, to make this a bit easier to set up.

    Thank you,

    • This reply was modified 9 years, 3 months ago by dmitryponv.
    • This reply was modified 9 years, 3 months ago by dmitryponv.
    in reply to: Bug Submission – Possible Feature Improvement. #6786
    dmitryponv
    Participant

    To Add to this Feature Request/Bug

    The CMake command is mostly hard-coded, and when adding Arguments, they are added to the beginning of the command, not the end, so adding ../source/ makes it

    Run "C:\Program Files (x86)\CMake\bin\cmake.exe ../source -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_COLOR_MAKEFILE=OFF .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_TOOLCHAIN_FILE=toolchain-Debug.cmake -DCMAKE_MAKE_PROGRAM="C:/SysGCC/raspberry/bin/make.exe""

    Which is evidently pretty useless, because it tries to run everything from the source folder. Instead

    Another problem is the flags are hard-coded and impossible to change.

    For example: the -DCMAKE_TOOLCHAIN_FILE=toolchain-Debug.cmake flag remains the same in the command line, even when I remove toolchain-Debug.cmake from CMake Files in the Solution Explorer and add my armtoolchain-vs.cmake

    It would be good to be able to edit the CMake.exe command line entirely

    Thank you,

    in reply to: Linking Symbolic Link Paths to Windows Directory #6785
    dmitryponv
    Participant

    Ok thank you,

    I fixed it by setting SysRoot directly in the toolchain-Debug.cmake file

    SET(CMAKE_SYSROOT D:/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi)

Viewing 12 posts - 1 through 12 (of 12 total)