Thanks to visit codestin.com
Credit goes to github.com

Skip to content

JNAerator fails to process throwing 'java.util.concurrent.TimeoutException'. #581

@ThinkCodeHelp

Description

@ThinkCodeHelp

Thank you for your support.

Here is the header file:

#ifndef LINE_OPTIMIZATION_H
#define LINE_OPTIMIZATION_H

#include "opencv2/opencv.hpp"
#include <iostream>
#include <fstream>
#include <string>
#include <map>

class LineOptimization {
public:
    LineOptimization();

    // Load the PGM map
    bool loadMap(const std::string& filePath);

    // Apply noise reduction (Median or Gaussian filter)
    void reduceNoise(int filterType, int kernelSize);

    // Apply Canny edge detection
    void applyCannyEdgeDetection(double lowThreshold, double highThreshold);

    // Apply morphological closing (without edge detection)
    void applyMorphologicalClosing(int kernelSize);

    // Save the optimized map
    bool saveMap(const std::string& outputPath);

    // Display the map (optional)
    void displayMap(const std::string& windowName);

    void connectOccupiedContours(double cannyLowThreshold, double cannyHighThreshold, int hullLineThickness, double maxDistance);

    void fillFreeSpace();

    // Straighten contours to orthogonal lines
    void straightenContours(int epsilon, double contourAreaThreshold);

    // void loadConfig(const std::string& configFilePath);

    void lineOptimization(const std::string& input_directory, const std::string& output_directory, const std::string& map_name);

private:
    cv::Mat mapImage;  // Store the map as a matrix
};

#endif

Here is the output of log:
/usr/include/c++/9/iostream:13:0: error: File not found: bits/c++config.h in . /usr/include /usr/local/include /usr/include/c++/9 /usr/include/c++/9/tr1 /usr/include/c++/9/ext/numeric_traits.h:59:270: error: Modulus by zero /usr/include/c++/9/ext/numeric_traits.h:60:59: error: Modulus by zero /usr/include/c++/9/ext/numeric_traits.h:61:59: error: Modulus by zero /usr/include/c++/9/ext/numeric_traits.h:62:59: error: Modulus by zero /usr/include/c++/9/bits/localefwd.h:15:0: error: File not found: bits/c++locale.h in . /usr/include /usr/local/include /usr/include/c++/9 /usr/include/c++/9/tr1 /usr/include/features.h:215:18: error: Unexpected operator ? /usr/include/features.h:215:37: warning: Unexpected nonwhite token /usr/include/features.h:215:43: warning: Unexpected nonwhite token /usr/include/features.h:227:53: error: Unexpected operator ? /usr/include/features.h:227:106: error: missing ) in expression /usr/include/features.h:227:106: error: missing ) in expression /usr/include/features.h:227:106: warning: Unexpected nonwhite token /usr/include/features.h:227:106: warning: Unexpected nonwhite token /usr/include/features.h:227:107: warning: Unexpected nonwhite token /usr/include/features.h:227:113: warning: Unexpected nonwhite token /usr/include/features.h:227:128: warning: Unexpected nonwhite token /usr/include/features.h:227:129: warning: Unexpected nonwhite token /usr/include/features.h:227:144: warning: Unexpected nonwhite token /usr/include/features.h:227:144: warning: Unexpected nonwhite token /usr/include/features.h:227:150: warning: Unexpected nonwhite token /usr/include/features.h:227:150: warning: Unexpected nonwhite token /usr/include/features.h:227:151: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:45: error: Unexpected operator ? /usr/include/sys/cdefs.h:276:61: error: missing ) in expression /usr/include/sys/cdefs.h:276:61: error: missing ) in expression /usr/include/sys/cdefs.h:276:61: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:60: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:61: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:61: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:71: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:73: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:73: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:85: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:85: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:86: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:86: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:87: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:276:87: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:67: error: Unexpected operator ? /usr/include/sys/cdefs.h:295:83: error: missing ) in expression /usr/include/sys/cdefs.h:295:83: error: missing ) in expression /usr/include/sys/cdefs.h:295:83: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:82: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:83: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:83: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:93: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:94: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:94: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:95: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:107: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:107: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:108: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:109: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:109: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:110: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:111: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:117: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:131: warning: Unexpected nonwhite token /usr/include/sys/cdefs.h:295:131: warning: Unexpected nonwhite token /usr/include/c++/9/ext/atomicity.h:13:0: error: File not found: bits/gthr.h in . /usr/include /usr/local/include /usr/include/c++/9 /usr/include/c++/9/tr1 /usr/include/c++/9/ext/atomicity.h:14:0: error: File not found: bits/atomic_word.h in . /usr/include /usr/local/include /usr/include/c++/9 /usr/include/c++/9/tr1 /usr/include/c++/9/bits/allocator.h:25:0: error: File not found: bits/c++allocator.h in . /usr/include /usr/local/include /usr/include/c++/9 /usr/include/c++/9/tr1 /usr/include/c++/9/bits/locale_facets.h:15:0: error: File not found: bits/ctype_base.h in . /usr/include /usr/local/include /usr/include/c++/9 /usr/include/c++/9/tr1 /usr/include/c++/9/bits/locale_facets.h:1273:0: error: File not found: bits/ctype_inline.h in . /usr/include /usr/local/include /usr/include/c++/9 /usr/include/c++/9/tr1 /usr/include/stdio.h:27:0: error: File not found: stddef.h in . /usr/include /usr/local/include /usr/include/c++/9 /usr/include/c++/9/tr1 /usr/include/c++/9/fstream:16:0: error: File not found: bits/basic_file.h in . /usr/include /usr/local/include /usr/include/c++/9 /usr/include/c++/9/tr1 java.util.concurrent.TimeoutException
Is throwing java.util.concurrent.TimeoutException.
and
Problem is 'error: File not found: bits/c++config.h' ok?.

Guess similar issue.
BridJ (via JNAerator studio) fails to process simple code with includes throwing 'OutOfMemory'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions