What does this ghostscript error means undefinedfilename in - c

I want to run the Ghostscript command for drawing lines from a C program. I am using execlp() system call to run the command. When I am trying to run the command for line drawing from terminal/C, I am getting the same error like this:
GPL Ghostscript 9.55.0 (2021-09-27)
Copyright (C) 2021 Artifex Software, Inc. All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Error: /undefinedfilename in (100)
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:761/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.55.0: Unrecoverable error, exit code 1
The command I am running for drawing is this postscript command(drawing a line)
gs 100 100 moveto 300 300 lineto closepath stroke

You need to add the flag "-c".
The gs command will then be
gs -c 100 100 moveto 300 300 lineto closepath stroke

Related

Oracle Database: plshprof procudes incomplete HTML for DBMS_HPROF-Profiler trace file

Moin,
I used the Oracle-Profiler from the DBMS_HPROF package a lot to find out where the right queries to optimize.
This time I ran into a problem, even though it seems to be setup correctly.
Profiling even complex parts of the application I try to optimize produce trace files that are processed without any issues by the plshprof tool that produces the HTML reports from the trace files.
When I profile this one particular procedure it produces a trace file that seems ok (it is properly ended and so).
But when I use plshprof on it, out comes always an HTML file that ends after 12542 Bytes (no, the drive is not full).
I tried executing an additional query before the problematic procedure and the result was that the HTML ended again after exactly 12542 Bytes.
In one case the HTML ended in the middle of an attribute of a tag in the other before the > of the ending tag.
From the beginning to the EOF the HTML report looks ok!
Windows Server 2019 Build 1809
Oracle Database Version: 19c (19.3) Standard Edition 2
This is how I called the profiler and the procedure:
BEGIN
DBMS_HPROF.START_PROFILING(LOCATION=>'PLSHPROF_DIR', FILENAME=> 'test1.trc');
SOME_PACKAGE.SOME_PROCEDURE();
COMMIT;
DBMS_HPROF.STOP_PROFILING;
END;
/
This how I called it:
C:\TEMP>plshprof test1.trc
PLSHPROF: Release 19.0.0.0.0 - Production on Do Mrz 24 12:04:00 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
[160 symbols processed]
C:\TEMP>echo %ERRORLEVEL%
-1073741819
C:\TEMP>plshprof
PLSHPROF: Release 19.0.0.0.0 - Production on Fr Mrz 25 11:56:20 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Usage: plshprof [<option>...] <tracefile1> [<tracefile2>]
Options:
-trace <symbol> (no default) specify function name of tree root
-skip <count> (default=0) skip first <count> invokations
-collect <count> (default=1) collect info for <count> invokations
-output <filename> (default=<symbol>.html or <tracefile1>.html)
-summary print time only
C:\TEMP>
As you can see last line of the output is missing and there is an error code but there is no error message nor any switch to verbose the output of the tool.
C:\TEMP>plshprof test2.trc
PLSHPROF: Release 19.0.0.0.0 - Production on Do Mrz 24 12:41:17 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
[12 symbols processed]
[Report written to 'test2.html']
C:\TEMP>echo %ERRORLEVEL%
0
The trace file seems to end properly:
P#C SQL."SCHEMANAME"."SOME_PACKAGE"::11."__static_sql_exec_line133" #133."8ggw94h7mvxd7"
P#! COMMIT
P#X 79
P#R
P#X 17
P#R
P#C SQL."".""."__static_sql_exec_line8" #8."8ggw94h7mvxd7"
P#! COMMIT
P#X 160
P#R
P#C PLSQL."SYS"."DBMS_HPROF"::11."STOP_PROFILING"#980980e97e42f8ec #747
P#R
P#! PL/SQL Timer Stopped
Did anybody ever ran into this problem and/or found out what is/was the problem?
I can imagine it has to do with the complexity of the function tree called but I am not able to figure out where to start.
The procedure uses several packages and reads and writes from and to tables and views with triggers which also call functions that do the same.
Thanks in advance!

ORB SLAM 3 - Implementation

I'm trying to run ORB-SLAM3 and I keep getting the following error messages:
ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.
Input sensor was set to: Stereo
Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!
Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name:
Camera Parameters:
fx: 435.20468139648438
fy: 435.20468139648438
cx: 367.45172119140625
cy: 252.20085144042969
bf: 47.906394958496094
k1: 0
k2: 0
p1: 0
p2: 0
fps: 20
color order: RGB (ignored if grayscale)
ORB Extractor Parameters:
Number of Features: 1200
Scale Levels: 8
Scale Factor: 1.2000000476837158
Initial Fast Threshold: 20
Minimum Fast Threshold: 7
Depth Threshold (Close/Far Points): 3.8527247905731201
Failed to load image at: /home/yz2qmq/ORB_SLAM3/V1_01_easy/MH01/mav0/cam0/data/1403636579763555584.png
./euroc_eval_examples.sh: line 16: 20460 Segmentation fault (core dumped) ./Examples/Stereo/stereo_euroc ./Vocabulary/ORBvoc.txt ./Examples/Stereo/EuRoC.yaml "$pathDatasetEuroc"/MH01 ./Examples/Stereo/EuRoC_TimeStamps/MH01.txt "$pathDatasetEuroc"/MH02 ./Examples/Stereo/EuRoC_TimeStamps/MH02.txt "$pathDatasetEuroc"/MH03 ./Examples/Stereo/EuRoC_TimeStamps/MH03.txt "$pathDatasetEuroc"/MH04 ./Examples/Stereo/EuRoC_TimeStamps/MH04.txt "$pathDatasetEuroc"/MH05 ./Examples/Stereo/EuRoC_TimeStamps/MH05.txt dataset-MH01_to_MH05_stereo
Evaluation of MAchine Hall trajectory with Stereo sensor
Traceback (most recent call last):
File "evaluation/evaluate_ate_scale.py", line 151, in
second_list = associate.read_file_list(args.second_file, False)
File "/home/yz2qmq/ORB_SLAM3/evaluation/associate.py", line 64, in read_file_list
file = open(filename)
IOError: [Errno 2] No such file or directory: 'f_dataset-MH01_to_MH05_stereo.txt'
Launching V102 with Monocular-Inertial sensor
num_seq = 1
file name: dataset-V102_monoi
Loading images for sequence 0...LOADED!
I made the changes required in the euroc_eval_examples.sh and change it by the dataset path!
Can someone help me with this issue?
Had the Same prob here.
I just had the path and its syntax all messed UP.
Try to run the whole thing with this command:
./Examples/Monocular/mono_euroc ./Vocabulary/ORBvoc.txt ./Examples/Monocular/EuRoC.yaml "$pathDatasetEuroc"/MH01 ./Examples/Monocular/EuRoC_TimeStamps/MH01.txt dataset-MH01_mono
And where it says "$pathDatasetEuroc" make sure you put the right path before MH01, in which there should only be the mav0 folder.
In your case should be /home/yz2qmq/ORB_SLAM3/V1_01_easy
----> ./Examples/Monocular/mono_euroc ./Vocabulary/ORBvoc.txt ./Examples/Monocular/EuRoC.yaml /home/yz2qmq/ORB_SLAM3/V1_01_easy/MH01 ./Examples/Monocular/EuRoC_TimeStamps/MH01.txt dataset-MH01_mono
That at least worked for me.
It is exactly the same thing as running ./euroc_examples.sh, and you will realize it easily if you open and read briefly euroc_examples.sh.
(This btw is a guide which actually worked for me only after following it blindly :( https://www.ybliu.com/2020/07/ORB-SLAM3-demo.html)

LateX on Mac: Texmaker can't find installed package

I have a Mac and just installed LaTeX and the editor Texmaker. To use the Arial font I installed it via MiKTeX Console. I also found out that by doing so, the files for the installed packages lay here:
"/Users/Mirko/Library/Application Support/MiKTeX/texmfs/install/tex/latex"
My problem is that the Editor (TeXMaker) still doesn't find the Arial-Font.
Here is my Code:
\documentclass[pdftex,openany,11pt,twoside,a4dutch]{report}
\usepackage{uarial}
\usepackage{csquotes}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes} % Setzen von Anführungsstrichen
\begin{document}
This is a test.
\end{document}
and here is the Error:
! LaTeX Error: File `uarial.sty' not found.Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: sty)Enter file name:! Emergency stop.<read > \usepackage
But the folder arial and the file arial.sty are in the above mentioned folder.
In the MikTeX-Console I already entered the folder to Directories > Settings
I thankful for every help!
Thanks and greetings!
Here is the log-file from TexMaker:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex 2019.10.27) 27 OCT 2019 13:34
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2018-12-01>
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/report.cls
Document Class: report 2018/09/03 v1.4i Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\c#part=\count80
\c#chapter=\count81
\c#section=\count82
\c#subsection=\count83
\c#subsubsection=\count84
\c#paragraph=\count85
\c#subparagraph=\count86
\c#figure=\count87
\c#table=\count88
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
! LaTeX Error: File `uarial.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.5 \usepackage
{csquotes}^^M
*** (cannot \read from terminal in nonstop modes)
Here is how much of TeX's memory you used:
221 strings out of 492616
2365 string characters out of 6129480
60608 words of memory out of 5000000
4231 multiletter control sequences out of 15000+600000
3940 words of font info for 15 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
21i,0n,22p,110b,36s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!
As you can see from the first line of the log file
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019)
texmaker is not using the miktex distribution for which you installed the uarial package, but a texlive distribution which seems to be also installed on your computer. In the long run it would be best to only have a single tex distribution on your computer to avoid such problems. For mac I would suggest to keep the texlive distribution and get rid of miktex, because texlive is used by most mac users and therefore well tested compared to miktex for mac.
Now you could force texmaker to use your miktex installation by modifying the texmaker preferences, but the easier way to use Arial in your document is to switch from pdflatex to xelatex or lualatex and directly use the arial font installed on your computer
% !TeX TS-program = xelatex
\documentclass[openany,11pt,twoside,a4dutch]{report}
\usepackage{fontspec}
\setmainfont{Arial}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\begin{document}
This is a test.
\end{document}

