help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave Installer for Windows with Debug Option


From: Stefan Pofahl
Subject: Re: Octave Installer for Windows with Debug Option
Date: Tue, 9 Jun 2020 10:10:20 +0200

Hi Markus,

thanks for the hint to move first to the directory where "octave-gui.exe" is located before starting
dbg.
I followed exactly your procedure.
And I followed an automated procedure.
Both give the same result.
Here my automated procedure to start gdb.exe
------------------------------------------------------------------------------------
DIR_octave_gui = 'C:\Octave\Octave-5.2.0\mingw64\bin';
if exist(DIR_octave_gui, 'dir')
    cd(DIR_octave_gui);
    pwd
end
if ispc
    % windows:
    % cmd.exe /c start "" "C:\Octave\Octave-5.2.0\mingw64\bin\gdb.exe" -p petpid
    s_cmd = sprintf( "cmd.exe /c start \"gdb\" \"C:\\Octave\\Octave-5.2.0\\mingw64\\bin\\gdb.exe\" -p %d", getpid() );
    system(s_cmd);
else
    % unix/linux:
    system(sprintf("gnome-terminal --command 'gdb -p %d'", getpid()), "async");
end
------------------------------------------------------------------------------------

I know exactly where it crashes, it is a function provided by python: Py_Initialize();
To provoke the crash I gave the command:
octave> pycall("sysconfig.get_python_version");

This command is nested inside "pyversion.m".

And this causes troubles only in the octave-gui.exe on Ubuntu and inside octave-cli everything
works fine. And it does not always crash, it crashes at least in 90% of the time.

Attached the screen output from gdb.exe.

Regards,

Stefan


Am Di., 9. Juni 2020 um 09:02 Uhr schrieb Markus Mützel <markus.muetzel@gmx.de>:
Am 09. Juni 2020 um 08:19 Uhr schrieb "Stefan Pofahl":
> Hi,

> here the status on the two objectives: a.) Debug via gdb b.) compile an octave-gui.exe including debug symbols

> a)
> I am working on it.
> * I added 4 breakpoints
> * Interrupted the gdb-terminal: c, ENTER
> * Gave a command in octave-gui.exe
> Strange thing there was no gdb.txt on the entire main drive c:\
>

Where did you set the breakpoints? Do you already know where the crashes occur? Please, try to provide as much necessary details as possible.
Anyway, it shouldn't be necessary to set breakpoints to get the backtrace from a crash.
Here what I think you should do in as much detail as I can possibly manage:
- Start Octave on Windows.
- When it has started, open the "Task Manager" and change to the "Details" tab.
- Look for "octave-gui.exe" in the "Name" column and take note of the corresponding number in the "PID" column.
- Browse to the folder where Octave is installed and execute "cmdshell.bat" to open a shell.
- In that shell, run "gdb"
- At the gdb prompt, enter "attach 12345" (where "12345" is the PID you noted above).
- At that point, the Octave GUI should be irresponsive. If you can still interact with the GUI, you attached to the wrong PID. In this case, quit gdb, close Octave and start from above.
- If you attached to the correct PID, enter "c" at the gdb prompt. The Octave GUI should be responsive again.
- Leave the shell with running gdb in the background. Execute the commands that cause the crash in Octave.
- As soon as the crash happened, change back to the shell with running gdb and enter "bt".
- Copy the backtrace displayed by gdb to a text file and save it.
- Send an email with the saved backtrace to this mailing list.
  
> b)
> unfortunately the build crashed.
> I used exactly the same commands Markus had proposed.
> The problem seems to be that "CMAKE_MAKE_PROGRAM is not set."
> Where should this be done?
>  
> --------------------------------------------------------------------------------------------------------------------
> Failed to build package lapack!
> ------------------------------------------------------------
> CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
> CMake Error: CMAKE_Fortran_COMPILER not set, after EnableLanguage
> CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
> -- Configuring incomplete, errors occurred!
> make[2]: *** [/home/spofahl/hg/mxe-octave/Makefile:940: build-only-lapack] Fehler 1
> make[2]: Verzeichnis „/home/spofahl/hg/mxe-octave“ wird verlassen
> real    0m2.232s
> user    0m1.986s
> sys     0m0.437s
> ----------------------------------------------------------------------------------------------------------------------
>  
> Regards,
>  
> Stefan


Maybe, we should first focus on one problem and come back to the building issues later.

Regards,
Markus

PS: It is customary to use bottom posting or interleaved posting on this mailing list. It is courteous to adapt to that convention:
https://en.wikipedia.org/wiki/Posting_style#Placement_of_replies



--
Stefan Pofahl
Zollgasse 5
8020 Graz
Österreich
Tel.: +43 (316) 33 2001

Attachment: dbg_output.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]