Bug 293271 - On Windows 7 enable assertions does not work--it does not pop-up the assertion hit dialogue
Summary: On Windows 7 enable assertions does not work--it does not pop-up the assertio...
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2009-10-25 15:43 EDT by Ashutosh Singh CLA
Modified: 2009-11-04 05:22 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashutosh Singh CLA 2009-10-25 15:43:29 EDT
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: latest Ganyemede

So, I am trying to debug some native code, where I have _CrtDbgBreak(). So the java program hits the assertion and pops up a windows dialogue which asks you if you want to terminate the application or want to debug. In this eclipse on Windows 7 it just throws the error on the java side and does not pop up the dialogue box saying there is an assertion. When I run my program from command line using java <ClassName> it pops up the window. 
I tried all kinds of things like added -ea to jre argument, changing jre's using java.exe instead of javaw.exe, so far nothing help. 
It may be that I am not that good with eclipse IDE so a more trained eye would be able to figure the bug out. 
I also have a small test program that someone can use if the need be.
Ashutosh

Reproducible: Always

Steps to Reproduce:
1. Write a small java class
have a native method hello() in it.
make sure you load the dll where the implementation of that method is
In the hello world throw and exception like _CrtDbgBreak() or even assert(0)
it should pop up and assertion dialogue box.
2.
3.
Comment 1 Dani Megert CLA 2009-10-26 05:28:49 EDT
>I also have a small test program that someone can use if the need be.
>Ashutosh
Please attach it here.

Does the normal assertion mechanism work i.e. if you simply launch:

	public static void main(String[] args) {
		assert(1 != 1);
	}

with -ea, does it write:

Exception in thread "main" java.lang.AssertionError
	at snippet.Snippet.main(Snippet.java:5)

to the console?


Darin, any idea?
Comment 2 Darin Wright CLA 2009-10-26 16:15:54 EDT
Sorry, I'm not sure what's going on here. Pawel, do you have any experience with this?
Comment 3 Pawel Piech CLA 2009-10-26 17:20:59 EDT
(In reply to comment #2)
> Sorry, I'm not sure what's going on here. Pawel, do you have any experience
> with this?

No, I'm afraid not.
Comment 4 Dani Megert CLA 2009-10-30 06:38:58 EDT
Please provide more details, otherwise we can't do much.
Comment 5 Dani Megert CLA 2009-11-04 05:22:11 EST
Nothing we can do without further details.