#46 startup failure

closed
nobody
None
5
2003-03-20
2003-02-26
Anonymous
No

------[ history ]------------------

I suffered from a bug that causes hell between Java
1.4.1 and ATI video drivers - Windows XP would BSOD
each time J is closed.

The bug is described at:
http://developer.java.sun.com/developer/bugParade/bugs/
4749817.html

The workaround I chose is to disable D3D within Java by
calling J as follows:
"C:\Program Files\Java\j2re1.4.1_01\bin\javaw.exe" -jar -
Dsun.java2d.d3d=false "C:\Program Files\J\j.jar" --
home=c:\progra~1\j

Finally the crashing stopped... then another bug crept in.

------[ problem ]------------------

Initially, J loaded fine -- then it stopped loading at all.

J runs fine (the first 1-3 times) when I delete everything
(except prefs) from the .j directory. This mimics a new
install.

Does J require D3D? If not, what could the problem be?
I have almost no experience with Java...

A copy of J's log file is attached below for your viewing
pleasure.

Thanks for your time.

------[ log ]------------------

[attached]

Discussion

  • J log file

     
    Attachments
    log
  • David Roux
    David Roux
    2003-02-26

    Logged In: YES
    user_id=219068

    [submitted by ravidew]

     
  • David Roux
    David Roux
    2003-02-26

    Logged In: YES
    user_id=219068

    To amend the current workaround:

    I can get J to run by simply deleting session.xml from the .j
    directory.

    I'll keep digging to see what else the problem may be...

     
  • Peter Graves
    Peter Graves
    2003-02-27

    Logged In: YES
    user_id=558172

    It seems like there are two separate problems here.

    First, there's the bug in Java, Windows, and/or the ATI
    video driver, which really doesn't have anything to do with
    j. J doesn't require D3D, so disabling it with
    -Dsun.java2d.d3d=false should take care of that problem, as
    you discovered.

    The log file reveals that the second bug that crept in is in
    fact a bug in j, in the PHP mode formatter. It was
    apparently triggered by one of the files in the session that
    was active when you closed j (session.xml is used to save
    information about the files that are open in when you end
    your session, so the same files will be opened the next time
    you start the editor).

    It's possible that trying to edit this file again may
    trigger the same bug, in which case if you send me the file
    I should be able to reproduce the problem and fix it. But I
    think this bug actually involves a relatively rare race
    condition, so it may not be easily reproducible.

    Thanks for your help.

    -Peter

     
  • David Roux
    David Roux
    2003-02-27

    Logged In: YES
    user_id=219068

    You definately know your code well.

    The problem arises when I load a script called, simply, x (no
    extension). When I remove the entry for x from session.xml,
    J loads fine.

    The error log that is created once x is in session.xml has
    already been submitted. Attached is the log entry for when J
    is running and x is loaded.

    Thanks for your time.

    -----

    Feb 26 22:15:24.656 INFO Starting j...
    Feb 26 22:15:24.671 INFO J 0.18.0 (built Wed Jan 08 2003
    09:04:01 PST on prufrock)
    Feb 26 22:15:24.671 INFO Java 1.4.1_01 Sun Microsystems
    Inc.
    Feb 26 22:15:24.671 INFO Java HotSpot(TM) Client VM
    Feb 26 22:15:24.671 INFO Windows XP 5.1
    Feb 26 22:15:35.203 ERROR Position.getChar() offset = 13
    line.length() = 12
    Feb 26 22:15:35.203 ERROR Assertion failed!
    Feb 26 22:15:35.203 ERROR
    org.armedbear.j.AssertionException
    at org.armedbear.j.Debug.assertTrue(Unknown
    Source)
    at org.armedbear.j.Position.getChar(Unknown
    Source)
    at org.armedbear.j.PHPFormatter.parseBufferPHP
    (Unknown Source)
    at org.armedbear.j.PHPFormatter.parseBufferHTML
    (Unknown Source)
    at org.armedbear.j.PHPFormatter.parseBuffer
    (Unknown Source)
    at org.armedbear.j.Buffer.load(Unknown Source)
    at org.armedbear.j.Editor.activate(Unknown
    Source)
    at org.armedbear.j.Directory.openFileAtDot
    (Unknown Source)
    at org.armedbear.j.Directory.dirOpenFile(Unknown
    Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0
    (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke
    (Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
    Source)
    at java.lang.reflect.Method.invoke(Unknown
    Source)
    at org.armedbear.j.Editor.invoke(Unknown Source)
    at org.armedbear.j.Editor.execute(Unknown
    Source)
    at org.armedbear.j.Editor.handleKeyEvent
    (Unknown Source)
    at
    org.armedbear.j.Dispatcher.dispatchMousePressed(Unknown
    Source)
    at org.armedbear.j.Dispatcher.dispatch(Unknown
    Source)
    at org.armedbear.j.Dispatcher.mousePressed
    (Unknown Source)
    at java.awt.AWTEventMulticaster.mousePressed
    (Unknown Source)
    at java.awt.Component.processMouseEvent
    (Unknown Source)
    at java.awt.Component.processEvent(Unknown
    Source)
    at java.awt.Container.processEvent(Unknown
    Source)
    at java.awt.Component.dispatchEventImpl
    (Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown
    Source)
    at java.awt.Component.dispatchEvent(Unknown
    Source)
    at
    java.awt.LightweightDispatcher.retargetMouseEvent(Unknown
    Source)
    at
    java.awt.LightweightDispatcher.processMouseEvent(Unknown
    Source)
    at java.awt.LightweightDispatcher.dispatchEvent
    (Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown
    Source)
    at java.awt.Window.dispatchEventImpl(Unknown
    Source)
    at java.awt.Component.dispatchEvent(Unknown
    Source)
    at java.awt.EventQueue.dispatchEvent(Unknown
    Source)
    at
    java.awt.EventDispatchThread.pumpOneEventForHierarchy
    (Unknown Source)
    at
    java.awt.EventDispatchThread.pumpEventsForHierarchy
    (Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents
    (Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents
    (Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown
    Source)

    Feb 26 22:15:35.203 ERROR
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0
    (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke
    (Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
    Source)
    at java.lang.reflect.Method.invoke(Unknown
    Source)
    at org.armedbear.j.Editor.invoke(Unknown Source)
    at org.armedbear.j.Editor.execute(Unknown
    Source)
    at org.armedbear.j.Editor.handleKeyEvent
    (Unknown Source)
    at
    org.armedbear.j.Dispatcher.dispatchMousePressed(Unknown
    Source)
    at org.armedbear.j.Dispatcher.dispatch(Unknown
    Source)
    at org.armedbear.j.Dispatcher.mousePressed
    (Unknown Source)
    at java.awt.AWTEventMulticaster.mousePressed
    (Unknown Source)
    at java.awt.Component.processMouseEvent
    (Unknown Source)
    at java.awt.Component.processEvent(Unknown
    Source)
    at java.awt.Container.processEvent(Unknown
    Source)
    at java.awt.Component.dispatchEventImpl
    (Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown
    Source)
    at java.awt.Component.dispatchEvent(Unknown
    Source)
    at
    java.awt.LightweightDispatcher.retargetMouseEvent(Unknown
    Source)
    at
    java.awt.LightweightDispatcher.processMouseEvent(Unknown
    Source)
    at java.awt.LightweightDispatcher.dispatchEvent
    (Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown
    Source)
    at java.awt.Window.dispatchEventImpl(Unknown
    Source)
    at java.awt.Component.dispatchEvent(Unknown
    Source)
    at java.awt.EventQueue.dispatchEvent(Unknown
    Source)
    at
    java.awt.EventDispatchThread.pumpOneEventForHierarchy
    (Unknown Source)
    at
    java.awt.EventDispatchThread.pumpEventsForHierarchy
    (Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents
    (Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents
    (Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown
    Source)
    Caused by: org.armedbear.j.AssertionException
    at org.armedbear.j.Debug.assertTrue(Unknown
    Source)
    at org.armedbear.j.Position.getChar(Unknown
    Source)
    at org.armedbear.j.PHPFormatter.parseBufferPHP
    (Unknown Source)
    at org.armedbear.j.PHPFormatter.parseBufferHTML
    (Unknown Source)
    at org.armedbear.j.PHPFormatter.parseBuffer
    (Unknown Source)
    at org.armedbear.j.Buffer.load(Unknown Source)
    at org.armedbear.j.Editor.activate(Unknown
    Source)
    at org.armedbear.j.Directory.openFileAtDot
    (Unknown Source)
    at org.armedbear.j.Directory.dirOpenFile(Unknown
    Source)
    ... 29 more

     
  • David Roux
    David Roux
    2003-02-27

    Logged In: YES
    user_id=219068

    The problem isn't with the filename, but the file's contents:
    some of the file's contents were corrupted during xfer.

    It's unfortunate that problem coincided with the Java/ATI bug,
    but at least we (think we) know what it is :-)

     
  • Peter Graves
    Peter Graves
    2003-02-27

    Logged In: YES
    user_id=558172

    Apparently j is recognizing the file type correctly from the
    <?php tag, even though the filename has no extension.

    Even if the file's contents were corrupted, j shouldn't
    crash loading the file.

    If you send me (privately) an actual file that causes the
    problem to happen, I can probably fix the code so j won't
    crash in this situation. Otherwise there's not much I can do...

    Or am I misunderstanding the problem (or what's left of it)?

    Thanks.

    -Peter

     
  • David Roux
    David Roux
    2003-02-27

    Logged In: YES
    user_id=219068

    You understand it perfectly. At this point I'd rather not
    disclose the file's contents, but I'll see if I can reproduce it
    with another garbage file.

     
  • Peter Graves
    Peter Graves
    2003-03-20

    • status: open --> closed
     
  • Peter Graves
    Peter Graves
    2003-03-20

    Logged In: YES
    user_id=558172

    According to Sun, the D3D problem is fixed in Java 1.4.1_02.