問題タブ [overflowexception]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - 巨大な XPS ドキュメント ページをイメージ ファイルに変換する
画像に変換しようとしている XPS ドキュメントに、非常に大きなページ (高さと幅が数万ピクセル、数万のノードとリンクがある) があります。XPS ドキュメントには 1 ページしか含まれていません。
これを行う方法を調査すると、これに関する基本的な方法 (主に他の StackOverflow の質問に基づく) は、次のようになります。
Render
その時点で失敗するため、その呼び出しの後に実際の画像エンコーディングとファイル作成のコードは含めていません。
この操作にはかなりの量のメモリが必要であることを認識しているため、64ビットアプリケーションとしてビルドしているため、メモリ不足の例外は発生しません。ビルド マシンのメモリは問題になりません。
私が得るエラーは、次のようSystem.OverflowException
に述べています。
The image data generated an overflow during processing.
さらに、途中で次のような「ContextSwitchDeadlock
」メッセージが表示されます。
The CLR has been unable to transition from COM context 0xfc55d4d8 to COM context 0xfc55d600 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.
私が書いていないコードに消えてしまうため、これについて何ができるかわかりません。これに対処する方法がわかりません。
私の質問は基本的に、1 つ以上の巨大なページを含む XPS ドキュメントを PNG 画像ファイルに変換する方法はありますか? 私が調べようとしたことの 1 つは、RenderTargetBitmap を使用して XPS ページの小さなチャンクのみをレンダリングし、最後にすべてのチャンクを 1 つの画像に結合することですが、その方法を見つけることができませんでした。これ、または可能であれば。
c# - Decimal.Round() が OverflowException をスローする方法
私は使用しています
MSDN は、 https://msdn.microsoft.com/en-us/library/k4e2bye2(v= vs.110) .aspx をスローできると言います。OverflowException
どうすればそうなるのかわかりません。ilSpyを使用して実装を調べてみましたが、次の外部実装まで取得しました:
どの入力がこの例外をスローする可能性があるか、誰にもわかりませんか?
c# - 古いプロジェクトを新しいコンピューターに移行できません
古いプロジェクトを新しいコンピューターに移行しようとすると、エラーが発生します。古いコンピューターでは、データベースは正常に機能しました。データベースの内容はほとんど重要ではないため、古いデータベースを新しいコンピューターに .bak ファイルとして持ち込まなかったのはそのためです。学校のプロジェクトです。
私は働いています:
VS 2015。
ASP.NET コア
これは、VS PackedManager からのエラー コードです。
System.OverflowException: 算術演算でオーバーフローが発生しました。System.Data.SqlClient.SNINativeMethodWrapper.SNIOpenSyncExWrapper(SNI_CLIENT_CONSUMER_INFO& pClientConsumerInfo、IntPtr& ppConn) で System.Data.SqlClient.SNINativeMethodWrapper.SNIOpenSyncEx(ConsumerInfo consumerInfo、文字列 constring、IntPtr& pConn、Byte[] spnBuffer、Byte[] instanceName、ブール値の fOverrideCache、 System.Data.SqlClient.SNIHandle..ctor(ConsumerInfo myInfo, String serverName, Byte[] spnBuffer, Boolean ignoreSniOpenTimeout, Int32 timeout, Byte[]& instanceName, Boolean flushCache, Boolean fSync, System.Data.SqlClient.TdsParserStateObject.CreatePhysicalSNIHandle(String serverName, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Byte[]& instanceName,
1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource
System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource で 1 回再試行、DbConnectionOptions userOptions、DbConnectionInternal oldConnection、DbConnectionInternal& connection)1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource
Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerDatabaseCreator.Exists(Boolean retryOnNotExists) で Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open() で System.Data.SqlClient.SqlConnection.Open() で 1 回再試行)。 Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration) の HistoryRepository.Exists() Microsoft.EntityFrameworkCore.Design.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType) の Microsoft.EntityFrameworkCore.Tools.Cli.DatabaseUpdateCommand.< > Microsoft.EntityFrameworkCore.Tools.Cli.Program の Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) の c__DisplayClass0_0.b__0()。Main(String[] args) 算術演算でオーバーフローが発生しました。
Web で解決策を検索しましたが、使用できると思われるものは見つかりませんでした。SSMS 2016 の最新バージョンを使用してデータベースを操作しています。
私は現在、同じコンピューター上で仮想マシンを使用して学校で働いていることを知っておくとよいでしょう。VMWare を使用しており、仮想マシンの WAC サーバーに SQL Server Express 2012 がインストールされています。それが私の現在の問題に何らかの影響を与えるかどうかはわかりませんが、あなたが知れば知るほど、あなたが助けることができると思います. この問題に取り組んでいる間、仮想マシンが実行されていません。
私のコードを frpm で処理したいことが他にあれば教えてください。