Jenkins - OpenCover batch command cant find pdb files

I am trying to follow these instructions for my system and am as far as step 8 (unit tests & coverage).
When I execute this command on the server it works succesfully:
"C:\Program Files (x86)\OpenCover\OpenCover.Console.exe" -register:user -target:"C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" -targetargs:"C:\workspace\Extensions\Extensions\ExtensionTests\bin\Debug\ExtensionsTests.dll -result=TestResult.xml;format=nunit2" -filter:+
If I add it as a Jenkins Batch command step I get:
"C:\Program Files (x86)\OpenCover\OpenCover.Console.exe" -register:user -target:"C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" -targetargs:"C:\workspace\Extensions\Extensions\ExtensionTests\bin\Debug\ExtensionsTests.dll -result=TestResult.xml;format=nunit2" -filter:+
Executing: C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe
NUnit Console Runner 3.8.0
Copyright (c) 2018 Charlie Poole, Rob Prouse
Runtime Environment
OS Version: Microsoft Windows NT 6.3.9600.0
CLR Version: 4.0.30319.42000
Test Files
C:\workspace\Extensions\Extensions\ExtensionTests\bin\Debug\ExtensionsTests.dll
Run Settings
DisposeRunners: True
WorkDirectory: c:\workspace\Extensions
ImageRuntimeVersion: 4.0.30319
ImageTargetFrameworkName: .NETFramework,Version=v4.6.1
ImageRequiresX86: False
ImageRequiresDefaultAppDomainAssemblyResolver: False
NumberOfTestWorkers: 2
Test Run Summary
Overall result: Passed
Test Count: 37, Passed: 37, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0
Start time: 2018-02-23 10:40:58Z
End time: 2018-02-23 10:40:59Z
Duration: 1.106 seconds
Results (nunit2) saved as TestResult.xml
Committing...
No results, this could be for a number of reasons. The most common reasons are:
1) missing PDBs for the assemblies that match the filter please review the
output file and refer to the Usage guide (Usage.rtf) about filters.
2) the profiler may not be registered correctly, please refer to the Usage
guide and the -register switch.
I have tried setting the Jenkins to run under my ID and allowed it to interact with the desktop.
Can someone point me in the right direction to get it running please?
Ahh so I found the answer from this question, I just needed to move a quote to give:
"C:\Program Files (x86)\OpenCover\OpenCover.Console.exe" -register:user -target:"C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" -"targetargs:C:\workspace\Extensions\Extensions\ExtensionTests\bin\Debug\ExtensionsTests.dll -result=TestResult.xml;format=nunit2" -filter:+
Which works!

Emacs - GDB trace right to interrupt without stepping through all files

I am working on Pintos OS project. I get this message:
Page fault at 0xbfffefe0: not present error writing page in user context.
The problem with Pintos OS project is that it won't simply tell the line and method that caused the exception.
I know how to use breakpoints/watchpoints etc. but is there any way to step right to it without going through the WHOLE flow and ALL OS files line by line so that I could jump into line that caused exception and put breakpoint there? I looked at GDB commands but didn't find anything.
When I debug this project I have to step through the whole program until I find that error/exception which is very time consuming. There is probably a faster way to do this.
Thanks.
Whole trace:
nestilll#vdebian:~/Class/pintos/proj-3-bhling-nestilll-nsren/src/vm/build$ pintos -v -k -T 60 --qemu --gdb --filesys-size=2 -p tests/vm/pt-grow-pusha -a pt-grow-pusha --swap-size=4 -- -q -f run pt-grow-pusha
Use of literal control characters in variable names is deprecated at /home/nestilll/Class/pintos/src/utils/pintos line 909.
Prototype mismatch: sub main::SIGVTALRM () vs none at /home/nestilll/Class/pintos/src/utils/pintos line 933.
Constant subroutine SIGVTALRM redefined at /home/nestilll/Class/pintos/src/utils/pintos line 925.
warning: disabling timeout with --gdb
Copying tests/vm/pt-grow-pusha to scratch partition...
qemu -hda /tmp/N2JbACdqyV.dsk -m 4 -net none -nographic -s -S
PiLo hda1
Loading............
Kernel command line: -q -f extract run pt-grow-pusha
Pintos booting with 4,088 kB RAM...
382 pages available in kernel pool.
382 pages available in user pool.
Calibrating timer... 419,020,800 loops/s.
hda: 13,104 sectors (6 MB), model "QM00001", serial "QEMU HARDDISK"
hda1: 205 sectors (102 kB), Pintos OS kernel (20)
hda2: 4,096 sectors (2 MB), Pintos file system (21)
hda3: 98 sectors (49 kB), Pintos scratch (22)
hda4: 8,192 sectors (4 MB), Pintos swap (23)
filesys: using hda2
scratch: using hda3
swap: using hda4
Formatting file system...done.
Boot complete.
Extracting ustar archive from scratch device into file system...
Putting 'pt-grow-pusha' into the file system...
Erasing ustar archive...
Executing 'pt-grow-pusha':
(pt-grow-pusha) begin
Page fault at 0xbfffefe0: not present error writing page in user context.
pt-grow-pusha: dying due to interrupt 0x0e (#PF Page-Fault Exception).
Interrupt 0x0e (#PF Page-Fault Exception) at eip=0x804809c
cr2=bfffefe0 error=00000006
eax=bfffff8c ebx=00000000 ecx=0000000e edx=00000027
esi=00000000 edi=00000000 esp=bffff000 ebp=bfffffa8
cs=001b ds=0023 es=0023 ss=0023
pt-grow-pusha: exit(-1)
Execution of 'pt-grow-pusha' complete.
Timer: 71 ticks
Thread: 0 idle ticks, 63 kernel ticks, 8 user ticks
hda2 (filesys): 62 reads, 200 writes
hda3 (scratch): 97 reads, 2 writes
hda4 (swap): 0 reads, 0 writes
Console: 1359 characters output
Keyboard: 0 keys pressed
Exception: 1 page faults
Powering off...
to have the GDB debugger run and stop at the desired location:
gdb filename <--start debug session
br main <--set a breakpoint at the first line of the main() function
r <--run until that breakpoint is reached
br filename.c:linenumber <--set another breakpoint at the desired line of code
c <--continue until second breakpoint is encuntered
The debugger will stop at the desired location in the file, IF it ever actually gets there,
When I debug this project I have to step through the whole program
until I find what caused error/exception which is very time consuming.
There is probably a faster way to do this.
Normally what you would do is set a breakpoint just before the error. Then your program will run at full speed, without your intervention, until it reaches that point.
There are several wrinkles here.
First, sometimes it is difficult to know where to put the breakpoint. In this case I suppose I would look for the code that is printing the message, then work backward from there. Sometimes you have to stop at the failure point, examine the stack, set a new breakpoint further up, and re-run the program.
Then there is the mechanics of setting the breakpoint. One simple way is to break by function name, like break my_function. Another is to use the file name and line number, like break my_file.c:73.
Finally, sometimes a breakpoint can be hit many times before the failure is seen. You can use ignore counts (see help ignore) or conditional breakpoints (like break my_function if variable = 27) to limit the number of stops.

Resources