These are chat archives for mono/monodevelop

19th
Feb 2016
frankchang91
@frankchang91
Feb 19 2016 01:03
@DavidKarlas , Here is how I set a relative gdb breakpoint in unmanaged C++ code: break ./FreshInstallCameraList.cpp:205. May I ask how to run to the next breakpoint? Thank you.
Mohamed Alzaki
@GoldenWings
Feb 19 2016 02:09
Any body here?
I need help regarding compiling monodevelop i am using ubuntu 14.04
when i try to make "make "
It Shows
if test -d ".git"; then \
        git submodule sync; \
        git submodule update --init --recursive || exit 1; \
    fi
make[1]: Entering directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main'
Making all in external
make[2]: Entering directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main/external'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main/external'
Making all in .
make[2]: Entering directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main'
if test -f "./buildinfo"; then cp "./buildinfo" "./build/bin/buildinfo"; else ./../scripts/configure.sh gen-buildinfo "./build/bin"; fi
System.ComponentModel.Win32Exception: ApplicationName='git', CommandLine='blame version.config', CurrentDirectory='/home/mohamed/Development/MonoDevelop/monodevelop-master', Native error= Cannot find the specified file
  at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) <0x415187f0 + 0x00fe3> in <filename unknown>:0 
  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) <0x41518640 + 0x000db> in <filename unknown>:0 
  at System.Diagnostics.Process.Start () <0x415185c0 + 0x0004b> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
  at MonoDevelop.Configuration.SystemUtil.RunProcess (System.String file, System.String args, System.String workingDir) <0x41517800 + 0x002cb> in <filename unknown>:0 
  at MonoDevelop.Configuration.IdeConfigurationTool.GetVersionCommitDistance (System.String path) <0x415175d0 + 0x0002f> in <filename unknown>:0 
  at MonoDevelop.Configuration.IdeConfigurationTool..ctor (System.String monoDevelopPath) <0x414efe00 + 0x0028b> in <filename unknown>:0 
  at MonoDevelop.Configuration.Program.Main (System.String[] args) <0x414eed60 + 0x000d3> in <filename unknown>:0 
make[2]: *** [build/bin/buildinfo] Error 1
make[2]: Leaving directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main'
make: *** [all-recursive] Error 1
ArsenShnurkov
@ArsenShnurkov
Feb 19 2016 03:06
GoldenWings: make dist
Mohamed Alzaki
@GoldenWings
Feb 19 2016 03:29
@ArsenShnurkov Thanks for your reply
Now it shows. pretty much the same error...
make[1]: Entering directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main'
if test -f "./buildinfo"; then cp "./buildinfo" "./build/bin/buildinfo"; else ./../scripts/configure.sh gen-buildinfo "./build/bin"; fi
System.ComponentModel.Win32Exception: ApplicationName='git', CommandLine='blame version.config', CurrentDirectory='/home/mohamed/Development/MonoDevelop/monodevelop-master', Native error= Cannot find the specified file
  at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) <0x40c917f0 + 0x00fe3> in <filename unknown>:0 
  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) <0x40c91640 + 0x000db> in <filename unknown>:0 
  at System.Diagnostics.Process.Start () <0x40c915c0 + 0x0004b> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
  at MonoDevelop.Configuration.SystemUtil.RunProcess (System.String file, System.String args, System.String workingDir) <0x40c90800 + 0x002cb> in <filename unknown>:0 
  at MonoDevelop.Configuration.IdeConfigurationTool.GetVersionCommitDistance (System.String path) <0x40c905d0 + 0x0002f> in <filename unknown>:0 
  at MonoDevelop.Configuration.IdeConfigurationTool..ctor (System.String monoDevelopPath) <0x40c68e00 + 0x0028b> in <filename unknown>:0 
  at MonoDevelop.Configuration.Program.Main (System.String[] args) <0x40c67d60 + 0x000d3> in <filename unknown>:0 
make[1]: *** [build/bin/buildinfo] Error 1
make[1]: Leaving directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main'
make: *** [dist] Error 2
ArsenShnurkov
@ArsenShnurkov
Feb 19 2016 03:37
Mohamed Alzaki
@GoldenWings
Feb 19 2016 03:43
I installed git now
make[1]: Entering directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main'
if test -f "./buildinfo"; then cp "./buildinfo" "./build/bin/buildinfo"; else ./../scripts/configure.sh gen-buildinfo "./build/bin"; fi
/usr/bin/git failed
make[1]: *** [build/bin/buildinfo] Error 1
make[1]: Leaving directory `/home/mohamed/Development/MonoDevelop/monodevelop-master/main'
make: *** [dist] Error 2
ArsenShnurkov
@ArsenShnurkov
Feb 19 2016 03:48
no more ideas, i use portage package manager, not apt-get
Mohamed Alzaki
@GoldenWings
Feb 19 2016 03:49
Oh thanks i will try to play around until i get it fixed, this is weired...
David Karlaš
@DavidKarlas
Feb 19 2016 04:29
@GoldenWings where did you get source code?
Mohamed Alzaki
@GoldenWings
Feb 19 2016 04:29
github
David Karlaš
@DavidKarlas
Feb 19 2016 04:29
I recommend checking it out via git from https://github.com/mono/monodevelop
but via git clone?
Mohamed Alzaki
@GoldenWings
Feb 19 2016 04:30
No i downloaded it as a zip
David Karlaš
@DavidKarlas
Feb 19 2016 04:30
do git clone
this feels like bug in makefile
Mohamed Alzaki
@GoldenWings
Feb 19 2016 04:31
Okie im cloning it right now
David Karlaš
@DavidKarlas
Feb 19 2016 04:31
so problem is this...
buildinfo file contains version.. which is calculated via git commits difference since last change on version file
6.0.0.xxxx that xxxx part...
Mohamed Alzaki
@GoldenWings
Feb 19 2016 04:33
aha i get it now.
David Karlaš
@DavidKarlas
Feb 19 2016 04:33
in case of tarball or w/e that linux way of distributing source code
it’s calculated when it’ created
github .zip doesn’t include this :(
logically..
Mohamed Alzaki
@GoldenWings
Feb 19 2016 04:34
I see
David Karlaš
@DavidKarlas
Feb 19 2016 04:34
maybe we should have some kind of fallback
frankchang91
@frankchang91
Feb 19 2016 06:08
@DavidKarlas, How about gdb with fork ? I want to follow the child process. Does mono fork a child process? Thank you.
David Karlaš
@DavidKarlas
Feb 19 2016 06:10
I don’t know how gdb handles forks, mono itself doesn’t fork processes except if your code does...
frankchang91
@frankchang91
Feb 19 2016 06:13
@DavidKarlas , Thank you for your reply. if mono itself doesn’t fork processes , how does mono launch ./xyz.exe as in /usr/bin/mono/mono ./xyz.exe? When I set breakpoint, gdb says continuing and suspends indefinitely.
David Karlaš
@DavidKarlas
Feb 19 2016 06:14
your xyz.exe is loaded inside mono process and executed as one
no forking
frankchang91
@frankchang91
Feb 19 2016 06:15
@DavidKarlas , how do I fix When I set breakpoint and type continue, gdb says continuing and suspends indefinitely.
David Karlaš
@DavidKarlas
Feb 19 2016 06:16
well thats GDB question and I don’t know
frankchang91
@frankchang91
Feb 19 2016 06:26
@DavidKarlas , Do I have to install anything on Ubuntu as Jacek said?
David Karlaš
@DavidKarlas
Feb 19 2016 06:27
thats question for Jacek
frankchang91
@frankchang91
Feb 19 2016 06:30
@DavidKarlas , How do I Monodevelop of mono launch ./xyz.exe as in /usr/bin/mono/mono ./xyz.exe? Thank you.
@DavidKarlas , In order to debug unmanaged exe's code?
David Karlaš
@DavidKarlas
Feb 19 2016 06:31
can you rephrase please?
you want to get pid of mono that loaded your xyz.exe?
use process manager to find correct mono
by checking parameters that include xyz.exe
frankchang91
@frankchang91
Feb 19 2016 06:33
@DavidKarlas, Thank you. Once I get the right pid, what do we do next?
David Karlaš
@DavidKarlas
Feb 19 2016 06:33
gdb attach...
frankchang91
@frankchang91
Feb 19 2016 06:38
@DavidKarlas , Is the mono process of interest /usr/bin/mono --debug --debugger-agent? Thank you.
David Karlaš
@DavidKarlas
Feb 19 2016 06:39
yes
frankchang91
@frankchang91
Feb 19 2016 06:40
@DavidKarlas , what do I do after gdb attach? Thank you.
David Karlaš
@DavidKarlas
Feb 19 2016 06:41
google "gdb debugging”
frankchang91
@frankchang91
Feb 19 2016 06:54

@DavidKarlas , Thank you for your expert advice. we are getting closer to debugging unmanaged process. Please take a look at this transcript . venkat@venkat-ThinkStation-S10:~/InteroperabilityTest/MySQLVersion/Debug$ sudo gdb ./BuildIPCameraListLinux.exe 7232
GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./BuildIPCameraListLinux.exe...(no debugging symbols found)...done.
Attaching to program: /home/venkat/InteroperabilityTest/MySQLVersion/Debug/BuildIPCameraListLinux.exe, process 7232

warning: Selected architecture i386 is not compatible with reported target architecture i386:x86-64

warning: Architecture rejected target-supplied description
add-symbol-file-from-memory not supported for this target
0x44f4fda0 in ?? ()
(gdb) step
Cannot find bounds of current function

David Karlaš
@DavidKarlas
Feb 19 2016 06:56
do
gdb 7232
without that "./BuildIPCameraListLinux.exe"
frankchang91
@frankchang91
Feb 19 2016 07:14

@DavidKarlas , Thank you very much for your help. We are almost good to proceed. Please look at this transcript and advise us how we can help you tomorrow night.~/InteroperabilityTest/MySQLVersion/Debug$ sudo gdb 7575
GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
7575: No such file or directory.
(gdb) file BuildIPCameraListLinux.exe
Reading symbols from BuildIPCameraListLinux.exe...(no debugging symbols found)...done.
(gdb) break ClickItCameraList.cpp:176
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (ClickItCameraList.cpp:176) pending.
(gdb) run
Starting program: /home/venkat/InteroperabilityTest/MySQLVersion/Debug/BuildIPCameraListLinux.exe
warning: Selected architecture i386 is not compatible with reported target architecture i386:x86-64
warning: Architecture rejected target-supplied description
add-symbol-file-from-memory not supported for this target
process 7592 is executing new program: /usr/bin/mono-sgen
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff471f700 (LWP 7597)]

Breakpoint 1, CreateSupportedCameraList () at ./ClickItCameraList.cpp:176
176 {
(gdb) step
180 std::map<DEVICE_VENDOR, string, less< int > > vendorMap;
(gdb) step
std::map<DEVICE_VENDOR, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<DEVICE_VENDOR const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::map (
this=0x7fffffffd160) at /usr/include/c++/5/bits/stl_map.h:166
166 : _M_t() { }
(gdb) step
std::_Rb_tree<DEVICE_VENDOR, std::pair<DEVICE_VENDOR const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::_Select1st<std::pair<DEVICE_VENDOR const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::less<int>, std::allocator<std::pair<DEVICE_VENDOR const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::_Rb_tree (this=0x7fffffffd160) at /usr/include/c++/5/bits/stl_tree.h:807
807 _Rb_tree() { }
(gdb) step
std::_Rb_tree<DEVICE_VENDOR, std::pair<DEVICE_VENDOR const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::_Select1st<std::pair<DEVICE_VENDOR const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::less<int>, std::allocator<std::pair<DEVICE_VENDOR const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::_Rb_tree_impl<std::less<int>, false>::_Rb_tree_impl (this=0x7fffffffd160)
at /usr/include/c++/5/bits/stl_tree.h:588
588 _M_node_count(0)
(gdb) continue
Continuing.
I AM HERE
Save OKAY

Program received signal SIGPWR, Power fail/restart.
[Switching to Thread 0x7ffff471f700 (LWP 7597)]
0x00007ffff74b60c9 in futex_abstimed_wait (cancel=true, private=<optimized out>, abstime=0x0, expected=0,
futex=0x98a680 <finalizer_sem>) at sem_waitcommon.c:42
42 sem_waitcommon.c: No such file or directory.
(gdb)

David Karlaš
@DavidKarlas
Feb 19 2016 07:25
you don't need to help me, I'm fine
frankchang91
@frankchang91
Feb 19 2016 07:28
@DavidKarlas , I hope to chat with you here in the future. Is this the gist of the Monodevelop Unmanaged Code debugging changes? Thank you.
hellboy81
@hellboy81
Feb 19 2016 12:52
How can I disable pdb file generation in MonoDevelop?
due on long paths
I still have issue with f..ing breakpoints
Unit Tests needed
Alexander Köplinger
@akoeplinger
Feb 19 2016 12:53
you'll need the debug files for that, so don't disable them
hellboy81
@hellboy81
Feb 19 2016 12:53
?
Alexander Köplinger
@akoeplinger
Feb 19 2016 12:53
if you want to debug your code, you'll need the debug symbols (.mdb)
hellboy81
@hellboy81
Feb 19 2016 12:55
I should strip full paths from StackTrace, this info cannot be shown on MessageBox-Dialog completely
I Windows / .NET MessageBox - Windows is resized to fit content
Alexander Köplinger
@akoeplinger
Feb 19 2016 12:56
should be doable via a simple regex
hellboy81
@hellboy81
Feb 19 2016 12:58

if you want to debug your code,

I am still have a trouble with breakpoints during debugging in MD therefore debug symbols are not necessary

I need to get file name and line number info from from stacktrace

Alexander Köplinger
@akoeplinger
Feb 19 2016 12:58
yes, for that you absolutely need the debug symbols
hellboy81
@hellboy81
Feb 19 2016 13:00

should be doable via a simple regex

OK, captain!

Alexander Köplinger
@akoeplinger
Feb 19 2016 13:00
make sure in your project options -> build -> compiler the Debug information is set to full
how you show stack traces to your users is a different problem, imho they shouldn't be shown in a UI and instead be written to a logfile
hellboy81
@hellboy81
Feb 19 2016 13:02

be shown in a UI and instead be written to a logfile

In production environment - yes, captain!

Mohamed Alzaki
@GoldenWings
Feb 19 2016 20:22
I managed to compile monodevelop using make
But now i am having trouble while building it.. any help?
Build FAILED.

Warnings:

/home/mohamed/Development/MonoDevelop/monodevelop/main/Main.sln (default targets) ->
(Build target) ->
/home/mohamed/Development/MonoDevelop/monodevelop/main/external/RefactoringEssentials/RefactoringEssentials/RefactoringEssentials.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.Common.targets (GetReferenceAssemblyPaths target) ->

    /usr/lib/mono/4.5/Microsoft.Common.targets:  warning : Unable to find framework corresponding to the target framework moniker '.NETPortable,Version=v4.5,Profile=Profile7'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.

Errors:

/home/mohamed/Development/MonoDevelop/monodevelop/main/Main.sln (default targets) ->
(Build target) ->
/home/mohamed/Development/MonoDevelop/monodevelop/main/external/RefactoringEssentials/RefactoringEssentials/RefactoringEssentials.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.Common.targets (GetReferenceAssemblyPaths target) ->

    /usr/lib/mono/4.5/Microsoft.Common.targets: error : PCL Reference Assemblies not installed.

     1 Warning(s)
     1 Error(s)

Time Elapsed 00:00:05.0075680
make[2]: *** [sln_build] Error 1
make[2]: Leaving directory `/home/mohamed/Development/MonoDevelop/monodevelop/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mohamed/Development/MonoDevelop/monodevelop/main'
make: *** [all-recursive] Error 1
Mohamed Alzaki
@GoldenWings
Feb 19 2016 23:04
Any one?
Alexander Köplinger
@akoeplinger
Feb 19 2016 23:58
@GoldenWings you need to install the PCL reference assemblies, assuming you have the official Mono apt repositories you need to install the referenceassemblies-pcl package