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

Add simple xdf loader executable #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add simple xdf loader executable #26

wants to merge 1 commit into from

Conversation

tstenner
Copy link
Contributor

This adds a short example that loads an xdf file and prints some statistics.

@Yida-Lin
Copy link
Member

OK, something really weird; both methods load the file, but one gives a weird invalid length thing. I am not sure how to explain this. Both using Qt 5.9.9 MinGW 5.3 Debug.

2020-03-14 (4)
2020-03-14 (5)

@tstenner
Copy link
Contributor Author

I think the end of file isn't handled properly, so the last read might return garbage data

@Yida-Lin
Copy link
Member

The funny thing is, even if I just declare an uint_64 variable but without using it, SigViewer loads the file fine. Not so when I remove this line.

image

@tstenner
Copy link
Contributor Author

I'm guessing there's something funky going on somewhere else and the additional 8 bytes on the stack shift the problem to somewhere else where it's not noticeable in your test right away.
Valgrind might help, but if you sent me a stacktrace where sigviewer hangs I might have an idea where the problem is.

@Yida-Lin
Copy link
Member

Yida-Lin commented Mar 15, 2020

image

I am not so sure how to get the stacktrace, since it hangs instead of breaks on a specific line (well, technically I possibly could, if I really step over one line at a time until it hangs... but not sure I have enough time for that).

Also, if we want to keep this test program long term, maybe better putting it under some subfolder specifically dedicated to testing and add as a sub-project? Currently I don't think it directly "builds" with the project file in Qt Creator since it builds as a library.

@tstenner
Copy link
Contributor Author

I am not so sure how to get the stacktrace, since it hangs instead of breaks on a specific line (well, technically I possibly could, if I really step over one line at a time until it hangs...

You could also pause the program execution when it hangs. It's not as useful as breaking where something fails, but it still tells you which parts of the program were reached and which not.

@Yida-Lin
Copy link
Member

Yida-Lin commented Mar 15, 2020

Good to know! Didn't pay enough attention to the pause button before. Here is a screenshot after I click "pause" (when it hangs).

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants