Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying path to source files #74

Closed
aulwes opened this issue May 16, 2023 · 15 comments
Closed

Specifying path to source files #74

aulwes opened this issue May 16, 2023 · 15 comments
Labels
bug Something isn't working
Milestone

Comments

@aulwes
Copy link

aulwes commented May 16, 2023

Hi,

How do I specify the path(s) to the source files so that they are displayed in malt-webview?

Thanks,Rob

@svalat
Copy link
Member

svalat commented May 16, 2023

Hi Rob,

two answers :

  1. You first need to build your program or libraries with -g option to get the debug symbols in the binary so malt can find the source file paths.
  2. If for some reasons, you built your program on another computer and install for example an RPM you might not have the sources in the same exact path when you run the MALT webview. In this case you can override some paths to redirect them to another directory by using the -o/--override option.

Eg, if you built with sources in /rpm/.... and run on another machine where you copied the sources in /home/me/

malt-webview --override /rpm/my-project:/home/me/my-project -i malt-123456-my-program.json

Fill free to precise if it is not working for you.

@aulwes
Copy link
Author

aulwes commented May 17, 2023

I tried the -o option, but isn't working. Is there a way to display the original source path that web view is expecting?

svalat added a commit that referenced this issue May 17, 2023
@svalat
Copy link
Member

svalat commented May 17, 2023

Ohhhh, thanks for the report, there is effectively a real bug.

You can see the path of the file in the webview source browser when it failed to fetch the file.

You are most probably in the case where your sources are pointed via a relative paths which trigger a bug in the webview making the './' disappearing while arriving on the mini-server.

I fixed it in master branch.

If you are in this case it might be fixed.

For relative path replacement you might use, or it might work automatically if you are located in the source directory.

malt-webview --override ./:/home/me/my-project -i malt-123456-my-program.json

If you can confirm it is your issue.

@svalat svalat added the bug Something isn't working label May 17, 2023
@aulwes
Copy link
Author

aulwes commented May 30, 2023 via email

@svalat
Copy link
Member

svalat commented May 30, 2023

Pretty sur I still have an issue on the ./ in the target part of the redirection, I will give a look.

Waiting the patch, can you try to put a full path instead of ./ ?

@svalat
Copy link
Member

svalat commented Jun 1, 2023

In principle I made the fix on master branch.
If you can check and confirm or infirm.

@aulwes
Copy link
Author

aulwes commented Jun 1, 2023 via email

@svalat
Copy link
Member

svalat commented Jun 1, 2023

So if I well understand you get the issue since you moved to master branch and before you got success with probably the released version 1.2.1 ?

Or am I wrong ?

@aulwes
Copy link
Author

aulwes commented Jun 1, 2023 via email

@svalat
Copy link
Member

svalat commented Jun 1, 2023

The issue related to fastSkip is related the the backtrace on which I skip the first entries not to look on my own internal functions. But the exact value to use might depend on the way your compiler as inlined some functions. In principle this is detected but I probably have an issue if you get the error.

You can try to see if another value of the skip parameter might fix your issue manually via the options :

malt -o stack:skip=3 ......
malt -o stack:skip=4 ......
malt -o stack:skip=5 ......

@aulwes
Copy link
Author

aulwes commented Jun 1, 2023 via email

@svalat
Copy link
Member

svalat commented Jun 1, 2023

As you directly call cmakeyou can also try to build in release mode which enable all the optimizations which impact this. I apply it automatically if you use the ./configure script.

Probably i need to fix something in debug mode.

cmake .. -DCMAKE_BUILD_TYPE=Release .......

@aulwes
Copy link
Author

aulwes commented Jun 1, 2023 via email

@svalat
Copy link
Member

svalat commented Jun 17, 2023

I moved the second issue your reported in #76 so I can close this one.

@svalat svalat closed this as completed Jun 17, 2023
@svalat svalat added this to the v1.2.2 milestone Jun 17, 2023
@aulwes
Copy link
Author

aulwes commented Jun 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants