Closed Bug 36174 Opened 24 years ago Closed 24 years ago

Mozilla crashes when createPluglet(String mimeType) returns null

Categories

(Core Graveyard :: Java-Implemented Plugins, defect, P3)

All
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ovk, Assigned: blackconnect)

Details

(Keywords: crash)

When pluglet engine creates a new pluglet instance and createPluglet(String 
mimeType) method returns null instead of new instance,then Mozilla crashes. It 
happens under Linux and Solaris.

Output under Linux RH 6.2:

--test.createPlugletInstance
Exception in thread "main" java.lang.NullPointerException: 
        at java.util.Hashtable.put(Hashtable.java:386)
        at org.mozilla.pluglet.Registry.setPeer(Registry.java:31)
FATAL ERROR in native method: Null object passed to a non-static method
SIGABRT   6*   abort (generated by abort(3) routine)
        stackpointer=0xbfffc4f4

Full thread dump Classic VM (Linux_JDK_1.2_pre-release-v2, native threads):
    "AWT-Motif" (TID:0x4223e308, sys_thread_t:0x89ea0c0, state:R, native 
ID:0x2009) prio=5
        at sun.awt.motif.MToolkit.run(Native Method)
        at java.lang.Thread.run(Thread.java:479)
    "SunToolkit.PostEventQueue-0" (TID:0x4223e040, sys_thread_t:0x89d2e10, 
state:CW, native ID:0x1c08) prio=5
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:424)
        at sun.awt.PostEventQueue.run(SunToolkit.java:363)
    "AWT-EventQueue-0" (TID:0x4223e068, sys_thread_t:0x89d2388, state:CW, native
ID:0x1807) prio=6
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:424)
        at java.awt.EventQueue.getNextEvent(EventQueue.java:179)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:67)
    "Finalizer" (TID:0x4221f320, sys_thread_t:0x891fbf0, state:CW, native 
ID:0x1406) prio=8
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:112)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
    "Reference Handler" (TID:0x4221f3b0, sys_thread_t:0x891d420, state:CW, 
native ID:0x1005) prio=10
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:424)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:114)
    "SIGQUIT handler" (TID:0x4221f3e0, sys_thread_t:0x8915ea8, state:R, native 
ID:0xc04) prio=5
    "main" (TID:0x4221f1e0, sys_thread_t:0x88a1440, state:R, native ID:0x400) 
prio=5
Monitor Cache Dump:
    sun.awt.PostEventQueue@4223E040/42303DD8: <unowned>
        Waiting to be notified:
            "SunToolkit.PostEventQueue-0" (0x89d2e10)
    java.awt.EventQueue@4223E0B8/42303B20: <unowned>
        Waiting to be notified:
            "AWT-EventQueue-0" (0x89d2388)
    java.lang.ref.ReferenceQueue$Lock@4221F338/42255028: <unowned>
        Waiting to be notified:
            "Finalizer" (0x891fbf0)
    java.lang.ref.Reference$Lock@4221F3C0/42254B20: <unowned>
        Waiting to be notified:
            "Reference Handler" (0x891d420)
Registered Monitor Dump:
    utf8 hash table: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class linking lock: <unowned>
    System class loader lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Monitor cache lock: owner "main" (0x88a1440) 1 entry
    Thread queue lock: owner "main" (0x88a1440) 1 entry
    Monitor registry: owner "main" (0x88a1440) 1 entry

Build Date & Platform:
Mozilla sources from April,10 and also M14; Linux RH 6.2 and Solaris 2.6.
I added null checking to PlugletFactory.cpp
It returns NS_ERROR_FAILURE in case createPluglet(String mimeType) returns null

I am closing this bug as fixed
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Adding crash keyword
Keywords: crash
I marks it as verified.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.