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

Release build fails for a big application #1322

Open
mirceamuresanse opened this issue May 2, 2024 · 5 comments
Open

Release build fails for a big application #1322

mirceamuresanse opened this issue May 2, 2024 · 5 comments

Comments

@mirceamuresanse
Copy link

We have an application that it contains a lot of code. Building the app in Visual Studio in debug mode it always works fine.
When attempting to build in release mode, it takes a much longer time and in the end it throws these errors in the log (see attached files).
This happens if I build both in Visual Studio or from command line.

The reason I opened the ticket here is that I noticed that it is related to this library.
release build - partial log 1.txt
release build - partial log 2.txt

@louthy
Copy link
Owner

louthy commented May 2, 2024

Looks like a compiler bug to me. I'd make sure everything is up to date (latest compiler, latest .NET SDK). If it still doesn't work you'll have to report it on the Roslyn repo I think

Another thing that I guess could be worth considering: are you using AOT or any other tree-shaking?

@jeremy-bridges
Copy link

I'm on Mircea's team and have been staring hard at this weird error too. :)

We were wondering something like that ourselves. We have tried turning off AOT and changing the linker behavior to don't link. Unfortunately, we got the same error. Any other settings to tweak?

@jeremy-bridges
Copy link

To be clear, this is occurring in the Windows and Android release builds.

@louthy
Copy link
Owner

louthy commented May 3, 2024

Not that I know of. Differences between a debug and release build really would hint to me that it's compiler related, I'd look for the difference in builds and try working out what setting is the cause. Other than that it's anybody's guess.

@louthy
Copy link
Owner

louthy commented May 3, 2024

System.OverflowException: Arithmetic operation resulted in an overflow. -- is also pretty suspect. Obviously, without knowing the internals of the roslyn IL code-gen I can't know what the problem is, but an integer overflow might suggest they're using byte or short for something, possibly number of members, number of types, or number of variables. Do you have an excess of those in that area of the code?

I would still expect it to fall over in the debug build though. Unless this is literally part of the release-IL optimisation.

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

No branches or pull requests

3 participants