Issue 74779 - new javax.swing.JTree() fails with libvclplug_gtk
Summary: new javax.swing.JTree() fails with libvclplug_gtk
Status: CLOSED WONT_FIX
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.x
Assignee: Stephan Bergmann
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-22 15:02 UTC by Stephan Bergmann
Modified: 2007-03-20 13:26 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
test component (1.62 KB, application/octet-stream)
2007-02-22 15:04 UTC, Stephan Bergmann
no flags Details
test component source (1.22 KB, application/x-compressed)
2007-02-22 15:05 UTC, Stephan Bergmann
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2007-02-22 15:02:05 UTC
At least on SRC680m204 unxsoli4.pro under Gnome, calling new javax.swing.JTree()
in Java code within soffice.bin causes SEGV.  It succeeds if
program/libjavaplug_gtk680si.so is removed.  It fails with Java 1.5.0_07 and
1.6.0, but succeeds with Java 1.4.2_11 (those were the versions I had at hand).

To reproduce, deploy the attached JTreeComponent.uno.jar into OOo
(program/unopkg add <path-to>/JTreeComponent.uno.jar), create a Basic macro

sub main
  dim s() as string
  createunoservice("jtreecomponent").run(s)
end sub

and execute it.  If successful, it prints the two lines

--- before new JTree
--- after new JTree

to stderr.  Below is dbx output for an unsuccessful run:

--- before new JTree
Reading libawt.so
Reading libmlib_image.so
Reading libmawt.so
Reading libXm.so.4
Reading libXp.so.1
Reading libXt.so.4
Reading libXtst.so.1
Reading libfontmanager.so
Reading xomCTL.so.2
Reading liblayout.so.1
Reading umle.layout.so.1
Reading libnet.so
Reading libnio.so
Reading libsendfile.so.1
t@1 (l@1) signal SEGV (access to address exceeded protections) in (unknown) at
0xef60fc59
0xef60fc59:     lock cmpxchgl  %edx,(%ecx)
(dbx) where
current thread: t@1
  [1] 0xef60fc59(0x0, 0x8044e1c, 0xd67a6e68, 0x8044e50, 0xd70836e0, 0x0), at
0xef60fc59
  [2] 0xef6029a4(0x0, 0x0, 0x0, 0xce617078, 0x1, 0xce616f68), at 0xef6029a4
  [3] 0xef6029a4(0x0, 0xce616f68, 0x8044e8c, 0xd66a48b9, 0x8044eb0, 0xd6ef7d00),
at 0xef6029a4
  [4] 0xef6029a4(0xce616f68, 0x8044eb4, 0xd66a41c0, 0x8044ee8, 0xd6ef7d00, 0x0),
at 0xef6029a4
  [5] 0xef602a7b(0x0, 0x0, 0xceb5b310, 0xceb6b170, 0xce616f68, 0xce616f68), at
0xef602a7b
  [6] 0xef602a7b(0x0, 0x0, 0x0, 0x1, 0x0, 0x0), at 0xef602a7b
  [7] 0xef6029a4(0x0, 0xceb54558, 0x0, 0xceb6b170, 0x9, 0xceb45ab8), at 0xef6029a4
  [8] 0xef6029a4(0x0, 0x0, 0xd6eed108, 0x9, 0xceb3a2a8, 0x8044fc4), at 0xef6029a4
  [9] 0xef602a7b(0x0, 0x0, 0x9, 0xceb3a2a8, 0x8044ff8, 0xd67a5d98), at 0xef602a7b
  [10] 0xef6029a4(0x0, 0x9, 0xce680278, 0xce6802a8, 0x804502c, 0xd67a5e4f), at
0xef6029a4
  [11] 0xef6029a4(0x9, 0xce6802a8, 0xce680278, 0x804505c, 0xd66fc76c,
0x8045088), at 0xef6029a4
  [12] 0xef6029a4(0x0, 0xceb3a2a8, 0xce6802d8, 0x804508c, 0xd66fc6fe,
0x80450b8), at 0xef6029a4
  [13] 0xef602a7b(0xce680320, 0xceb41660, 0xce6802d8, 0x80450bc, 0xd66fc685,
0x80450e4), at 0xef602a7b
  [14] 0xef602a7b(0xceb41660, 0xce6802d8, 0xce6802d8, 0x80450ec, 0xd66b2bc4,
0x804511c), at 0xef602a7b
  [15] 0xef602a7b(0x0, 0x0, 0xceb41660, 0xceb608b8, 0x8045120, 0xd66bd66a), at
0xef602a7b
  [16] 0xef6029a4(0xceb41660, 0xceb608b8, 0x804514c, 0xd6672d60, 0x8045184,
0xd6eb6170), at 0xef6029a4
  [17] 0xef6029a4(0x0, 0x0, 0x0, 0x0, 0xceb41660, 0xce680330), at 0xef6029a4
  [18] 0xef6029a4(0x0, 0x0, 0x0, 0xceb41660, 0xce680330, 0x80451c0), at 0xef6029a4
  [19] 0xef6029a4(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xef6029a4
  [20] 0xef6029a4(0x0, 0xce680330, 0x804524c, 0xd688d9e9, 0x8045274,
0xd720b5c0), at 0xef6029a4
  [21] 0xef6029a4(0x0, 0xce680330, 0x8045278, 0xd68a151a, 0x80452b8,
0xd722b3c8), at 0xef6029a4
  [22] 0xef6029a4(0x0, 0xce680330, 0xce680510, 0x0, 0x0, 0x0), at 0xef6029a4
  [23] 0xef6029a4(0xce680500, 0xce680510, 0x0, 0x0, 0x0, 0xceb41748), at 0xef6029a4
  [24] 0xef6029a4(0x0, 0x0, 0xce680560, 0x804532c, 0xd68a09b9, 0x804535c), at
0xef6029a4
  [25] 0xef602a7b(0x0, 0xceb41748, 0x0, 0xce680528, 0x8045360, 0xd689fc6f), at
0xef602a7b
  [26] 0xef602a7b(0xceb37a88, 0xce680528, 0x804538c, 0xd68980b3, 0x80453b4,
0xd7220cb0), at 0xef602a7b
  [27] 0xef602a7b(0xceb37a88, 0xceb60a00, 0x80453b8, 0xd689e439, 0x80453ec,
0xd7226f78), at 0xef602a7b
  [28] 0xef602a7b(0x0, 0x0, 0xd7340530, 0xce6805c0, 0xce680598, 0x80453f0), at
0xef602a7b
  [29] 0xef602d81(0xce680598, 0x0, 0xce6805f8, 0xd7340530, 0xceb37a88, 0x0), at
0xef602d81
  [30] 0xef602a7b(0xceb37a88, 0x0, 0xd7340530, 0xce6805e0, 0x8045468,
0xd6677951), at 0xef602a7b
  [31] 0xef602a7b(0xce6805e0, 0xceb37a88, 0x0, 0xd7340530, 0xceb37900,
0x80454a0), at 0xef602a7b
  [32] 0xef602a7b(0x0, 0xceb37a88, 0xceb37900, 0x80454d0, 0xd68890d1,
0x80454f8), at 0xef602a7b
  [33] 0xef602a7b(0xceb37a88, 0xceb37900, 0x80454fc, 0xd6888eb4, 0x8045520,
0xd7208060), at 0xef602a7b
  [34] 0xef602a7b(0xceb37900, 0xceb37900, 0x8045528, 0xd263d2f4, 0x8045550,
0xd263d948), at 0xef602a7b
  [35] 0xef602a7b(0xceb37aa0, 0xceb376e0, 0x8045570, 0xf4db8000, 0x8dc2518,
0x2), at 0xef602a7b
  [36] 0xef600169(0x80455b0, 0x8045760, 0xa, 0xd263d310, 0xef608490, 0x8045684,
0x2, 0x8dc2518), at 0xef600169
  [37] JavaCalls::call_helper(0x804575c, 0x8045648, 0x8045680, 0x8dc2518,
0x804563c, 0xf4aa8888), at 0xf4aa8a37
  [38] os::os_exception_wrapper(0xf4aa88b0, 0x804575c, 0x8045648, 0x8045680,
0x8dc2518), at 0xf4aa88a4
  [39] JavaCalls::call(0x804575c, 0x87b7718, 0x8045680, 0x8dc2518), at 0xf4aa8888
  [40] jni_invoke_nonstatic(0x8dc25d8, 0x804575c, 0x8db5158, 0x1, 0x8db9b69,
0x8045768, 0x8dc2518), at 0xf4ab8883
  [41] jni_CallIntMethodA(0x8dc25d8, 0x8db5158, 0x8db9b69, 0x80457a0), at 0xf4bed883
  [42] 0xef054e5d(0x81ee700, 0x8db5158, 0x8dbe878, 0x0, 0x0, 0x80eb9f8,
0x84c94b0, 0x1, 0x8045950, 0x8045948, 0x8045bc8), at 0xef054e5d
  [43] 0xef0558d2(0x8dc2718, 0x8dc1d80, 0x8045950, 0x8045948, 0x8045bc8), at
0xef0558d2
  [44] 0xee665db4(0x8045d1c, 0xee6ed160, 0x8045d28, 0x8045db8), at 0xee665db4
  [45] SbUnoObject::Notify(0x8db0f90, 0x8443b28, 0x8045e48), at 0xf82984d4
  [46] SfxBroadcaster::Broadcast(0x8443b28, 0x8045e48), at 0xfd7b00c9
  [47] SbxVariable::Broadcast(0x8dc1a08, 0x10000), at 0xf830ca87
  [48] SbxValue::SbxValue(0x8dc1a70, 0xf8383d70, 0x8dc1a08), at 0xf8308487
  [49] SbxVariable::SbxVariable(0x8dc1a70, 0xf8383d78, 0x8dc1a08), at 0xf830c595
  [50] SbiRuntime::FindElement(0x87b08e0, 0x8db0f90, 0x8004, 0xc, 0x15612, 0x0),
at 0xf82e960e
  [51] SbiRuntime::StepELEM(0x87b08e0, 0x8004, 0xc), at 0xf82eac33
  [52] SbiRuntime::Step(0x87b08e0), at 0xf82e31d7
  [53] SbModule::Run(0x869e958, 0x87b0160), at 0xf828a906
  [54] SbModule::Notify(0x869e958, 0x8443d98, 0x8046014), at 0xf8289fb5
  [55] SfxBroadcaster::Broadcast(0x8443d98, 0x8046014), at 0xfd7b00c9
  [56] SbMethod::Broadcast(0x869ea98, 0x10000), at 0xf828d2ca
  [57] SbxValue::Get(0x869ea98, 0x8046078, 0x0, 0x17, 0x18, 0x8046270), at
0xf8308bc0
  [58] 0xf651ded8(0x869ea98), at 0xf651ded8
  [59] 0xf65079a9(0x8210ba0), at 0xf65079a9
  [60] 0xf6507a68(0x8210ba0), at 0xf6507a68
  [61] 0xf650a3f8(0x8210ba0, 0x847a188), at 0xf650a3f8
  [62] 0xf6505795(0x86b5988, 0x847a188), at 0xf6505795
  [63] 0xf64fc0a8(0x86b5988, 0x847a188), at 0xf64fc0a8
  [64] 0xf801a915(0x84928f0, 0x86b5988, 0xf65c49cc, 0x847a188, 0x1), at 0xf801a915
  [65] 0xf801d2fb(0x84928f0, 0x847a188), at 0xf801d2fb
  [66] 0xf801d19c(0x84928f0, 0x847a188), at 0xf801d19c
  [67] 0xf8047385(0x8471a30, 0x847a188), at 0xf8047385
  [68] 0xf804734c(0x8471a30, 0x847a188), at 0xf804734c
  [69] 0xfe45d7ed(0x87afcd8), at 0xfe45d7ed
  [70] 0xfe45dd57(0x81b70f0, 0x81cbf20, 0x16, 0x87afcd8), at 0xfe45dd57
  [71] SalDisplay::DispatchInternalEvent(0x80e8420, 0x80e7f50, 0x0, 0xfcd518dc,
0x80c2794, 0x1), at 0xfb685828
  [72] 0xfcd1434e(0x80c6538), at 0xfcd1434e
  [73] 0xfcd1427f(0x80c6538, 0xfefb2000, 0x87af600), at 0xfcd1427f
  [74] g_idle_dispatch(0xfcbcf5b0, 0x2, 0x80e7f50, 0xffffff9c, 0x23, 0x1c5), at
0xfcb74b4d
(dbx) regs
current thread: t@1
current frame:  [1]
gs       0x000001c3 0x00000000
fs       0x00000000 0x00000000
es       0x00000043 0x00000000
ds       0x00000043 0x00000000
ss       0x00000043 0x00000000
cs       0x0000003b 0x00000000
edi      0x08044e50
esi      0xd67a6e6c
ebp      0x08044e40
esp      0x08044e1c
ebx      0x08044e24
edx      0x08044e1c
ecx      0x00000000
eax      0x464c457f
eip      0xef60fc59:0xef60fc59  lock cmpxchgl  %edx,(%ecx)
trapno   0x0000000e 0x00000000
err      0x00000007 0x00000000
eflags   0x00010202 0x00000000
(dbx)
Comment 1 Stephan Bergmann 2007-02-22 15:04:17 UTC
Created attachment 43276 [details]
test component
Comment 2 Stephan Bergmann 2007-02-22 15:05:01 UTC
Created attachment 43277 [details]
test component source
Comment 3 philipp.lohmann 2007-02-23 10:31:14 UTC
tg
Comment 4 philipp.lohmann 2007-02-23 13:38:57 UTC
There is no such thing as a libjavaplug_gtk. Corrected title.
Comment 5 mdxonefour 2007-03-02 12:51:20 UTC
added md to cc
Comment 6 philipp.lohmann 2007-03-14 15:00:22 UTC
pl->jl: The actual stack trace when attaching to the hanging office looks like this:

  [1] Copy::pd_fill_to_words(0xce674cd8, 0xffffffff, 0x0), at 0xf3672d98
  [2] CollectedHeap::common_mem_allocate_noinit(0x14, 0x0, 0x900e108), at 0xf3904a22
  [3] CollectedHeap::array_allocate(0x89cf2fc, 0x14, 0x20, 0x900e108), at 0xf369ee57
  [4] typeArrayKlass::allocate(0xd6e008d8, 0x20, 0x900e108), at 0xf369ed4a
  [5] java_lang_Throwable::fill_in_stack_trace(0x89cf2d4, 0x900e108), at 0xf36d3152
  [6] java_lang_Throwable::fill_in_stack_trace(0x89cf2d4), at 0xf36d2de7
  [7] JVM_FillInStackTrace(0x900e1c8, 0x8044980), at 0xf36d2ce4
  [8] Java_java_lang_Throwable_fillInStackTrace(), at 0xf35cb18d
  [9] 0xee2cf94b(), at 0xee2cf94a
  [10] 0xee2cfe14(), at 0xee2cfe13
  [11] 0xee200169(0x8044a10, 0x8044b00, 0xa, 0xd6e2d308, 0xee208490, 0x8044b58,
0x1, 0x900e108), at 0xee200168
  [12] JavaCalls::call_helper(), at 0xf36a8a37
  [13] os::os_exception_wrapper(0xf36a88b0, 0x8044afc, 0x8044aa4, 0x8044b58,
0x900e108), at 0xf36a88a4
  [14] JavaCalls::call(0x8044afc, 0x89cf2cc, 0x8044b58, 0x900e108), at 0xf36a8888
  [15] JavaCalls::call_special(0x8044afc, 0x89cf2bc, 0xf39db428, 0xf39db528,
0x8044b58, 0x900e108), at 0xf36af45d
  [16] Exceptions::new_exception(0x8044bcc, 0x900e108, 0x89cf2b8, 0xf39db528,
0x8044b58, 0x0), at 0xf36d2b60
  [17] Exceptions::new_exception(0x8044c10, 0x900e108, 0x89cf2b8, 0x0, 0x0), at
0xf36d29f8
  [18] Exceptions::new_exception(0x8044c40, 0x900e108, 0xd693dcf0), at 0xf37c88aa
  [19] InterpreterRuntime::create_exception(), at 0xf37e3fca
  [20] 0xee2083a6(), at 0xee2083a5

To me it seems some kind of java exception seems to be flying, but i have no
idea what exactly happens. Could you please have a look ?
Comment 7 joachim.lingner 2007-03-14 15:35:41 UTC
.
Comment 8 Stephan Bergmann 2007-03-15 11:06:26 UTC
Some more information:

Using a 1.6.0-beta2 JVM with -Xint, a jstack on the hanging soffice.bin gives

---8<---
"Thread-113" prio=10 tid=0x08b1dc00 nid=0x1 runnable [0x08044000..0x080448c0]
   java.lang.Thread.State: RUNNABLE
        at java.io.RandomAccessFile.getChannel(RandomAccessFile.java:251)
        at sun.font.TrueTypeFont.open(TrueTypeFont.java:260)
        - locked <0xd18f0048> (a sun.font.TrueTypeFont)
        at sun.font.TrueTypeFont.verify(TrueTypeFont.java:382)
        at sun.font.TrueTypeFont.<init>(TrueTypeFont.java:159)
        at sun.font.FontManager.registerFontFile(FontManager.java:986)
        at sun.font.FontManager.initialiseDeferredFont(FontManager.java:932)
        - locked <0xda13ffc0> (a java.lang.Class for sun.font.FontManager)
        at sun.font.CompositeFont.doDeferredInitialisation(CompositeFont.java:236)
        - locked <0xda13ffc0> (a java.lang.Class for sun.font.FontManager)
        at sun.font.CompositeFont.getSlotFont(CompositeFont.java:316)
        at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:59)
        at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:75)
        at
sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:345)
        at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:336)
        at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:284)
        at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:910)
        at javax.swing.JComponent.getFontMetrics(JComponent.java:1572)
        at
javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(BasicLabelUI.java:227)
        at javax.swing.JComponent.getPreferredSize(JComponent.java:1607)
        at
javax.swing.tree.DefaultTreeCellRenderer.getPreferredSize(DefaultTreeCellRenderer.java:475)
        at
javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2816)
        at
javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
        at
javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
        at
javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:720)
        at
javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:91)
        at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:402)
        at
javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3424)
        at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
        at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
        at java.awt.Component.firePropertyChange(Component.java:7802)
        at javax.swing.JTree.setModel(JTree.java:857)
        at javax.swing.JTree.<init>(JTree.java:642)
        at javax.swing.JTree.<init>(JTree.java:539)
        at JTreeComponent.run(JTreeComponent.java:16)
---8<---

Alternatively running truss -f soffice ends with thread 9718/1 successfully
opening and reading from
/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialRegular.ttf and
/usr/openwin/lib/locale/ja/X11/fonts/TT/hggbsun.ttf, and then getting into endless

---8<---
9718/1:		open64("/usr/openwin/lib/locale/ja/X11/fonts/TT/hgmlsun.ttf", O_RDONLY)
Err#2 ENOENT
9718/1:		    Incurred fault #6, FLTBOUNDS  %pc = 0xF2611A67
9718/1:		      siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
9718/1:		    Received signal #11, SIGSEGV [caught]
9718/1:		      siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
9718/1:		lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
9718/1:		setcontext(0x08043C00)
9718/1:		    Incurred fault #6, FLTBOUNDS  %pc = 0xF2611BE4
9718/1:		      siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
9718/1:		    Received signal #11, SIGSEGV [caught]
9718/1:		      siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
9718/1:		lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
9718/1:		setcontext(0x08043BF0)
9718/1:		    Incurred fault #6, FLTBOUNDS  %pc = 0xF2611BE4
9718/1:		      siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
9718/1:		    Received signal #11, SIGSEGV [caught]
9718/1:		      siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
9718/1:		lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
9718/1:		setcontext(0x08043BF0)
9718/1:		    Incurred fault #6, FLTBOUNDS  %pc = 0xF2611BE4
9718/1:		      siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
9718/1:		    Received signal #11, SIGSEGV [caught]
9718/1:		      siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
9718/1:		lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
---8<---
...
Comment 9 Stephan Bergmann 2007-03-19 15:20:01 UTC
I'm in contact with the Sun Java group to find out more.
Comment 10 Stephan Bergmann 2007-03-19 15:21:31 UTC
It appears to be some interference between libvclplug_gtk680si.so and the JVM,
when the JVM tries to synthesize NullPointerExceptions from SIGSEGVs.
Comment 11 Stephan Bergmann 2007-03-20 13:25:54 UTC
This is a duplicate to Sun CR 6515970, a problem in the loader, fixed in Solaris
Nevada build 57.  As a workaround, you can set the environment variable
LD_NOAUXFLTR=yes.  The problem is that the loader sometimes erroneously creates
an anonymous segment at address zero (which happens for example when OOo's
libvclplug_gtk680si.so is loaded), which causes the JVM's mechanism to
synthesize NullPointerExceptions from SIGSEGVs to fail.
Comment 12 Stephan Bergmann 2007-03-20 13:26:32 UTC
.