简体   繁体   中英

Why Does ShowDialog Crash in MonoDevelop?

I have a trouble building and running my working C# project under MonoDevelop.

Any call of OpenFileDilog.ShowDialog() shows me a window with a proper title, but completely blanc. The executive waits for a while and than crashes.

I also have another C# project build in the same MonoDevelop enviroment, that works fine. Well, not that fine, but at least OpenFileDialogs doesn't lead to crash. So I'm a little bit puzzled here. Can it be project specific? What should I do to avoid it?

Upddate: It works the same way with any modal form. So It's not OpenFileDilog , it's ShowDialog() . And it might have something to do with some other windows open by ShowDialog caller.

So. I have a form, which opens some other forms with Show() , and then tries to open another window with ShowDialog() - and goes then as descibed above.

Some details:

Mac OS X 10.6.8 (10K594)

Mono 2.10.6

MonoDevelop 2.8.5

我可以确认,将FormBorderStyle设置为System.Windows.Forms.FormBorderStyle.FixedToolWindow在某些情况下会在Mono中生成崩溃(这时我从具有FixedToolWindow的对话框中打开MessageBox )。

Seems to be a bug in Mono. My other non modal windows had FormBorderStyle set to FixedToolWindow . As soon as I set it back to Sizable , everything works normal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM