Difference between revisions of "User:Hanya/Iif Problem"
From Apache OpenOffice Wiki
(Add initial content of this page) |
m (Fix section tags) |
||
Line 3: | Line 3: | ||
Error code 87302 is produced when some code is modified contains Iif runtime function. | Error code 87302 is produced when some code is modified contains Iif runtime function. | ||
− | + | == Disassembled Original == | |
<pre> | <pre> | ||
Sub Main | Sub Main | ||
Line 34: | Line 34: | ||
</pre> | </pre> | ||
− | + | == Disassembled with Problem == | |
Second argument for IIf function is changed from 1.0 to "". | Second argument for IIf function is changed from 1.0 to "". | ||
Execute the code after the change -> strange error. | Execute the code after the change -> strange error. | ||
Line 65: | Line 65: | ||
</pre> | </pre> | ||
− | + | == Disassembled without Problem after Restarting == | |
After the modification and error mentioned above, restart the office. | After the modification and error mentioned above, restart the office. | ||
And then execute the code, no error. | And then execute the code, no error. | ||
Line 91: | Line 91: | ||
</pre> | </pre> | ||
− | + | == Differences == | |
With the same code, different operation codes are generated for IIf function. | With the same code, different operation codes are generated for IIf function. | ||
Revision as of 09:27, 20 December 2014
Issue: https://issues.apache.org/ooo/show_bug.cgi?id=63614
Error code 87302 is produced when some code is modified contains Iif runtime function.
Contents
Disassembled Original
Sub Main IIf(true, 1.0, "") End Sub
Position Op Op1 Op2 OpStr ----------------------------------------- 00000000 Lbl00000000: 00000000 45 00000000 JUMP Lbl0000 // Label ; Sub Main 00000005 Main: 00000005 87 00000003 00000000 STMNT 3,0 (For-Level: 0) ; IIf(true, 1.0, "") 0000000E 87 00000004 00000000 STMNT 4,0 (For-Level: 0) 00000017 18 ARGC // new argv 00000018 80 00000002 0000000C RTL true ; Variant 00000021 19 ARGV 00000022 40 00000004 NUMBER "1" 00000027 19 ARGV 00000028 41 00000005 STRING "" 0000002D 19 ARGV 0000002E 80 00008003 00000000 RTL IIf ; Empty, Args 00000037 1C GET ; End Sub 00000038 87 00000005 00000000 STMNT 5,0 (For-Level: 0) 00000041 2B LEAVE
Disassembled with Problem
Second argument for IIf function is changed from 1.0 to "". Execute the code after the change -> strange error.
Sub Main IIf(true, "", "") End Sub
00000000 Lbl00000000: 00000000 45 00000000 JUMP Lbl0000 ; Sub Main 00000005 Main: 00000005 87 00000003 00000000 STMNT 3,0 (For-Level: 0) ; IIf(true, "", "") 0000000E 87 00000004 00000000 STMNT 4,0 (For-Level: 0) 00000017 18 ARGC 00000018 80 00000002 0000000C RTL true ; Variant 00000021 19 ARGV 00000022 41 00000004 STRING "" 00000027 19 ARGV 00000028 41 00000004 STRING "" 0000002D 19 ARGV 0000002E 80 00008003 00000002 RTL IIf ; Integer, Args 00000037 1C GET ; End Sub 00000038 87 00000005 00000000 STMNT 5,0 (For-Level: 0) 00000041 2B LEAVE
Disassembled without Problem after Restarting
After the modification and error mentioned above, restart the office. And then execute the code, no error.
00000000 Lbl00000000: 00000000 45 00000000 JUMP Lbl0000 ; Sub Main 00000005 Main: 00000005 87 00000003 00000000 STMNT 3,0 (For-Level: 0) ; IIf(true, "", "") 0000000E 87 00000004 00000000 STMNT 4,0 (For-Level: 0) 00000017 18 ARGC 00000018 80 00000002 0000000C RTL true ; Variant 00000021 19 ARGV 00000022 41 00000004 STRING "" 00000027 19 ARGV 00000028 41 00000004 STRING "" 0000002D 19 ARGV 0000002E 80 00008003 00000000 RTL IIf ; Empty, Args 00000037 1C GET ; End Sub 00000038 87 00000005 00000000 STMNT 5,0 (For-Level: 0) 00000041 2B LEAVE
Differences
With the same code, different operation codes are generated for IIf function.
// with problem 0000002E 80 00008003 00000002 RTL IIf ; Integer, Args // restarted 0000002E 80 00008003 00000000 RTL IIf ; Empty, Args
The error code 87302 is set in SbxValue::SetType (t is not equal to aData.eType) method. Therefore the problem is caused by the wrong compilation when the code is modified.